Showing posts with label playlist. Show all posts
Showing posts with label playlist. Show all posts

Sunday, August 31, 2025

From the treasure chest: Python scripts for specific use cases

 

         

Here are some interesting scripts that aim to help with organizing a music library and specific use cases. Not all may be plex specific, the scripts just caught my eye. Caveat: I haven't tried them out myself unless noted. If you try them, please leave a comment to help others. I plan to update this list from time to time.

Chromatix: Plexamp is an excellent mobile app which can run on desktops - but is not good at that. Chromatix is my favorite when I listen to a specific album. It has a nice UI with a lot of features - not the DJ's and the other stuff dependent on sonic analysis though. In use.

Plex-Music-Organizer: Exporting Plex music metadata and update tags from CSV within the database

Audiograde: Picks a random album, plays it to help rating its songs.

There are new projects to create playlists with the help of AI being released on github every day it seems. These are some interesting ones:


Plex-mcp-server: transforms libraries into AI-queryable databases.

Plexmix: AI generated playlists based on the library in plex. Generates mood, environment and instrument embeddings to filter by. 

plex-open-playlister: generates intelligent playlists using locally installed LLMs (Ollama). Mix of semantic, signal-based and traditional approaches (lastfm queries).

AudioMuse AI: Feature-rich sonic analysis and AI-powered clustering to create smart, tempo, mood and environment based playlists within Jellyfin and Navidrome. A plugin for Musicbrainz Picard fetches tempo and key inter alia.  No plugin for plex yet.




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. 



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. 

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.