Sunday, March 23, 2025

Combine playlists

      


If you want to combine 2 or more existing playlists, you will not find a button specifically for that.
Instead you can start playing the first track of  playlist 1 and then select save queue as new items in playlist 2.

Alternatively, you could use a python scriptUsing python would allow you to combine more than just two playlists in one go. This could also be used to realize different sorting options, for example randomly mixing all tracks or sorting them by genre or last play date. An example is this script.

Unfortunately, the year of release of the track is not available as a sorting criterion because the Plex database lacks such a field at track level. If you want to sort in this way, either the original playlists must already be sorted by year or the only option is to export the playlists to an external music management program. There, the tracks can be sorted according to various criteria such as the year of release and the new playlist can be imported back into plex. I have already described how to do this in another article. 



Friday, January 31, 2025

Daylist - Playlists

     


Plex and plexamp already have a number of options for automatically creating playlists: Radios or sound journeys created based on certain criteria. 

The Meloday script, which can be found here, takes a time of day or mood-based approach. Meloday creates playlists for the respective time of day, be it morning, afternoon or late at night. It does this by using tracks that have already been played at those times, and adding tracks with sonic similarities to this framework. 

It even uses artificial intelligence, but not to generate the playlist itself, just to reformulate the names and descriptions of the new playlists.

There are many enthusiastic voices on reddit\/plexamp, even Elan Feingold, one of the founders of Plex, has commented positively - so it's worth giving it a try. 

Tuesday, November 12, 2024

Importing playlists and importing ratings into plex

 

I was recently asked again whether it is possible to import a playlist in .m3u format that exists outside of plex into plex. Also on a regular basis plex users ask whether it is possible to sync track ratings to plex. I have discussed those issues in my blog a while ago but it may be helpful to revisit them now.


Unfortunately, both is not possible out-of-the-box, but there are workarounds. I would like to describe one possible way here. 


Importing playlists

Let us start with importing playlists. Since plex is very picky, you have to proceed very carefully though. The success depends on a number of factors that may be different for each user. That is probably the reason why plex does not offer importing playlists in the first place. 


First of all, it depends on whether plex is running on a Windows or Linux device. In my case, plex runs on a Linux device. So take care that all paths, be it to the .m3u file or  those in the .m3u itself to the .mp3-files comply with Linux conventions. Change the root and any backslashes if you are working in a windows environment for example with the editor. 


Secondly,  I am assuming that the tracks are already in the Plex database and are located at the place mentioned in the m3u. If this is not the case, plex cannot recognize the tracks of course. 


Thirdly, make sure that your .m3u is located somewhere within the folder structure of the Plex library you want the playlist to be added to. If this is not the case, plex cannot see the m3u. 


