INTERACT FORUM

Please login or register.

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

Author Topic: Smartlist from other playlists  (Read 1310 times)

sthomp

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 70
  • I'm a llama!
Smartlist from other playlists
« on: October 09, 2007, 01:33:01 am »

I'm trying to make a smartlist that will use songs from three other playlists weighted by percentages. Specifically, I'd like something like this...

20% of the songs would come from Playlist A
30% would come from Playlist B
50% would come from Playlist C

I've found some info on percentages, but can't quite figure out how to use them with playlists. If anyone can help, I'd appreciate it.
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: Smartlist from other playlists
« Reply #1 on: October 09, 2007, 04:47:56 am »

Something along the lines of:

~mix=1000,20%,[playlist]=[PlaylistA],30%,[playlist]=[PlaylistB],etc

should do the trick.

If PlaylistA is in a subtree, eg

Playlists->Smartlists->PlaylistA

You need to include that also,

[playlist]=[Smartlists\PlaylistA]

Mark

Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9133
Re: Smartlist from other playlists
« Reply #2 on: October 09, 2007, 06:07:33 am »

that'll work.
You'll need the full treepath of the playlist only if the playlist names are not unique. For example, I have a playlist called "Dylan" and another called "Dylan Covers".
If I want to use these in areas where MC does not provide the "playlistid" value for us, I need to use the exact treepath, as simply saying [playlist]=dylan will pull results from both lists.
Also remember that when used like this with square brackets, the search becomes case sensitive... [playlist]=[audio\dylan] and [playlist]=[Audio\Dylan] are not the same.

If the playlist names are unique, you can write the ~mix string a lot more quickly like so:

~mix=1000,20%,{p=playlistA},30%,{p=playlistB},50%,{p=playlistC}

Wrapping each search in curly braces is not essential with this particular ~mix, but I feel it's a good habit to get into when writing these things as when the day comes that you have a search string in there that contains a comma for example, you will need those curly braces, and if you use them all the time any way, it's one less thing to worry about ;)

-marko.

sthomp

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 70
  • I'm a llama!
Re: Smartlist from other playlists
« Reply #3 on: October 09, 2007, 09:02:33 pm »

Thanks very much, that does what I wanted. One question...

Does the limiter for mix have to be number of tracks, or can it be something else like total size or duration? It's easy enough to add another limit to the smartlist after the mix entry, but if the limit I really want could be part of the mix command to begin with, I'd just as soon do that.

Thanks again.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9133
Re: Smartlist from other playlists
« Reply #4 on: October 09, 2007, 09:24:48 pm »

size or duration would be very useful indeed, but at the moment, you are correct, it has to be number of tracks.

~mix can produce some wonderful playlists, but you need take care when constructing your strings.

for example, if 50% from playlistC means that 500 tracks must come from playlistC, but playlistC only has 250 tracks in it, ~mix will add them all twice. No matter what it takes, the number of tracks specified for the ~mix will be returned.
Sometimes you can leverage this fact to your advantage by specifying a ridiculously large ~mix value, then removing duplicates using the ~nodup modifier.

I wonder if you need 4 lists at all? You might find this interesting ---> http://yabb.jriver.com/interact/index.php?topic=29940.msg206134#msg206134
it's a ~mix rule from seviien that probably won't work for you literally as posted, but it comes with clear explanation and might not need a lot of tweaking to meet your needs. Don't hesitate to ask if you need more help.

-marko.
Pages: [1]   Go Up