Monday, December 12, 2022

 workarounds

Tags

You can of course let plex do all the work for you. But if you have your music tagged properly, you'd rather want plex to import your tags. You should instruct plex to do so under library settings: prefer local media. 

Genre

Plex differs from ID3tags in your tracks as it recognizes genre tags on the artist and the album level but not on the track level. However, the album genre is derived from the track genre if the tags are imported from your local media assets. 

If you want to assign the album to more than one genre, make sure that the id3tag genre uses the divider ";". Example: 

ID3tag: "Pop"           -> Plex shows "Pop"
ID3tag: " Pop/Rock" -> Plex shows one genre only: "Pop/Rock"
ID3tag: "Pop; Rock" -> Plex attributes two genres: "Pop" and "Rock"




Tuesday, November 29, 2022

Plex for Music: Ratings Workarounds

 

Plex is a great personal streaming service when you use plexamp. Especially if you are using lossless flacs, it can easily replace spotify. However, you soon realize that plex has been created with movies and not music in the minds. I played around with plex in recent months and like to share my experiences with plex and some third party tools or workarounds which can be a great help to improve listening experience even further. 
 
 A word concerning my setup: I use plex on a Synology Nas with an ARM-Processor, so no Docker Installation, no Supersonic functionality on plexamp. At home, I use a Windows Machine to access the plex installation via web. Same applies when using an ipad, either I listen to music, then I use plexamp or I fiddle around, then I access via web. The Ios app of plex just works fine for playing movies (which I don't use much). 


Ratings

How to Save Ratings in id3tags
Plex offers a great way to rate your tracks, for example on the way by using plexamp. The ratings are saved in the database though and not in the id3-tags of the files. You could change that by syncing playlists with your current ratings in plex with your file system, the process is described in my post on playlists. 

How to assign Ratings in a playlist-collection
Say you have a playlist and you want to mass tag all tracks with the same rating. Plex doesn't allow assigning properties like song ratings in a playlist. The workaround is to transform the playlist into a collection. I have described the process in my post on collections. UPDATE: You can also use a python script specifically written for that usecase which can be found here.

Plex for music: Compilations Are your tracks tagged well enough?

 

Plex is a great personal streaming service when you use plexamp. Especially if you are using lossless flacs, it can easily replace spotify. However, you soon realize that plex has been created with movies and not music in the minds. I played around with plex in recent months and like to share my experiences with plex and some third party tools and workarounds which can be a great help to improve listening experience even further. 
 
 A word concerning my setup: I use plex on a Synology Nas with an ARM-Processor, so no Docker Installation, no Supersonic functionality on plexamp. At home, I use a Windows Machine to access the plex installation via web. Same applies when using an ipad, either I listen to music, then I use plexamp or I fiddle around, then I access via web. The Ios app of plex just works fine for playing movies (which I don't use much). 

The issue with Compilations


It is a well known issue that plex can't handle compilations well. The reason is that the track artist is just a text field and not a usable attribute in the database. 

If you want to keep your compilation as one album, you have to tag the album artist as "Various Artists". In this case tracks will not show up on the artist page. At least you can search for the artist and that will give you also the tracks of a compilation as separate tracks. 

How to mass-tag missing track artists


One caveat though: You should have your tracks properly tagged, with both Various Artists in the album artist field and the name of the artist in the trackartist field. 

Say you have been missing out and you'll have quite a lot of tracks without a trackartist. The search will not render the expected result. If you don't want to go into every single track and fill in the track artist, you can use a mass tagger like mp3tag and import the appropriately tagged tracks back to plex. 

First, go to your music library and filter all tracks with missing or false id3 tags. For example, let plex show you all tracks with the album artist "Various artist", then sort by track artist and mark those tracks without a track artist assigned. 

 Create a playlist with those tracks. Then export the playlist as described in a previous post, import it into mp3tag and update the tags. As a last step, let plex read the updated tags. 

VoilĂ : Plex search should now find those tracks as well. 


Playlists vs. Collections

In case you wondered: What is the difference between playlists and Collections?
One thing I find the most striking is that playlists are based on tracks whereas Compilations can show either tracks or whole albums. 

If you want to reorganize your files grouped in a playlist, you will be disappointed: playlists don't offer any possibilities to manage the items. Collections are more flexible: You can change properties both on a collection level for all items but also on the individual item level. 

Transform playlists into collections and vice versa

If you want to transform a collection into a playlist, you can do so by using the context menu. But there is no way to do the opposite on the web interface. However, you can use a script by casvt on github.

Once you have figured out how to use python script, the process is fairly easy.  

1. copy the script to your machine to a folder, i.e.  PlexScriptsMisc
2. identify your plex-server-ip, your plex-port (mostly: 32400) and your individual X-Plex-Token, fill that into the script and save.
3. Start PowerShell and change to that folder: cd C:\Users\....
4. Create a virtual environment: python -m venv pmm-venv) and activate: .\pmm-venv\Scripts\activate
5. Install requirements:: pip install requests
6. make use of optional arguments:  

  -h, --help            show this help message and exit
  -l LIBRARYNAME, --LibraryName LIBRARYNAME
                        Name of target library (i.e. "music ")
  -p PLAYLISTNAME, --PlaylistName PLAYLISTNAME
                        Name of target playlist (i.e. "No1s")
  -r, --RemovePlaylist  Remove source playlist afterwards

7. : run: python playlist_to_collection.py  (i.e. "python playlist_to_collection.py -l "music" -p "No1s")



Plex for music: Show codecs on the cover

 

Plex is a great personal streaming service when you use plexamp. Especially if you are using lossless flacs, it can easily replace spotify. However, you soon realize that plex has been created with movies and not music in the minds. I played around with plex in recent months and like to share my experiences with plex and some third party tools which can be a great help to improve listening experience even further. 
 
 A word concerning my setup: I use plex on a Synology Nas with an ARM-Processor, so no Docker Installation, no Supersonic functionality on plexamp. At home, I use a Windows Machine to access the plex installation via web. Same applies when using an ipad, either I listen to music, then I use plexamp or I fiddle around, then I access via web. The Ios app of plex just works fine for playing movies (which I don't use much). 

Show codecs on the cover 


 For starters, plex doesn't care about the codec as it can easily convert high bitrates into bitrates fit for streaming. But if you have started to rip your CDs years ago, it is likely you have started with mp3 rips and turned to flac in later times. Is there an easy way to see whether you have a lossless version of your album or even have encoded once in mp3-quality and later on in lossless quality? First of all, you should add "flac" to all album titles with flac rips. I used Mediamonkey for that and let plex scan my library again. If you want to have a nice cover with a codec ribbon like that
you can use the awesome plex media manager for that. Go to https://metamanager.wiki/en/latest/ where the installation process is explained in detail. As of 11/22, applying an overlay to album covers would give you distorted images if you use the master version of PMM. However, if you use the nightly, that has been corrected. You need to write your own "overlay-music.yml", but if I could do it, you can as well.

Tuesday, November 1, 2022

Plex for music workarounds: How to import or export playlists

Plex is a great personal streaming service when you use plexamp. Especially if you are using lossless flacs, it can easily replace spotify. However, you soon realize that plex has been created with movies and not music in the minds. I played around with plex in recent months and like to share my experiences with plex and some third party tools and workarounds which can be a great help to improve listening experience even further. 
 
 A word concerning my setup: I use plex on a Synology Nas with an ARM-Processor, so no Docker Installation, no Supersonic functionality on plexamp. At home, I use a Windows Machine to access the plex installation via web. Same applies when using an ipad, either I listen to music, then I use plexamp or I fiddle around, then I access via web. The Ios app of plex just works fine for playing movies (which I don't use much). 

 Playlists 


 If you are wondering how to create a playlist in plex, don`t go to playlists on the dashboard. You would only find existing playlists there. To create a new playlist, go to the music panel, use the drop-down menu starting with "all", go to the very end and you'll find "Custom Filters". With them, you can create your playlist and don't forget to save the playlist. The whole process is described very well on https://www.ryananddebi.com/2019/08/26/plex-how-to-create-smart-auto-updating-music-playlists/. 

Say you'd like to import an existing playlist on your computer to plex, you can't do that out of the box but have to use a third party tool. Be advised: This is not a simple process but requires some effort and the willingness to use the power shell of windows and get aquainted with software hosted on github. There are several projects around to import playlists. For me, the playlist-importer on https://github.com/gregchak/plex-playlist-import is fine, because, once the setup is done, it has an interface.

The setup can be a bit tricky. Make sure that the paths conform to your setup. For a linux server, the path to the m3u file must use slashes (/). Also make sure that plex can find the file, i.e. it must be in a folder, the plex library path points to. 
What regards the paths to the tracks in the m3u-file: Have a look at the track info within plex to see how the path should be written, for a linux server, the path must have slashes. 
Lastly delete any extra lines in the files like  "#EXTM3U" or "#EXTINF: ..."  which are sometimes written by programs like mp3tag when creating a playlist. 


Exporting plex playlists to your machine should also be possible. One alternative is the semi-official plugin WebTools NG to export lists of your media with all metadata.
Go to https://github.com/WebTools-NG/WebTools-NG/wiki/Export. You'll get a database which shows inter alia the artist name, the track name and the full path seen by plex. Once you have that, you can create a .m3u playlist (be sure to alter the filepaths accordingly!) which can be played by any player software. 

There is an alternative way to export a single playlist by using commands in your webbrowser. You a need to know the ip-adress of your server, its port and your personal plex-token. If you don't know about the latter, go to the official plex support web pages

One more thing is required: the id of the playlist. You can find that out by using the following command structure in your browser: http://(yourserver_ip:port)/playlists?X-Plex-Token=(yourpersonaltoken)
Example: http://123.456.789.99:32400)/playlists?X-Plex-Token=12345abc678de

The result is an xml list containing the information on your playlists. 

If you have the playlist id, use the following command structure:  http://(yourserver_ip:port)/playlists/(playlistid)/items?X-Plex-Token=(yourpersonaltoken)

Save the contents into a newly created .xml file, open it in Excel and search for the path of your library items. Then copy this column into a newly created .m3u file. 

Last step: Change the paths. In my case, the paths in plex do not match with those on my windows pc. You can use an editor to change the paths by using the search and replace commands. As my plex server runs on a NAS, I have to substitute slashes for backslashes and change the folder structure.

Synchronise ratings 

If you use plex to listen to your music but use a software like mediamonkey on your pc, you would probably like to synchronize ratings. You can do that by creating playlists for example with *****-star tracks and exchange the playlists by using the aformentioned process.

Edit: Alternatively, use a python script to export your ratings directly to the files. This can be done even if you have no deep knowledge of python. See my post on that.