INTERACT FORUM

More => Old Versions => JRiver Media Center 26 for Windows => Topic started by: antenna on March 20, 2020, 08:47:18 pm

Title: What playlists is a song on?
Post by: antenna on March 20, 2020, 08:47:18 pm
Is there a way to display what playlists contain a specific song? (in this context, a "song" is a file of a song)

Say, I'm looking at the Audio>Files view and there is a song I am interested in.

I've tried looking at the context menu of the song for something like, ~playlists containing this song~, but I didn't see anything there.  I looked in Library tools, and didn't see anything there.

I guess I'm looking for an inverted list ability for the playlists, i.e., is there a way to show what playlists contain a song?


thx.

Title: Re: What playlists is a song on?
Post by: wer on March 20, 2020, 09:23:45 pm
There are a couple of ways.  Each file has a [Playlists] field.  Add the Playlists field as a column to the file list in one of your views, and it will show you what you want.

There's also the FilePlaylists function that you can use in an expression.  You can read more about that in the JRiver Expression Language wiki.

Title: Re: What playlists is a song on?
Post by: antenna on March 20, 2020, 09:38:01 pm
... Each file has a [Playlists] field.  ...

Well, duh, I never thought of looking for that field.  I have always admired MC because it had a real database behind it, and I never thought of looking to that database for my answer.



Thanks for the quick answer.

Problem solved. 
Title: Re: What playlists is a song on?
Post by: antenna on March 31, 2020, 09:11:44 am

As a related follow-up...

Since [Playlists] is a database field, it also surfaces when you are building a smart playlist.  ...

You can "Add a new modifier" that uses that [Playlists] field.    You are presented with a nice series of check-boxes, one for each playlist.  A nice touch is that the playlists' grouping hierarchy is maintained and displayed.

I've been playing with and using this to do such things as build a playlist composed of other playlists, or build a playlist of songs not on other playlists.

Once again, the excellent database functionality behind MC shines.

thx!

Title: Re: What playlists is a song on?
Post by: Dawgincontrol on March 31, 2020, 10:48:14 am
Is there a way to display what playlists contain a specific song? (in this context, a "song" is a file of a song)

Say, I'm looking at the Audio>Files view and there is a song I am interested in.

I've tried looking at the context menu of the song for something like, ~playlists containing this song~, but I didn't see anything there.  I looked in Library tools, and didn't see anything there.

I guess I'm looking for an inverted list ability for the playlists, i.e., is there a way to show what playlists contain a song?


thx.

In standard view, if you scroll the mouse over the song it will lists the playlists.
Title: Re: What playlists is a song on?
Post by: antenna on March 31, 2020, 11:08:14 pm
In standard view, if you scroll the mouse over the song it will lists the playlists.

I have to admit... that is the answer i was hoping for when I posted my original question.  Many thanks for that.  I have hovered over a song many times but, apparently, not songs that were on playlists.  Indeed, if I look back on what I had been looking for when I hovered, it was more file location.

But now that I know the Playlists database field is also displayed... well that is most helpful.  Thanks again.

btw, the earlier response on this thread, about [Playlists] being a database field was also most helpful.  Because of what I have learned about MC these past couple of days, i have been rearranging my playlists.

Thanks to the MC community!
Title: Re: What playlists is a song on?
Post by: RoderickGI on April 01, 2020, 12:21:59 am
Just a minor point of clarification, as it may catch you out in the future.

The [Playlists] field is a bit of a special case. It doesn't actually exist in the Main MC database. You can easily check that by going to "Options > Library & Folders > Manage Library Fields" then try to find it. You won't, even with "Show all fields (including hidden fields)" selected in the drop-down list.

My understanding is that there is a separate table/database for Playlists, and in that is a list of Playlists names, against which the "File Key"1 for each file on the Playlist is listed.

So basically, MC doesn't look up the File first as it normally does, and then list all Playlists associated with it, but looks up a Playlist and then lists all Files associated with that Playlist. So it is sort of a reverse lookup, though obviously when using the basic [Playlists] column header in a View/Playlist/Smartlist, MC is looking up that table for any instances of the File Key, and then listing which Playlists it is associated with.

Anyway, that is my understanding, and no-one has corrected me on that yet!  ;D


Most of the time the above won't affect your use of the [Playlists] field, but sometimes it won't be available to you. I had an example a while back trying to help build a Playlist of files that aren't on a list of existing Playlists. This one: https://yabb.jriver.com/interact/index.php/topic,124411.0.html

Note 1:
The "File Key" is a unique number assigned to every record in the Library. You can see it by adding an Expression column to a View/Playlist/Smartlist with the expression "FileKey()".
Title: Re: What playlists is a song on?
Post by: antenna on April 05, 2020, 12:55:06 pm

Thanks for that clarification.

I understand what you say.

So far, [Playlists] has been deterministic for me, no surprises.   :)