Any way to import playlists?

A 404 HTTP response is most probably an incorrect URL specified in postman. The URL should start something like:
http://{IP of your Synology}:32400/playlists/upload?
That’s the path (endpoint) on which PLEX is listening to receive your request to upload your playlist. The rest of the URL is parameters it takes to process the request, such as the path, section, etc.

Hey @gregchak, thank you for your reply. Please look into that URL:

http://192.168.0.27:32400/playlists/upload?sectionID=6&path=/volume1/Archiwum/Muzyka/Single/Playlists/lista.m3u&X-Plex-Token=CE3XD9Zbqi8Xs4rF2szf

To me, it looks fine, but I could be doing something completely wrong. I retrieved section ID and plex token from the url of an XML file from my library.

The URL looks correct to me.

Under Settings -> Network in PLEX there’s an option for “Secure Connections”. Is yours set to “Required”? If it is, I’m wondering if you have to use https rather than http. If your PLEX requires https and you’re sending http that could also result in a 404 HTTP response.

I had it on “preferred” and tried again with http and https prefix but got the same thing. Once I switched to “required” and sent a post with http I got this message: Could not get response
So I guess that’s not the issue.

Yeah, was just a suggestion. I wasn’t sure if that would work or not. From the responses you’re getting back, It definitely sounds like you’re hitting PMS on your Synology but it doesn’t like the path you’re using. When you log into PLEX using a browser, what is the URL? Maybe the installation on your NAS has a virtual directory in the path somewhere? I don’t have much knowledge on NAS installations so I don’t know what the setup process is like for that.

For example, mine looks like this:
https://192.168.123.234:32400/web/index.html#!/

that doesn’t seem to be the issue, I access mine via a similar link, just different local ip:

http://192.168.0.27:32400/web/index.html#!/

I was messing around with some settings this morning trying to get my PMS to send a 404 response. I was able to get a 404 response by sending the request with an incorrect action type. Make sure that your request from Postman is sent as a POST. I believe the default action type when creating a request in Postman is GET and if you’re sending your request as a GET it will return a 404 HTTP response.

image

I actually tried this earlier, but it also spilled out an error. But I did it again just now and noticed that now it’s a different one. For post, I get the 404 not found one that I showed you earlier, but for get, i get this:

<html>

<head>
	<title>Internal Server Error</title>
</head>

<body>
	<h1>500 Internal Server Error</h1>
</body>

</html>

This was with the directory pointing from the perspective of my NAS server which is Linux based so something like this:
/volume1/Archiwum/Muzyka/Playlists/lista.m3u
then I pointed to the same directory but from the perspective of the windows based PC I’m running, so:
W:\Muzyka\Playlists\lista.m3u
Cause I have my NAS mapped in windows explorer as a W drive.

And got no message whatsoever:
Przechwytywanie

But above the message box, I get this:

Przechwytywanie2

The playlist has not shown up in my library though, but I guess we at least have a connection and we can read what is happening from the logs?

Definitely a step forward. The 200 HTTP response means that PMS was able to successfully receive your request via Postman. Unfortunately, since I think this is an asynchronous process, that’s the only response you get. It doesn’t send the result of the processing.

Now that you’ve been able to successfully submit a request, you’ll need to look at the logs and see where the processing of the playlist is having problems. It most probably has to do with the path to the m3u file. And then in your m3u file, the file paths to your music files need to be absolute paths.

What is the path to your music library on your NAS?

Ok so the path to my library on the NAS is /volume1/Archiwum/Muzyka
The path to my m3u is /volume1/Archiwum/Muzyka/Playlists/lista.m3u
And the m3u file itself in txt looks like this (just a couple of random tracks from my library):

