INTERACT FORUM

Please login or register.

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

Author Topic: Keep playlist order when importing a playlist into a smart playlist #Expression  (Read 1019 times)

Mr.WaCko

  • Recent member
  • *
  • Posts: 23

Hi I am trying to select one of my existing playlists into a smart playlist and I want to maintain the original order of the playlist that is being 'imported'

I've tried the sorting on the Seq # but this still give a new sequence not the old one.

Thanks for your support on this matter
Logged

Mr.WaCko

  • Recent member
  • *
  • Posts: 23
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

The Sequence number is not really available outside of the Playlist, even though MC seems to accept a sort on [Seq], which isn't a field but seems to be a recognised internal variable.

Besides, a Smartlist will sort based on the rules defined for it. I created a Smartlist based on a specific Playlists and sorted it by Seq (a-z), but it didn't work.

Generally, if you want to manually control the Track sequence, use a Playlist. If you can define rules for the sort, use a Smartlist.

I don't know of any way to do what you are trying to do. I tried creating a field called [SortSeq] as a calculated field, and having that set equal to [Seq], but that didn't work. An Expression column in the source Playlist also doesn't carry the value over from the [Seq] column.

But if you search the forum very carefully you may find some information. I seem to remember someone did work out how to use the [Seq] field in an expression... Ah no, they just used a workaround: https://yabb.jriver.com/interact/index.php/topic,116717.0.html

I think that is the best solution you will find.

Good luck.  :)
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

If you are still looking at this, take a look at the CustomData function. It can return the Seq number of a file in a list, such as a Playlist.

Similar but a bit of an alternative to using Counter() in the thread I linked to above.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Mr.WaCko

  • Recent member
  • *
  • Posts: 23

