Main Site Discussion > Projects

Plex Playlist Importer

<< < (2/10) > >>

Dakusan:
The new version I just uploaded should fix the problem, thanks for the report

clowg:
Thanks.  I just tried the new version.  I still get this error:

C:\7MC\PlexPlaylistImporter>PlexPlaylistImporter.exe  c:\7mc\Top501Songs.m3u Top500Songs "D:\Media3\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db"

ListImporter 'Winamp playlist': Cannot find file listed in playlist (must be relative to the playlist): ÿþ\ \ D o r i s 4 \ M u s i c \ R O C K \ D a v i d   B o w i e \ Y o u n g  A m e r i c a n s \ 0 8   -   F a m e . m p 3

So I tried re-saving the m3u file as UTF-8 format, and that changed the error to:

ListImporter 'Winamp playlist': Cannot find file listed in playlist (must be relative to the playlist): \\Doris4\Music\ROCK\David Bowie\Young Americans\08 - Fame.mp3

See the weird character before the server name?  Is that the problem?  There is no visable character there.  I tried adding a carraige return, but then the program errored with:

ListImporter 'Winamp playlist': Cannot find file listed in playlist (must be relative to the playlist): 

Make any sense?

clowg:
I just tried saving the m3u file as ANSI encoding, and now its getting further.  I get this error at what looks like the end of the process:

C:\7MC\PlexPlaylistImporter>PlexPlaylistImporter.exe  c:\7mc\Top503Songs.m3u Top500Songs "D:\Media3\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db"

Plex playlist is not already created. Would you like to create it now (y/n)? y
DB Error: unsupported operand type(s) for /: 'NoneType' and 'int'

Dakusan:
Ugh, I was noticing those non-path characters at the beginning of the songs you pasted on your first post and decided to assume it was a problem with your copying from your console and not the file. If you are actually seeing those extra characters before the error path on your console, those are byte order markers, which are placed at the beginning of text files to specify the text encoding the file is in. All of my m3u files were utf-8 encoded with no BOM, so I thought that was the format's official encoding specification. So if you save as UTF8 without the BOM, there shouldn't be a problem (UTF8 is ANSI/ASCII compatible, so what you did is fine too as long as there are no file paths with characters outside the standard ANSI range) . If this happens to other people I may look into fixing it, but dealing with text encodings can be a pita.

I don't know what text editor you are using (notepad++?), but I personally recommend Editpad Pro. It's list of options is inexhaustible, and it lets you specify options like encodings and BOMs on a per file-extension basis. [Edit: I always forget to mention, its Basic version is free, but is missing some important stuff like syntax highlighting :-\ ]

As for the next error, I received that for the first time last night too when adding the absolute paths code. However, when rerunning the script a second time, I was unable to reproduce the error, so I don't know what caused it. Can you try running the same command again and see if it works the second (or third? :-) ) time? If not, I'll try and see if I can reproduce, and if still not, we may want to exchange instant message information to get it figured out. My current first-thought guess is that it's having an issue getting the Playlist's ID after creating it, so since it is already created on the second run, it cannot run into that problem.

clowg:
Hi.

Ive tried the same command 2 more times and it produced the same error each time.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Reply

Go to full version