Now you can use either a curl command or a python script (to be found on github) to import the playlist. I recently tested jaylex32's 's Syncra and it worked well (just make sure that the path to the .m3u is correct, if you are running the .exe on a windows machine. It'll give you a path to the file in windows format and that won't work for a plex server on a linux machine.  


As it may take a while for larger playlists to appear in plex, you may want to reload the playlist view in the web view. 


Importing track ratings

If you want to sync track ratings from the outside world into plex, your first step would be to create one playlist for each rating value, for example one playlist for all your tracks with a Five-Star-Rating. With this playlist, follow the steps to import the playlist to plex. 

As soon as you can see the new playlist, convert it to a collection. You may want to use Casvt's "playlist_to_collection" script for that which is also on github. Once you have the collection, you can tag all the tracks with the rating of your choice. 










Wednesday, May 22, 2024

Sonic Adventure: How to save it as a playlist and more

 




One of the best features of plex and plexamp is the ability to create a smooth audio journey starting with one track and ending with another after an hour or so. You need a server which is able to do a sonic analysis of the tracks in your library and a plex pass to enjoy the feature. 

If you are happy with the journey, you may want to save the track sequence for later which you can do in plexamp by hitting the three dots at the bottom and save the queue as a playlist. 

Or you can create such a playlist right on the server by using a bit of python. This could prove useful, for example, if the two endpoint-tracks are to be determined by certain criteria, such as their genres, certain moods or the date they were added to the library. Here is a link to a script where the user enters the titles of the start and end tracks and has the opportunity to apply filters such as the user rating, the play count or the track genre. Keep in mind that these filters will shorten the resulting playlist, so the outcome very much depends on the size of your library and the filters you apply. If you want the original length of the playlist, leave all filters simply blank. 

Thursday, May 9, 2024

How can I sort the albums in a plex music library in all artist views by regular albums, live albums and compilations in just a few minutes?

 


 . 

Some time ago I mentioned in a post the possibility of choosing between normal albums, live albums, compilations and singles/EPs in the artist view of plex. This is possible because plex can read the RELEASETYPE tag of the audio file. The whole thing looks quite nice, but that is not all. In the plex library, album view, you can filter according to type, e.g. Compilations, Live Albums, Remixes and so forth and also according to format, e.g. album, single, EP. Plexamp, of course, can look at that as well when creating a playlist. 


Those who prefer the differentiating view are faced with the problem that albums already read by plex often have no corresponding tags. This can be done manually with an editor, e.g. mp3tag, but you have to be very careful that you enter the tags exactly as required (e.g. "album;compilation" for a compilation) plex is very picky. Then you also have to refresh the album. This takes a while, first the album disappears from the row of normal albums, then it is sorted correctly with a little delay when you refresh the view. 


However, you can also automate the process using a python script. The python script asks for the name of the album, changes or adds the 'releasetype' tag in the metadata of mp3, flac and mp4 files and finally refreshes the album in plex so that it is regrouped as a live album, compilation or single/EP. The python script is available here


Sunday, December 17, 2023

Track genres have arrived. But now?

    

                

I would always recommend Plex as a music server in combination with the Plexamp app. 

However, there are some weaknesses. One of them is that it doesn't read the genre tags of the tracks at track level, but only at album level. This means that you cannot distinguish between the piano-accompanied ballad and the dance track on the same album.

Nor can you filter out the occasional Christmas song on an album or, conversely, elegantly add it to a Christmas playlist. 

As a workaround, however, you can use the mood tags, which can be edited at track level and are available for search functions.
If you don't want to do this track by track, the question arises as to whether you can quickly bulk tag the tracks to be tagged with a mood.

Is it christmas? How can I quickly tag many tracks with "christmas"?


You can do this by creating a playlist in the plex web app, for example with all tracks that have the word 'christmas' in the album or track name. You can then use a python script to tag all tracks in the playlist with the mood tag 'Christmas' (as a replacement for the missing genre tag). You can use this script, for example. 

In its latest version, plex recognizes track genres. However, at the moment they can't be edited in the interface. You can edit them in software like mp3tag and refresh the album though. Finally, editing is possible in plex web. Click on the stylo of the track and go to tags. If you don't have genres there, you are either on an older version of plex web or on a local version which has not been updated. 

Where are the track genres to be seen?

You can use the track genres as filters for say, a playlist which excludes some genres like Christmas or Classical Music. Go to library, tracks and you are able to list all tracks who have a particular genre or create playlists and collections using them as filters. 

However, you cannot see the filters in the album view. As a workaround, you can use python code to see and also to modify the genres. Here's some quick and dirty code which offers the missing album view.




Saturday, December 16, 2023

Create your own Radio: Here's how:

   

                

Plexamp is a wonderful companion app to listen to music in your plex library. You can create artist's radios, album mixes, or track radios.

But once you've worked up an appetite, you'll want more: 

You can't create radios in plex web, the sonic proximity to the source tracks can't be determined and you can't combine two tracks or two artists. You also can't rule out the possibility of tracks heard in the last few weeks reappearing, etc. 

But wait, all this can be achieved with a python script.

An example can be found with 'Plex TraxRadio' on my github pages. The script stores in a plex playlist some tracks of the artist the source track comes from and adds sonically similar tracks of a certain distance. I also remove possible duplicates and take into account the rating of the tracks. In the published version, no tracks with a bad rating are included, but unrated tracks are. 

Have no fear...


It should be said again that I am not a professional coder, quite the opposite. Most of it was created in interaction with ChatGPT...

The possibilities with python are almost endless. For example, you could also take into account the genre(s) and much more....