Bugzilla – Bug 3962
Moodlogic importer fails to scan playlists
Last modified: 2008-09-15 14:39:24 UTC
SlimServer Version: 6.5b1 - TRUNK - Windows Server 2003 - EN - cp1252 SVN revision 9034 I updated the Auto Playlists in Moodlogic and then told SlimServer to Rescan playlists only. Get the following: 2006-08-18 06:47:00.6566 Connected to database dbi:mysql:hostname=127.0.0.1;port=9092;database=slimserver - schema version: [2] 2006-08-18 06:47:03.8312 loading types config file... 2006-08-18 06:47:53.9718 2006-08-18 06:47:53.9720 ********************************************** 2006-08-18 06:47:53.9721 browsedb - hierarchy: playlist,playlistTrack level: 0 2006-08-18 06:47:53.9722 ********************************************** 2006-08-18 06:48:16.4856 Connected to database dbi:mysql:hostname=127.0.0.1;port=9092;database=slimserver - schema version: [2] 2006-08-18 06:48:16.8482 loading types config file... 2006-08-18 06:48:20.0812 Starting playlist folder scan 2006-08-18 06:48:41.4215 finished background scan of playlist folder. 2006-08-18 06:48:42.1926 ERROR: Can't call method "value" on an undefined value at C:\trunk\server/Plugins/MoodLogic/Importer.pm lin e 448. 2006-08-18 06:48:42.1931 ERROR: Backtrace follows: 2006-08-18 06:48:42.1933 Backtrace: frame 0: Slim::Schema::throw_exception (C:\trunk\server\CPAN/DBIx/Class/Schema.pm line 606) frame 1: DBIx::Class::Schema::txn_do (C:/trunk/server/scanner.pl line 165) frame 2: main::main (C:/trunk/server/scanner.pl line 282) 2006-08-18 06:48:42.3028 forceCommit: syncing to the database.
Fixed in change 9102
Dan I was able to test this tonight and running with d_info. CPU is pegged I'm getting: Use of uninitialized value in concatenation (.) or string at C:\trunk\server/Slim/Schema.pm line 893. 2006-08-23 01:23:04.6094 Merging entry for moodlogicplaylist:Unnamed readTags is: [] 2006-08-23 01:23:04.6127 Updating moodlogicplaylist:Unnamed : title to MoodLogic: Unnamed 2006-08-23 01:23:04.6153 Updating moodlogicplaylist:Unnamed : year to 0 2006-08-23 01:23:04.6177 Updating moodlogicplaylist:Unnamed : content_type to mlp 2006-08-23 01:23:04.6203 Updating moodlogicplaylist:Unnamed : remote to 0 2006-08-23 01:23:04.6228 Updating moodlogicplaylist:Unnamed : titlesearch to MOODLOGIC UNNAMED 2006-08-23 01:23:04.6254 Updating moodlogicplaylist:Unnamed : titlesort to MOODLOGIC UNNAMED 2006-08-23 01:23:04.6287 Updating moodlogicplaylist:Unnamed : rating to 0 Use of uninitialized value in concatenation (.) or string at C:\trunk\server/Slim/Schema.pm line 893. 2006-08-23 01:23:04.6395 Merging entry for moodlogicplaylist:Unnamed readTags is: [] 2006-08-23 01:23:04.6424 Updating moodlogicplaylist:Unnamed : title to MoodLogic: Unnamed 2006-08-23 01:23:04.6452 Updating moodlogicplaylist:Unnamed : year to 0 2006-08-23 01:23:04.6478 Updating moodlogicplaylist:Unnamed : content_type to mlp 2006-08-23 01:23:04.6503 Updating moodlogicplaylist:Unnamed : remote to 0 2006-08-23 01:23:04.6528 Updating moodlogicplaylist:Unnamed : titlesearch to MOODLOGIC UNNAMED 2006-08-23 01:23:04.6554 Updating moodlogicplaylist:Unnamed : titlesort to MOODLOGIC UNNAMED 2006-08-23 01:23:04.6580 Updating moodlogicplaylist:Unnamed : rating to 0 Use of uninitialized value in concatenation (.) or string at C:\trunk\server/Slim/Schema.pm line 893. 2006-08-23 01:23:04.6685 Merging entry for moodlogicplaylist:Unnamed readTags is: []
Ok - I've just checked in more code - change 9123 Can you give that a try?
no warning or errors when using --d_info, however there are no playlists! using --d_moodlogic causing the following C:\trunk\server>perl slimserver.pl --d_moodlogic 2006-08-23 19:55:28.7236 About to look for files in D:\My Playlists 2006-08-23 19:55:28.7253 For files with extensions in: [(?i-xsm:\.(?:asf|wax|asx|lnk|wpl|m3u|pls|xspf|cue|lnk)$)] 2006-08-23 19:56:08.8302 MoodLogic: using moodlogic: 1 2006-08-23 19:56:08.8306 MoodLogic: start export 2006-08-23 19:56:09.6013 OLE exception from "ADODB.Recordset": The connection cannot be used to perform this operation. It is either closed or invalid in this context. Win32::OLE(0.1704) error 0x800a0e7d in METHOD/PROPERTYGET "Open" 2006-08-23 19:56:09.6026 OLE exception from "ADODB.Recordset": Operation is not allowed when the object is closed. Win32::OLE(0.1704) error 0x800a0e78 in METHOD/PROPERTYGET "EOF" 2006-08-23 19:56:09.6037 OLE exception from "ADODB.Recordset": Item cannot be found in the collection corresponding to the requested name or ordinal. Win32::OLE(0.1704) error 0x800a0cc1 in METHOD/PROPERTYGET "Fields" 2006-08-23 19:56:09.6118 MoodLogic: playlist [Unnamed] has no entries! 2006-08-23 19:56:09.6143 OLE exception from "ADODB.Recordset": Operation is not allowed when the object is closed. Win32::OLE(0.1704) error 0x800a0e78 in METHOD/PROPERTYGET "EOF" 2006-08-23 19:56:09.6254 OLE exception from "ADODB.Recordset": Operation is not allowed when the object is closed. Win32::OLE(0.1704) error 0x800a0e78 in METHOD/PROPERTYGET "MoveNext" 2006-08-23 19:56:09.6403 OLE exception from "ADODB.Recordset": Operation is not allowed when the object is closed.
Subject: Re: Playlist only scan fails at moodlogic importer This seems to be that MoodLogic isn't giving us the data for the playlists. Try stopping and starting MoodLogic? Or upgrading to MusicIP. :)
Actually, moodlogic doesn't need to be running for slimserver to get data. What does happen, however, is that teh database get corrupted easily and frequently. The only way to clear that up is to run moodlogic, hope that is pops up a message saying "fixing database" then closing. It doesn't always give you the popup, and if it doesn't, then any errors reported by the scan involving the OLE connection, will not be fixed. Frankly, given how dead the Moodlogic development process appears to be, and how quiet the organisation has become, I am surprised Slim even still has them listed as a partner. I'd have given them up as dead a long time ago.
Subject: Re: Playlist only scan fails at moodlogic importer I'm aware of the data corruption issues and i don't think it's applicable in the case. I'm not getting any pop ups and a full Clear and Rescan, runs with no problems, just no playlists. After the rescan I am able to see other mixable music. The genres are there along with mixable tracks. I can rebuild the Moodlogic database if you like but it will take some time. (couple of days to activate about 28,000 tracks) Let me know and I will start it this evening. BTW. I like moodlogic over MusicIP, I think it builds better mixes. Additionally MusicIP does not have the autoplaylist feature <div>I'm aware of the data corruption issues and i don't think it's applicable in the case.</div> <div>I'm not getting any pop ups and a full Clear and Rescan, runs with no problems, just no playlists.</div> <div>After the rescan I am able to see other mixable music. The genres are there along with mixable tracks.</div> <div> </div> <div>I can rebuild the Moodlogic database if you like but it will take some time. (couple of days to activate about 28,000 tracks) </div> <div> </div> <div>Let me know and I will start it this evening.</div> <div> </div> <div>BTW. I like moodlogic over MusicIP, I think it builds better mixes. Additionally MusicIP does not have the autoplaylist feature</div> <div> </div> <div> </div> <div> </div> <div> </div>
Dan & KDF Installed moodlogic in new folder and built and activated against a single folder in the library (Soundtrack) it was able to activate 989 tracks, and built the autoplaylists generated in device link. Cleared SlimSever Database and asked it use Moodlogic as the only source for data. Tracks, artis, album, genre information is there, but no playlists. I think something broke in the last two changes. I not very smart about svn. How would I go about reverting out change 9102 and 9123? to prove?
svn update -r9101 will take you back to 9101
Subject: Re: Playlist only scan fails at moodlogic importer Dan I think i figured it out, but need to confirm at home. in moodlogic\Importer.pm The AutoPlaylist Query is missing some quotes after the where clause. At least they are different from the one above for the Playlist Query. I'm not SQL smart so I would need to test. Dan<br><br>I think i figured it out, but need to confirm at home.<br><br>in moodlogic\Importer.pm<br><br>The AutoPlaylist Query is missing some quotes after the where clause. <br>At least they are different from the one above for the Playlist Query. <br>I'm not SQL smart so I would need to test.<br><br><br>
Latest update Somewhere between build revision 9078 and 9101 the moodlogic playlist parsing broke. There are no errors but a log snipet logs shows: I'm assuming the query is working, because SlimSever has the playlist names, but is having a proble setting the actual contents. Sorry I don't know enough Perl to debug further. 2006-08-27 13:19:59.2984 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3008 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3032 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3055 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3078 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3102 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3125 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3149 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3172 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3196 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3220 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3244 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3267 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3291 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3315 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3339 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3363 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3387 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3412 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3435 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3459 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3483 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3515 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3539 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3562 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3586 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3610 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3634 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3658 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3681 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3706 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3729 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3753 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3777 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3800 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3824 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3849 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3872 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3896 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.4479 MoodLogic: done Scanning
Subject: Re: Playlist only scan fails at moodlogic importer Ok - I've checked in a change which makes the quotes the same as the query above it. Give that a try? Thanks
Dan, I think we are close. Doing a Clear & Rescan I'm stil getting entrys like 2006-08-27 13:19:59.3149 MoodLogic: playlist [+Fast {Happy}] has no entries! 2006-08-27 13:19:59.3172 MoodLogic: playlist [+Fast {Romantic}] has no entries! 2006-08-27 13:19:59.3196 MoodLogic: playlist [+Fast {Romantic}] has no entries! This is for all the playlist both Auto and ones I have create. I think it's located to importer.pl in either "getPlaylistItems" or "processPlaylists" Is there anyway to determine display the lists being returned? it would help it's easier/quicker to debug using the regular playlists and not the auto ones. I only have 5 that I have created.
Dan I've copied over the Importer.pl from build 9054 and the clean and rescan is now working again. I've look at both "sub processPlaylists" and "sub getPlaylistsItems" and the differences are beyond me. The Rescan Playlist only is still broken, but my efforts have been in trying to get any playlist scanning to work.
I think there is a problem where the objects are getting closed prematurely. trying to use data::dumper on any playlist, or $playlist->Fields('name'), gives an OLE error: 2006-08-29 16:11:50.2421 OLE exception from "ADODB.Recordset": Operation is not allowed when the object is closed.
yup...something odd about the OLE objects. using blessed($playlist), $playlist->can('Fields'), etc is a dead end. They end up closing the recordset and you get no entries. I think it doesn't like being broken up in the new parser.
Created attachment 1481 [details] replacement Importer.pm Try this Importer.pm over top of the existing Moodlogic/Importer.pm $playlist and $auto make reference to $conn, so I have added that as an optional open when doing playlists only. Its scratched up a bit with commented code and debug stuff, but its just a quick hack to see how if it helps in this case. I haven't got much test data to work with on this setup, and I'm rather too ill to be tidy ;)
It's scanning the playlists now. <grin> Do you want me top test against the library also?
Created attachment 1482 [details] cleaned up and works for me. whatever you want to check. There isn't any output that it's going to add, so it's more a case of does it do everything you expect. playlist only, full scan, and do the contents match. I tested with a library of 400 tracks, only auto playlists. they all had content, but I have nothing to compare to, since ML doesn't actually SHOW their auto playlists in their own application. I've briefly tested this updated cleaned up version with 2700 tracks. I can't seem to get the sanity checks to work at all in getPlayListItems. If either one is not commented out, I get only empty playlists. I'm not sure what to do about those, since at least one of them was supposedly in response to the original bug report here.
Testing against the new file now. BTW. Moodlogic does show the autoplaylists but only in Devicelink, when the playlists are generated. Devicelink may give some warnings about there not being a supported MP3 player, but just continue. From the Devicelink Menu select tools>Build Auto-Mixes. As the playlists are being generated the playlists will be displayed in the left hand column.
KDF The newest file works properly. Both types of scan work. I didn't test the new numsic only, seeing as Moollogic doesn't have a way to do it.
Fixed in change 9272 then with kdf's changes.