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.