Home Page
  • March 28, 2024, 09:08:05 am *
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Official site launch very soon, hurrah!


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Skipper42

Pages: [1]
1
Projects / Re: Plex Playlist Importer
« on: July 04, 2016, 03:15:18 pm »
The latest ListImporter version for Windows works like a champ - thanks!I've successfully tested with:
  • Both relative and absolute paths to track files in the m3u
  • With m3u's exported from MediaMonkey (aka MM; ver 4.1.12.1798; I'll let you know if this changes with the latest version, 4.1.13.1801)
  • With m3u's exported from Mp3tag, and
  • With m3u's exported from my iBasso DX90.
I confirmed that byte order no longer matters; I no longer have to go thru the extra pass through EditPad Lite to drop the BOM.If an actual file cannot be found from its m3u reference, I've confirmed that ListImporter correctly notifies the user of the path and filename of the file it cannot find (with one exception; please see below).If errors are encountered, ListImporter correctly sets Errorlevel so it can be checked in a batch file. Thus, I can use this to avoid prematurely archiving failed import playlists until the issues are resolved.I've not found a good way to execute ListImporter from a folder not containing both the .exe and all its .dll files. This would be useful but is not essential. I do have to manage Acronis' insistence on restarting one of its supposedly unneeded services that uses a different sqlite3.dll. The sqlite3.dll used by the latest version of PMS no longer conflicts.I did find a couple of small residual issues plus a couple of what you're free to view as extremely minor quibbles.The first of two small issues is that ListImporter is intolerant of blank lines in the m3u (e.g., at the end). This leads to the mysterious error message that the track file must be located relative to the playlist, but since the reference line is a blank, there's no file reported. Took some lengthy trial and error to find what was causing the glitch. I'll note that part of my confusion was that the same error message ("relative to") appeared irrespective of whether I was using dot notation relative paths or absolute paths for the track references (I suspect this is a holdover from versions prior to those permitting absolute path references).The second small issue is that any error in one track reference causes the entire import to abort with Errorlevel set to 1. That meant the original m3u with one or more blank lines would abort, while trying to identify the problem track reference by successive runs each with a new reference added from the original always was successful. That's actually how I tumbled to the blank line intolerance.My benchmark for whether the m3u had valid references has been Florian Heidenreich's excellent freeware Mp3tag (http://www.mp3tag.de/en/). In sum, if Mp3tag can import all the rows successfully, then I can safely assume the m3u is valid; it reports any track files it cannot find. That means anyone should be able to debug issues with ListImporter using Mp3tag to test the m3u's track file references for validity (plus verifying that the track files can be played independently in Plex).I also use Mp3tag to convert relative paths in m3u's to absolute or relative paths matching the location of the m3u file to be imported to Plex. MM's relative paths are relative to where the m3u is originally stored). MM is a far richer playlist editor/maker than Plex, so combining your tool with my methods gives me the best of both worlds.The .mte export configuration file I use in Mp3tag is:$filename(<path>\to_import\Plex.m3u,utf-8)$loop(%_counter%)%_folderpath%%_filename_ext%$loopend()...with care to have the file end after the $loopend() statement so as not to generate the blank line that ListImporter thinks is an invalid track reference. In my case, E:\Users\Public\Music\My Playlists\! Plex Playlists\ is the folder also containing the ListImporter .exe, .dll's and ppibatch.bat file.Once exported, I rename Plex.m3u to whatever I want the playlist name to be. Note: to export with relative vs. absolute paths, change %_folderpath% to %_folderpath_rel%, tho ListImporter always worked irrespective of which was used.The two minor quibbles are (a) execution message output appears to go to stderr vs. stdout, which can interfere with batch file output piping for logging/analysis purposes, and (b) delays/problems updating the track length once the playlist has been imported into Plex (an issue I noted in a previous post).The batch file I use (ppibatch.bat, attached) presumes the m3u playlists to be imported are in a particular 'to_import' folder, and if the import of each is successful, the m3u file is moved to an 'imported' folder in the same hierarchy.In the batch file, I used UTF-8 encoding, but set it explicitly in the command line vs. relying on the default. Ditto the file type setting (explicitly 'mp3' vs. default). These were more for self-documentation than any requirement to do so; worked fine with the defaults. Ditto the location of the Plex database.When piped to a log file, each execution in my batch file generates an entry of the following form:Sat 07/02/2016 14:38:28.48PlexPlaylistImporter.exe -f -e utf-8 -t m3u "<path>\to_import\5hr Playlist.m3u" "5hr Playlist"73 items imported        1 file(s) moved....showing there could be value in having error messages, etc. in the consolidated app+OS output also.The track length update problem seems to be avoidable if one turns on frequent Library updating and updating of the Library with any change to the Library, prior to importing the m3u. If that's not done, the track lengths of some tracks remain at 0:00 after import. This also means the overall playlist length will be misreported until each of the 0:00 tracks is launched and another track launched afterward, at which point Plex updates the playlist track length entry and overall playlist length. Even forcing Library updates failed to update the track and playlist lengths.I cannot tell from info available to me here whether the track length update problem is a Plex bug/feature (they clearly have yet to envision importing m3u playlists, and thus without your tool would have no way to test for this bug!) or whether there's some other additional Plex database field references that need updating in your update query SQL (e.g., possibley a field in a different table from the main Playlist records). Regardless, once I turned on frequent Library updating/updating after every change, the problem seemed to disappear.With all that in mind, and given the general end-to-end utility now available, I recommend you post an update to the Plex Forum that details these working methods. Please feel free to share my Mp3tag export .mte above and batch import method's .bat file attached in your post.Thanks again very much for all your efforts here. This has now made Plex finally usable for me!

2
Projects / Re: Plex Playlist Importer
« on: June 20, 2016, 08:52:25 pm »

A. I'm as sure as I can be with the tools at my disposal that these .m3u's are UTF-8:
1. They're exports from Mp3tag, which allows me to establish the output character set in the .mte export spec (attached). It's set to UTF-8.
2. Notepad reports they're UTF-8.
3. I used EditPad Lite to force the text file to be no-BOM, UTF-8.

B. I'm certain the underlying .mp3 files are present in both the library at the location found and are individually playable in Plex (and thus in the Plex Library). The .mp3 files appear in all Plex Library listings irrespective of filtering (Album, Artist...).

C. I'm using your Windows .exe only; I do not have Python running separately. I'm running in a Win 7 x64 environment, in case that matters; machine resources should not be an issue (quad-core i7, 32GB RAM).

D. The longest playlist I've tried to import (5.5hr running time) has only 73 tracks, but I appreciate the heads-up on the 150 track limit.

E. Also attached per your request is a fragment of the playlist with the problematic character set entry described above.

Hope this helps. Thanks again very much for your efforts.

3
Projects / Re: Plex Playlist Importer
« on: June 13, 2016, 05:53:42 pm »
Well, I solved (kindasorta) the basic problem of BOM inclusion by installing EditPad Lite (freeware, unlike the Pro version), which permits me to create (Options menu) an M3U file type and specify UTF-8 and no BOM, and to replace the existing BOM with none if found. I can then open an .m3u created in another app (e.g., MediaMonkey, mp3tag, Notepad) and resave it with no BOM.
Unless there are character codes beyond the basic alphabet (see below for a description of this newly discovered problem), the .m3u will then import successfully...
...kindasorta. After the first two successful playlist imports, PMS stopped displaying the total duration (length) of the playlist, reporting only 'x Items' where x is the track count. Further, when the playlist is opened in Plex, all the track lengths are shown as 0:00. A quick check with mp3tag showed the metadata for length as indeed being included in the .mp3 file, and when one browses to the album in Plex, it, too, has the track length correctly shown. In both cases -- playlist or music browse -- Plex plays the track correctly. Interestingly, once a track has been played from the playlist, suddenly PMS finds its brain and correctly displays the track length on the Playlist page. There's no Refresh opportunity in the Playlist dialogue to force this otherwise. After the track lengths are displayed correctly once, they're displayed correctly henceforth, along with the overall playlist length on the main Playlist browse page. I noticed that it took a while for the data to propagate there, however. Even after playing all tracks in a 1:46 duration playlist (duration doesn't matter, simply starting each track is sufficient to update the track length display after a few seconds), the initial value shown for playlist length upon return to the main Playlist page was 20 minutes. Returning to the track listing for the playlist showed that indeed all the track lengths were still there, and on return up to the main Playlist page, suddenly the duration was the correct 1:46 value.
I'm unable from where I sit to determine whether this is a PMS bug or a PPI problem; perhaps there's a missing commit in the PPI SQL update query for the track metadata records, and absent some refresh mechanism, takes PMS a while to update itself?
Now on to the character set/codespace problem.
If the path (artist, album) or track filename contain other than basic alphanumeric characters thru ~ (code < 128 or 007F), then you run into problems like the following, where PPI can't find the track .mp3 to get its metadata:
Actual mp3 file record in m3u playlist:<path>\Music Library\Saint-Saëns\Violin Concerto No. 3\02 Romance for violin & orchestra in C major, Op 48.mp3
PPI import error:ListImporter 'Winamp playlist': Cannot find file listed in playlist (must be relative to the playlist):<path>\Music Library\Saint-Sa\xc3«ns\Violin Concerto No. 3\02 Romance for violin & orchestra in C major, Op 48.mp3
In this case, the e-umlaut (ë) has a decimal character code of 235 (+00EB).
Doesn't matter whether <path> in this example is relative ("dot notation") or absolute (<drive letter>:<folder path>). Just FYI - the error message always says "relative" even if absolute path addressing is used (likely an artifact of your absolute addressing quick fix).
Since PMS correctly renders the special characters and correctly finds and plays the track, and since other apps (MediaMonkey, mp3tag, Notepad, EditPad Lite) correctly find/render/play the .mp3 file, this flaw appears to be inside PPI.
I checked and it also doesn't matter whether the character set used is UTF-8 or Western European.
This would seem thus that PPI's character set issues are larger than just ignoring the UTF-8 BOM in an .m3u file.
I know that's not good news, but do hope there's enough info here for you to diagnose and correct the bug; I've made enough progress with a handful of successful playlist imports to be excited about the prospect of overall success!
Thanks again for all you've done on this.

4
Projects / Re: Plex Playlist Importer
« on: June 11, 2016, 07:56:24 pm »
For some reason, I'm unable to reproduce the working import function with other m3u playlists.
I'm getting the same gibberish characters as the earlier poster (Clowg) at the front of the first line; switching to relative paths from absolute paths doesn't help. Doesn't matter whether the line is blank or an actual reference to an mp3 file. The references are correct; I've verified that with Explorer.
I've used mp3Tag, Notepad, and Wordpad all. Saving as UTF-8, Unicode, Unicode Big Endian... none of that changes the outcome. I'm also not getting the prompt to create the new playlist.
Here's what I get:ListImporter 'Winamp playlist': Cannot find file listed in playlist (must be relative to the playlist): E:\Users\Public\Music\Music Library\<artist>\<album>\<song>.mp3
Also doesn't matter whether I'm running from the command line, from a batch file, or where the playlist file is relative to PlexPlaylistImporter.exe. I'm specifying in the command line the filename of the playlist, the playlist name, and the file path and name of the PMS database. Doesn't matter whether or not PMS is running.
Finally, mp3Tag has no problem finding the associated mp3's from the playlist when opening the playlist .m3u in mp3Tag.
Hope this helps you diagnose the fault.
Thanks!

5
Projects / Re: Plex Playlist Importer
« on: June 09, 2016, 02:01:55 pm »
Googled the problem and found this:
https://www.sqlite.org/fts3.html#section_2
  • If a build of SQLite does not include the FTS modules, then any attempt to prepare an SQL statement to create an FTS3 or FTS4 table or to drop or access an existing FTS table in any way will fail. The error message returned will be similar to "no such module: ftsN" (where N is either 3 or 4).
Since that seemed to suggest the sqlite3.dll in your executable binary distro was built without FTS4, I hunted down an x86 version that did (the x64 version didn't work, since your app is x86, apparently). After putting the DLLs, the executable, and the importing .m3u all in the same directory...
IT WORKED! I now have the test .m3u successfully imported into the Plex Playlists, and it plays!
I can't believe the Plex folks cannot figure out how to do this on their own.  You're my hero for the day!
Many thanks for your patience, advice and hard work on this.

6
Projects / Re: Plex Playlist Importer
« on: June 08, 2016, 04:12:12 pm »
I've disabled the services using sqllite3.dll, rebooted, and confirmed those services are not running. I've also not started PMS.
When I run the batch file that launches PlexPlaylistImporter.exe, however, after answering 'y' to create the new PMS playlist, I get the same error:   Plex playlist is not already created. Would you like to create it now (y/n)? y   DB Error: no such module: fts4
I've verified in the Registry (HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs) and in Process Explorer that the sqllite3.dll in the PlexPlaylistImporter.exe folder – C:\Program Files (x86)\PlexPlaylistImporter – is not known to the system. The same is true of the python34.dll in the same PPI folder. It looks to me like the program is failing to find and load the DLLs.
Any suggestions?
Thanks!

7
Projects / Re: Plex Playlist Importer
« on: June 07, 2016, 05:16:32 pm »
Yes, the sqlite3.dll is in the same folder as the executable.
A quick check in Process Explorer shows three other active instances of two separate sqlite3.dll copies: - Backup software infrastructure component; I may be able to stop this service, reboot, and proceed without having the service restart, so it's at least something I can try. - PlexDLNAServer.exe - PMS
If I don't need PMS running when doing the import, this should be manageable. Both PMS and the DLNA server use the same copy in the PMS directory.
I'll note that a Win Explorer search found 9 separate copies of sqlite3.dll, all with different dates and sizes, including some not currently active: - PlexPlaylistImporter - PMS - MediaMonkey (which I'm using til I get music playlist imports to work in PMS) - Kodi (ditto; horse race for which gets there first) - Backup software - Security software
Thanks!

8
Projects / Re: Plex Playlist Importer
« on: June 07, 2016, 01:22:33 pm »
You're correct - I'm using your binary from here.

I copied all the content from the downloaded Zip archive to a corresponding folder: C:\Program Files (x86)\PlexPlaylistImporter\.

I don't have SQL Lite installed per se; I only have PMS (latest version) installed and running. Do I need to do anything else to ensure the correct DLLs get used?

Thanks!

9
Projects / Re: Plex Playlist Importer
« on: June 07, 2016, 01:29:38 am »
Background: running PlexPlaylistImporter.exe on the PMS host (Win 7 x64 SP1 fully patched, PMS 0.9.16.6.1993 - latest version).

Testing import of an m3u music playlist; edited to ensure full paths to all mp3 files including drive letter are in the m3u.

I get the prompt to create the new PMS playlist (it doesn't already exist), and after answering 'y' to the prompt, I get the following:
DB Error: no such module: fts4

Explicitly identifying the PMS database path and filename in the command line made no difference.

Do I separately need to install and run Python 3, or is the one on the (running) PMS sufficient?

TIA,
S

Pages: [1]