andyg;424801 Wrote: 
> On May 19, 2009, at 2:00 PM, erland wrote:
> 
> >
> > andyg;424780 Wrote:
> >> On May 19, 2009, at 1:31 PM, erland wrote:
> >>
> >>>
> >>> andyg;424763 Wrote:
> >>>>>
> >>>>> I'm starting SqueezeCenter with the following script (if it
> >>>> matters):
> >>>>>
> >>>>> Code:
> >>>>> --------------------
> >>>>>
> >>>>> #!/bin/sh
> >>>>> export PERL5LIB=$PERL5LIB:/opt/squeezecenter74_sqlite:/opt/
> >>>>> squeezecenter74_sqlite/CPAN
> >>>>> export PATH=/opt/squeezecenter74_sqlite:$PATH
> >>>>> slimserver.pl --cachedir /var/lib/squeezecenter/Cache74LiteSmall
> >> --
> >>>>
> >>>>> prefsdir /home/erland/Configurations/Prefs74LiteSmall --logdir
> >> /var/
> >>>>
> >>>>> lib/squeezecenter/Logs74LiteSmall $*
> >>>>
> >>>> Did you move the json file into your Prefs74LiteSmall directory?
> >>>>
> >>> Yes, I took a copy of the 7.4 trunk installation Cache and Prefs
> >>> directories and the start arguments points to these copies.
> >>>
> >>> The json file seems to be deleted during scanning because after
> the
> >>> scanning process it's no longer there.
> >>
> >> OK, it's only deleted if it was successfully imported.  Is your -
> >> persistent.db file empty?  Did you see this line in your
> scanner.log?
> >>
> >> Migrating persistent track information from MySQL
> > No, it's not empty it contains a lot of tracks and one of them even 
> 
> > has
> > a rating. Before the upgrade I had 92 rated tracks after the upgrade
> I
> > have a single one. The squeezecenter-persistent.db is attached to
> this
> > post if you like to look at it.
> >
> > The scanner log file contains the line you mention, the end of the
> > scanner.log file looks like this:
> >
> > Code:
> > --------------------
> >
> >  [09-05-19 18:30:25.6559] Slim::Music::Import::runScanPostProcessing 
> 
> > (360) Migrating persistent track information from MySQL
> >  [09-05-19 18:30:25.9126] Slim::Schema::Year::cleanupStaleYears (66) 
> 
> > Warning: *** cleanupStaleYears() needs ported to SQLite
> >  [09-05-19 18:30:25.9132] Slim::Music::Import::runScanPostProcessing 
> 
> > (387) Starting Database optimization.
> >  [09-05-19 18:30:25.9799] Slim::Music::Import::endImporter (596)  
> > Completed dbOptimize Scan in 0 seconds.
> >
> > --------------------
> >
> >
> > The full scanner.log and server.log file was attached to the
> previous
> > post together with the json file which seems to contain all ratings.
> 
> 
> OK both the json and db file look fine, with URLs that match, so it  
> should have migrated the data properly.  Would you be able to do some 
> 
> debugging in Slim::Schema::TrackPersistent::import_json to see why it 
> 
> might be failing?
> 
Everything seems ok in the import_json method, I added debug message
inside the last for loop that iterates through the lastplayed, rating
and playcount attributes and it prints the correct rating for the 92
tracks that previously had ratings if I print $track->{rating} or
$tp->rating. 

Most tracks doesn't have a musicbrainz_id so the import_json method
executes the "url" path when getting the TrackPersistent entities.

Unfortunately the printed ratings doesn't seem to be saved to the
squeezecenter-persistent.db file for some reason.

Could there be some commit issue so the changes aren't committed to the
db file ?


-- 
erland

Erland Isaksson
'My homepage' (http://erland.isaksson.info) 'My download page'
(http://erland.isaksson.info/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan,  Custom Skip, Multi Library, Title Switcher and Database
Query plugins'
(http://wiki.erland.isaksson.info/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=63397

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to