INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Import some data from Excel into Media Center  (Read 1661 times)

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Import some data from Excel into Media Center
« on: November 21, 2020, 03:52:42 am »

I have created a tag called "Muso Name". I have also created a spreadsheet (screenshot attached) that has a list of musicians on each track and they are delimited by a ;

I did some research a couple of days ago and found a thread that was discussing importing data from Excel in MC, but can't seem to locate it again. In any case, it was going into much more detail than I think I need.

Can anyone point me in the direction please? This will only be for Audio files.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #1 on: November 25, 2020, 06:20:32 pm »

Is anyone able to assist with this please?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Import some data from Excel into Media Center
« Reply #2 on: November 25, 2020, 06:23:34 pm »

You can use copy and paste from any MC view to a spreadsheet.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #3 on: November 25, 2020, 06:26:48 pm »

I want to go the other way around - importing data from Excel into MC
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Import some data from Excel into Media Center
« Reply #4 on: November 25, 2020, 06:41:24 pm »

You'd have to be able to put it in a playlist format that MC can import.  I can't help beyond that.  Maybe someone else can.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Import some data from Excel into Media Center
« Reply #5 on: November 25, 2020, 07:34:38 pm »

Fence, I'm not at a PC to test, but I think you can do it with MC's Paste Tags function.

You might have to copy one column (tag) at a time, but if you're only interested in your one new field, that's not a problem. Copy the contents of the column (not including the header row) from Excel into the clipboard.

When you do a paste tags, a dialog will come up asking what field you want to paste into.

Give it a try on a file you don't mind wrecking.  If you paste on multiple files, it is absolutely essential the files be in the same order in your MC view as in the Excel spreadsheet: there is no validation.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #6 on: November 25, 2020, 07:51:51 pm »

Great wer, thanks very much. 

Yes, the data lines match the MC entries precisely by default. I export the MC lines to Excel to get the data and process it to concatenate and delimit all the names. They had to be more or less manually pulled out of the original Musicians (with instruments) tag that I created months ago, which was data obtained from various websites - all different, very messy, and VERY tedious to untangle!

This pointy end should go pretty smoothly I think, as long as I get the procedure correct. I will then create a view that will allow me to display all the albums that e.g. Vinnie Colaiuta plays drums on.

Thanks again. Will report back in a while after I try it out.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #7 on: November 25, 2020, 09:48:44 pm »

Hmmmm....a mixed result!

Yes that process works, but so far it appears that it can only handle 5 albums at a time, which seems somewhat odd.

I started with just one album, then two, and that works. I have created the view for them and that looks good. Then I selected 33 albums, copied the data to the clipboard, and pasted tags, but only the first 5 albums in MC got the field updated - AND WITH THE WRONG DATA (the last 5 albums from the copied data went to the first 5 albums in MC).

I thought that might be because one of the lines had no data to go into the tag (i.e. there is no ; delimited muso data for the album) so I just selected to the line above the blank line (so 30 albums) and only the first 4 albums got tag updates. (and they are in the wrong order too)

Orright, sez I, maybe it can only handle 5 at a time.....testing now....nope, won't paste anything at all now. So I copied from Excel and pasted onto a Notepad document. Nope - nothing at all. (edit: because I had checked "Allow overwrite of existing values")

So far all I can do is enter one line at a time by Paste Tags. Imperative to uncheck "Allow overwrite of existing values" in the Paste Tags dialogue box. In fact, it is far quicker (when doing one at a time) to just enter it straight into the tag displayed in the Tag Pane, and leave that tag open to select the next line - but that is going to take forever.....



Something is definitely not right about what I am doing - why bother having the Paste Tags option if it only does one line at a time?
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #8 on: November 25, 2020, 10:30:31 pm »

I'm displaying in JRiver as a list of single albums (that's how I got the data out of JR in the first place). I'm starting to wonder if the Paste Tags function only designed to do one bunch of files (i.e. displayed as all files in the album, and a list of albums.