W:\Muzyka\Single\Borgore, Tima Dee, Tisoki - Sad B tch - Tisoki Remix.mp3
W:\Muzyka\Single\Justin Bieber - Hold On.mp3
W:\Muzyka\Single\Marcus Santoro, ESH, Blush - Running - ESH Remix.mp3
W:\Muzyka\Single\Karra - Underwater.mp3
W:\Muzyka\Single\STUBBVRN, Capturez - The Clock.mp3
W:\Muzyka\Single\Uppermost, Fūji - Deep Space.mp3

Here are also the logs I copied from the console right after issuing post command. I deleted my email from the logs, just so you know why there are ***** at certain moments.

logs.txt (6.2 KB)

From the info your giving, I would have a URL that looks like this:
http://192.168.0.27:32400/playlists/upload?sectionID=6&path=/volume1/Archiwum/Muzyka/Playlists/lista.m3u&X-Plex-Token=CE3XD9Zbqi8Xs4rF2szf

Note the path in the above URL. The path you mentioned in your last post is different from the path you had in a previous post where you showed the URL you were using. The word “Single” was removed in your last post.

The contents of your m3u would look like this:

/volume1/Muzyka/Single/Borgore, Tima Dee, Tisoki - Sad B tch - Tisoki Remix.mp3
/volume1/Muzyka/Single/Justin Bieber - Hold On.mp3
/volume1/Muzyka/Single/Marcus Santoro, ESH, Blush - Running - ESH Remix.mp3
/volume1/Muzyka/Single/Karra - Underwater.mp3
/volume1/Muzyka/Single/STUBBVRN, Capturez - The Clock.mp3
/volume1/Muzyka/Single/Uppermost, Fūji - Deep Space.mp3
1 Like

Single folder is for singles that I have, so that’s /volume1/Muzyka/Single directory
Playlists are intended for playlists that I’ll create - /volume1/Muzyka/Playlists
And I’m scanning the whole /volume1/Muzyka as it also contains another folder for albums. Maybe that’s the issue that I’m scanning higher up in the hierarchy?

I don’t quite know how to proceed with this. As I discovered in the previous post, pointing to a Linux directory would give me 500 Internal Server Error; only using windows directory works. I guess that’s because postman has to retrieve the playlist to send from the PC I’m on.

I manually changed the m3u in a text editor for good measure, so it follows Linux directories as in your post, but that didn’t change anything, unfortunately.

Postman doesn’t actually upload the file to PMS. If it did then you’d need to specify that as part of payload in the request, which we’re not doing. The path specified in the URL is the path to where PMS will look for your playlist file; meaning it s relative to your PMS. So giving it a path on your Windows client isn’t going to do anything. Specifying a path on your Windows client doesn’t throw an error, but specifying any invalid path will still give you the same 200 HTTP response. The lack of proper response handling is definitely a drawback of this process, but its all we have to work with at the moment.

When you got the 500 error, was the m3u file updated to point to the linux paths? I would execute it again using the Linux paths in both the URL parameter and as paths in your m3u file and see what you get both in HTTP response and in your PMS logs.

As far as the paths go for scanning, I think you have it setup correctly with your music library in /volume1/Muzyka and all of your playlists and music files underneath there.

1 Like

It worked! Finally! Thanks for explaining how that thing works. That makes total sense.
I pointed to /volume1/Archiwum/Muzyka/Playlists/lista.m3u to the file with addresses from the NAS perspective. I thought I did that earlier while writing a previous post, but I had to make an error of some sort.
Now I have another issue. The way I use playlists is that I have musicbee on my pc and make playlists there. The playlists made on my pc point to the windows directory. Is there any way to easily convert it to the desired Linux-based address? Maybe a script or something?

EDIT: I managed to figure that part. Musicbee has a way to export m3u files with unix based paths. Works perfectly!

Again, thank you very much, @gregchak, for the help and explanation of how things work with postman and pms. I appreciate the time you took to help me figure it out!
About the program for importing playlists you’re working on - once you have something, feel free to send a pm, and I’ll happily test it out!

Happy to help! So glad you were able to get it working. And glad your playlist app has the flexibility to change your paths.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.