Thanks for providing the ideas.
I've been playing to both expressions.
What I found it that it works when hard coding the expression into a custom field and hence storing a sequence.
What does not work is making a new library tag containing the expression =CustomData(#). It does not return any values.

I've also tried using an expression column which works fine on the source list however I cannot call upon that data in smartlist I am trying to make.

Any suggestions how to make it work with a new library field?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

Hmmm, I'm getting similar results to you. I only tested in an Expression Column before sharing, as I just came across the CustomData(#) function while doing other stuff, and thought of your question.

As you say, it works in an Expression Column. But I didn't get it working by hard coding the expression into a custom field, as "Calculated data", like you said you did, and it doesn't work by entering =CustomData(#) into a custom field column or tag for files in a Playlist. So it is very limited in fact. Maybe we can get that functionality expanded.

For now, I guess the method used in the linked thread, entering =Counter() into custom field column or tag for a Playlist of files, would work.

But if the files are all audio then there is one other option that doesn't require a custom field. That is to use the "Right-click > Library Tools > Fill Track Number From List Order" and select to fill Episode numbers rather than Track numbers. Use that to add the Episode numbers in the Playlist, then go to the Smartlist and add the Episode field as a column, and sort by that column. That works, Just be careful not to Fill the [Track #] field instead of the [Episode] field!

Also, any solution has the limitation that each file can only have one value in the Episode/Custom field, and yet one Track could be in many Playlists. So any solution would only be reliable if you only use it for one Playlist/Smartlist pair, and no more. If you want to use it for more than one Playlist/Smartlist pair, you would need a Custom field for every pair.


What are you trying to do with this by the way? As your Smartlist is tied to the Playlist, what value is this idea going to provide over and above just using the Playlist instead of the Smartlist?
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Mr.WaCko

  • Recent member
  • *
  • Posts: 23

The use for the playlist is the following:

I have an extensive playlist built from various listening sessions with friends and audiostores which continues to expand over time as I get more songs and ideas.

From this list I want to create new playlists based on certain genres or other criteria so I can reuse some of the songs for other types of lists.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

Ah. I understand. The Smartlist approach is creative.

An alternative would be to work within the large Playlist and use the Search Bar (top right) to define the criteria you are looking for, and then once you have narrowed down the list, create a new Playlist from that. You could use "Send To", Drag and Drop, or any of the other methods to create a new Playlists from the results of any search. The original Playlist would be preserved, and fully shown once you remove the search criteria.

The Search Bar right-click menu has a search Wizard which provides the same sort of features as creating a Smartlist. You can even Save and later Load search criteria for re-use. When you reload a saved set of criteria MC just loads the expression it built from the Wizard, but that isn't so bad. It isn't hard to learn the expression/search language and tweak search expressions. Or you can just load a saved search and open the Wizard again, and it will import the expression and show the rules as you created them.

You lose the sequence number in the newly created Playlist, but by that stage, does it matter? The actual order of the Tracks is maintained. They are just renumbered. That would be a much simpler process than the work required using the Sequence Number.


PS: If you haven't, you may want to copy that big Playlist to a another Playlist as a backup copy, and work from that. You could date the copy (include in the name) so you know what stage the "master copy" was at when the new copy was made.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Mr.WaCko

  • Recent member
  • *
  • Posts: 23


An alternative would be to work within the large Playlist and use the Search Bar (top right) to define the criteria you are looking for, and then once you have narrowed down the list, create a new Playlist from that. You could use "Send To", Drag and Drop, or any of the other methods to create a new Playlists from the results of any search. The original Playlist would be preserved, and fully shown once you remove the search criteria.


I like the idea. The playlist would no longer be dynamic right, meaning everytime the masterlist updates with new songs the 'genre lists' would not get updated. Any ideas how to work around that?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

Correct. Like all Playlists, the new "sub-Playlist" would be static. You would have to run the process again to update the "sub-Playlist". Probably just emptying the "sub-Playlist", applying the saved search to the Master Playlist again, and then Send To the empty "sub-Playlist" again. Not difficult or time consuming.

Overall I think I like this solution better.



You could still use a Smartlist as you originally ask about, as it supports the dynamic Playlist issue, but then you are left with the original topic of this thread; keeping the order in the Smartlist. Those two requirements, a dynamic Playlist and retaining the original Track order in the new list, are a bit incompatible.

But you could do it. Just use either the [Episode] or a new custom field to store the original sequence, and then use a Smartlist to pull out what you want from the Master Playlist and sort by the field that contains the original sequence. Of course, when you add files to the Master Playlist you will need to update the field containing the original sequence before looking at the Smartlist.

If your Master Playlist is just sorted by Sequence, and you add Tracks to the end, the "Fill Track Number From List Order" would make that easy. If you sort the Master Playlist by the [Episode] or custom field, have "Options > Tree & View > Sorting > Sort empty strings last" ticked, so that the new Tracks are at the bottom of the list, and again, the "Fill Track Number From List Order" would make filling in new sequence numbers easy.

If you will only ever have one Master Playlist that you do this with, I would just use the [Epsiode] field. If you may have more than one Master Playlist, I would create a new custom field to hold the sort sequence for each specific Master Playlist, to retain separation and avoid the possibility of using incorrect sequence numbers.

Of course, then you have to overlay this solution with your other issue of updating Tracks to the best version you have. Not difficult, but requires a little care.

Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Mr.WaCko

  • Recent member
  • *
  • Posts: 23


If you will only ever have one Master Playlist that you do this with, I would just use the [Epsiode] field. If you may have more than one Master Playlist, I would create a new custom field to hold the sort sequence for each specific Master Playlist, to retain separation and avoid the possibility of using incorrect sequence numbers.

Of course, then you have to overlay this solution with your other issue of updating Tracks to the best version you have. Not difficult, but requires a little care.

Ok let me play with this idea! Can we make it in such a way I create a field that is auto updated with a 'fake' sequence number everytime I change something in the master playlist (e.g. add a new number in between existing tracks)
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

Can we make it in such a way I create a field that is auto updated with a 'fake' sequence number everytime I change something in the master playlist (e.g. add a new number in between existing tracks)

I can't think of any way to automate that step, and retain the sequence of earlier tracks.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up