The Muso Name tag is "Store one value for each album", as it needs to be, but perhaps this is contrary to the way PT works. If this is the case then I could reasonably expect that those 33 lines I tried to paste would get gobbled up by the first 33 FILES (not albums). For a 9 track album I presume it would then change then discard the 2-9 lines of tag in favour of the first line because it is one value for each album, or maybe it just applies the 9th one to each.

I'll do some testing of this if I can.

If my hunch is correct then I'll have to extract the "Number of Tracks" field for each album, write some VB code in Excel to duplicate the lines the requisite number of times, and then paste into JR. I may have to change to "Store one value for each file", at least until I can get the data entered. (edit - "Number of Tracks" has no info in it)
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #9 on: November 25, 2020, 10:51:51 pm »

Ah yup, that's exactly what's happening.

I copied 26 lines from Excel (for 26 albums). Paste Tags. The albums have 5, 5, 8, 6, 7 tracks respectively.
The first line gets applied to the first album (5 tracks long)
The 6th line gets applied to the 2nd album of 5 tracks
The 11th line to the 3rd album of 8
the 19th to the 4th of 6
the 25th to the 5th album of 7

and then there are no more lines leftover to be used.

This now becomes a relatively easy fix, using a couple of loops in VB to duplicate the lines in a separate spreadsheet, perhaps a 100 albums at a time. Pretty happy that I nutted that out though! 8)  :o
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Import some data from Excel into Media Center
« Reply #10 on: November 25, 2020, 11:03:54 pm »

If I understand you correctly, you're trying to select an ALBUM in MC, and then copy/paste tags.

That's the mistake.  Albums don't really exist in MC, only files.  You need to copy/paste from the file list pane at the bottom of a view. Each row in your spreadsheet must be a FILE (track) not an album. When you paste into MC, select files, not albums.

When you do the paste tag into each file of the album, it will overwrite the relational field each time, but that shouldn't cause a problem, as all the tracks should have the same value anyway.

If your spreadsheet only has one row per album, and you're pasting a relational field, it can still work, just filter your MC view so it only shows track 1 of each album. Then MC will have 1 row per album, just like Excel.

If you do it this way, a script is not required.  Or did I misunderstand you?
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #11 on: November 25, 2020, 11:21:25 pm »

AH! Yes of course! Dunno why I didn't think of that "Remove Duplicates of albums" - I used that just recently for something else. Probably got too much other VB code in my head at the moment, thinking it's the way to go.

Anyhoo, it works as described, and I'm off and running. This will be exceptionally quick now, but I'm not sure doing 1247 albums in one hit is advisable or necessary. (but I have regular backups of all the files).

Thanks for your assistance wer!
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Import some data from Excel into Media Center
« Reply #12 on: November 25, 2020, 11:42:59 pm »

I have done hundreds at once, but you have to be very careful that your row order is identical, or it will all end in tears.

You might consider a library backup first.

Good luck.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #13 on: November 26, 2020, 12:26:12 am »

Yes. The lines are occasionally out by one - one album from somebody not displaying for reasons I can't figure out (displays in that artists view). When I delete the "Remove duplicate albums" filter it shows up again (and they are definitely different album names). Anyway, it's just a little more tedium at the end of ten days of it ...

TBH I think it will quicker to write that little VB routine - just a couple of loops required.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #14 on: November 26, 2020, 12:37:14 am »

What's worse, it's inconsistent. Nathan East was only displaying 2/3 albums, but now they are all there, but three others have dropped out. "Remove duplicates albums" is somehow unreliable. Beats me.

A little VB routine coming up...
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #15 on: November 26, 2020, 02:48:47 am »

The way to go is to display all the file names in JR, showing just a few fields (Album Artist, Album, Track #), copy that into Excel, run the VB routine to drop the concatenated delim into each file, and then copy that, paste tags. That way it is absolutely ensured that the files are not out of whack (they can't possibly be).
Logged

jkauff

  • World Citizen
  • ***
  • Posts: 202
Re: Import some data from Excel into Media Center
« Reply #16 on: November 26, 2020, 05:05:24 am »

I think this makes a good case for adding something like Musos as a standard tag in MC. I usually use the Comment tag to list musicians, but often I want to use that tag to add Discogs-type info about mastering, etc. (which probably deserves a standard tag as well).
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #17 on: November 26, 2020, 05:32:56 am »

I think this makes a good case for adding something like Musos as a standard tag in MC. I usually use the Comment tag to list musicians, but often I want to use that tag to add Discogs-type info about mastering, etc. (which probably deserves a standard tag as well).
I have two tags that I created for this. The first, about a year ago, was "Musicians" andis often very large. I put in the info I can get from wherever (Wikipedia is the preference). That contains all the musicians and instruments, sometimes for each track when it comes from Discogs (good, but tedious to edit, and often repetitive).

It was that data that I manipulated through some macros in Excel, and an enormous amount (5 days) of manual editing to carve just the musicians names to add to "Muso Name" tag. However, it will be worthwhile because with the View that I have created in MC, I can now see that e.g. Victor Bailey plays on 15 albums by 6 different artists.

For me this is particularly useful in Jazz and Fusion because they change their musicians almost every album, and it is really very hard to remember who was on what album that I think I heard this guy on before but can't quite remember but I really liked his bass licks and want to hear some more. "He sounds like the guy on....ah, good reason for that....!"

Where it gets a little tricky is that there are 3083 musos so far, so the scroll bar in the top left box (screenshot) is pretty darn sensitive!
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Import some data from Excel into Media Center
« Reply #18 on: November 26, 2020, 12:06:24 pm »

Musicians would be the better name for the tag. Muso is just slang.

I can certainly understand why you want this info, and it would certainly have benefits for Jazz.  But until it is in a well structured database that allows auto retrieval without hours of manual editing, the benefits of making it a built in field are small.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #19 on: November 26, 2020, 03:36:21 pm »

Musicians would be the better name for the tag. Muso is just slang.
Yes, but that would need to be of concern to me   ;D......the problem was that I have already used "Musicians" for the bulk data copied from the various websites. The screenshot attached to this post shows how much data can be in the Musicians field (and that's not showing the whole album). That's the field that I had to export to Excel last week to edit down to just their names and instruments. Some of them are a real mess with producers, art directors, recordists etc etc etc all in there. Much of the data just comes out concatenated into huge long lines, often without spaces. One has to take what one can find on the web - that's why Wikipedia is the best source for layout of data.

Another thing I have only recently become aware of is that using Chrome rather than Firefox is better for copying the data - the lines stay as separate lines rather than getting concatenated. No idea why - I'd have thought a copy to the clipboard would have been the same either way.

I must say that for the first time (apart from crashing periodically) JRiver behaved badly during the Paste Tags operation. After I had worked out the files verses albums dilemma there were still many false starts due to the inconsistency of "Remove Duplicates of Albums", but also the actual pasting operation. Sometimes I could paste 2000 lines or more, other times it wouldn't paste anything at all - not even one line - because "Paste Tags" was greyed out for unknown reasons. To get around that I had to paste for one album directly into the field in the Tag pane, and then I was able to carry on with big pastes. Sometimes I had to toggle between "Overwrite previous info" or not to get it working. Very odd, but I got there in pretty good time.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Import some data from Excel into Media Center
« Reply #20 on: November 26, 2020, 04:03:56 pm »

Regarding the name of the tag, I was referring to your suggestion it be made a standard tag in MC. In that case, the name will have to concern you, and everyone else, because it needs to be intelligible. Muso fails that test. Of course for your custom tags, have at it and suit yourself.

It sounds like you have things sorted out regarding the paste tags now, so it doesn't seem like you need more help. But if you wanted to keep talking about it... Your experience with paste tags is so different from mine, and your description of what's happening sounds so odd to me, that I'd almost like to see a video of what you're actually doing. I wonder if you're doing something improper or abnormal, like when you were trying to use an album as your paste target. Since you are new at paste tags, you should be willing to concede this is possible. Paste can be greyed out if you have the wrong format or dimensionality on the clipboard. And I don't see how remove duplicates fits into this, or why it needs to be involved at all.  I have trouble following your narrative in this regard.  I suspect there is a simple way to avoid the complications you've encountered... For me, if used carefully, it has always behaved as expected. But whether we spend more time on it is up to you; I don't mind helping you with it further.

Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #21 on: November 26, 2020, 04:49:10 pm »

Regarding the name of the tag, I was referring to your suggestion it be made a standard tag in MC.
Nah, not me, that was jkauff requesting that. But I agree that as an official tag it would not be proper. However, I don't see the need to include in MC releases because it is easy enough to create it as desired.

Re the paste tags problems - well it's really just a different version of copy & paste which I'm reasonably competent at. One thing that I observed is that it will still let non-matching sets of lines be pasted, so it wasn't that. Who knows what was going on. No matter.


Ok, so maybe you might have some thoughts on this wer, or maybe it can't be done easily. In my Excel sheet that has the musicians data there is the 3089 line list of musos, with the instruments that they play (not per album, just per muso). The instrument data is in up to 7 cells - one per instrument, and then also concatenated and ; delimited just as I did for the "Muso Names" tag.

What I would also like to be able to do is see a reference to what instrument they are playing in the MC view. It is true that I can hover over the Musicians tag, but as you can see from the previous post screenshot that can be a lot of data to scan looking for a name, and in the ones that have the concatenated data it is virtually impossible to read (I know I should spend a couple of months editing them to be consistent.....highly unlikely...).

* Some of them have "Instrument - name1, name2, name3" if there are 3 guitarists on the album (so if name1 also plays something else there will be another entry for them).
* Some of them have Name1 - Guitar, Bass, Vocals (and this is really good - exactly as i want it).
* Those two variations can be repeated for each track (interesting, but a giant pain for editing), or they might be just for the whole album (again my preference)
* Some of them are just three simple lines of Name1 - Bass, Name2 - Drums, Name3 - Piano

I have attached a screenshot of one of the poorer examples for legibility. (it's out of Excel, but displays the same in MC)

At the moment, I have something like this in the muso name:
Skip Anderson;Paulinho da Costa;Barry Johnson;Eddie Martinez

and I can quite easily turn that into:
Skip Anderson - Keyboards, Vocals;Paulinho da Costa - Percussion;Barry Johnson - Bass, Lead Vocals;Eddie Martinez - Guitar, Vocals

That would just be a formula in the Excel sheet and repaste into the tags - super easy to do BUT the problem is that some of these albums have 30, 40, 75 musicians on them (Natalie Cole's Unforgettable has no less than 167 musicians on it including about 70 Violinists, Cellists, etc - truly unforgettable). So for an album with 30 musos on it, with several of them playing more than one instrument it becomes unwieldy.

The point being that these long-list albums are the ones where hovering over Musicians just doesn't work, and the simple ones that would be easy to re-paste the data don't really need it done because hovering over "Musicians" works really well.

It sounds to me like I'm trying to make two non-intersecting planes intersect, but there is so much of MC that I don't know about that maybe there's a way?

Unfortunately for the Strings people and Background vocals, they mostly missed the cut because they would have doubled the data.  :P
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #22 on: November 26, 2020, 05:04:09 pm »

Hmmm. Just sitting here thinking about that before I read this morning's news on what your two Presidents are competing about today.

What I might be able to with reasonable ease is to create a neat and consistent list of the "muso - intrument1, instrument2" to paste at the top of the sometimes messy Musicians field. That way when I hover at least the relevant data will be at the top. It's a bit of work, but nothing like editing each Musician field to tidy it up (some of them can take 10 minutes each easily). The list of instruments would not necessarily be what they play on that particular album - just what they can play, but details of that would still be down lower. (in other words it would be "possible" instruments).
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Import some data from Excel into Media Center
« Reply #23 on: November 26, 2020, 06:25:47 pm »

I've never seen what I thought was a really good way to present large amounts of list-type data in MC.  The number of musicians you're entering is beyond what I do for exactly that reason.

You can get a lot of mileage out of a panes view, but only if you have a lot of fields: musician1, musician2 etc.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #24 on: November 26, 2020, 06:28:35 pm »

Yeah, but that's just too much work. It was my original idea way back 12 months ago but I shied away from it then too.

I'm in the middle of doing a little test to see what my last idea might look like, and will post a screenshot. I think it will be quite ok.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #25 on: November 26, 2020, 07:18:23 pm »

First draft looks not too bad (screenshot attached). This is a good example of a bad example.
I may change it to:
~~~~~~~~~~~~~~~~~~~~~~~~
LIST OF MUSICIANS & INSTRUMENTS
(perhaps not all instruments are used,
but there may be more detail below)
~~~~~~~~~~~~~~~~~~~~~~~~

So those lists are easy to produce out of Excel - just a rewrite of an existing routine. I will have to add the compiled data to the top of the Musician field manually, but that beats the hell out of rearranging all the ones with terrible layouts - I can do those at my leisure if I wish to.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #26 on: November 26, 2020, 08:27:53 pm »

This looks a bit better, but the main reason for this post is to show the difference between copying the data from a site using Firefox rather than Chrome. Chrome keeps all the carriage returns, whereas FF deletes ONLY the ones between each musician per track. Unfortunately, most of my data copies were done using FF (and I didn't even think to use a different browser - just thought that was the way it was).

This screenshot was data copied out of Chrome - the previous post with concatenated data was out of FF

I just repeated the copy using FF, and still just the same as ever.

Curiously, FF does not do that when copying data from Wikipedia. FF, in this case, is the browser not me.  ;D
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Import some data from Excel into Media Center
« Reply #27 on: November 27, 2020, 12:00:09 am »

Sounds like you want "Swag of Tools (SOT) --> Data Fiddler" https://yabb.jriver.com/interact/index.php/topic,106802.0.html as it lets you import / export between MC <--> Excel

Select the row you want to update in MC, export that using SOT, add/change what you want in Excel and SOT will then update MC for you.

Logged
JRiver CEO Elect

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #28 on: November 27, 2020, 12:07:11 am »

Thanks for that. Is it capable of adding some data to the head of an existing field? E.g. adding the data between the rows of tildes that I showed in the screenshots (from my last few posts) to the rest of the data already in that field?
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Import some data from Excel into Media Center
« Reply #29 on: November 27, 2020, 12:13:13 am »

It will replace the entry in MC with whatever is in the cell in Excel, so if you export the data to Excel, and append it there, it will import it all back in.  One thing I'm not sure about is some stuff "special" characters may not get imported.... It is easy enough to just try on a single entry to see how it works.  SOT does not install as such, it is just a standalone AHK script using MC's Web Services to make changes to the DB. 
Logged
JRiver CEO Elect

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #30 on: November 27, 2020, 12:56:24 am »

Nathan, I had a look through your thread and very little of it is devoted to importing from Excel.....and as wer knows I will have questions!  ;D

So should I post questions in there (which will be hard for others to find - took about 30 minutes to find very little reference to Excel) or should I post questions in this current thread....or would it be better if I started a thread called "Importing data from Excel to MC using Swag Of Tools"?

For the sake of others wanting to do that I would favour the latter, but will be guided by you.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Import some data from Excel into Media Center
« Reply #31 on: November 27, 2020, 01:10:27 am »

I'd say the SOT thread so we keep it all in once place for later discovery.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Import some data from Excel into Media Center
« Reply #32 on: November 27, 2020, 01:11:49 am »

...and FYI, Swag of Tools is a collection of utilities that I've made over the years with a (now) combined single UI.  The Data Fiddler part (import / export from excel) is just one of the parts.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Import some data from Excel into Media Center
« Reply #33 on: November 27, 2020, 01:24:58 am »

....and as wer knows I will have questions!  ;D

Sounds like another "Aussie"!  We need more of us on the forum :)
Logged
JRiver CEO Elect

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Import some data from Excel into Media Center
« Reply #34 on: November 27, 2020, 01:36:22 am »

Sounds like another "Aussie"!  We need more of us on the forum :)

Oh no....  ::)
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Import some data from Excel into Media Center
« Reply #35 on: November 27, 2020, 02:06:28 am »

Oh YES! But you already knew that...it's all in the attitude.  ;)

(and the times of posting)
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Import some data from Excel into Media Center
« Reply #36 on: November 27, 2020, 02:14:08 am »

Yup!
Logged
JRiver CEO Elect
Pages: [1]   Go Up