>By the way, I just checked the code and if you want the history in
>track_history to match your new path's, you will have to apply the same
>change as in saveTrack also to the corresponding section in the
>addToHistory function in Storage.pm
>
I updated the code for addToHistory and tried to restore the stats again.  I 
only get logging for saveTrack, no warnings from addToHistory.  I can see 
<historyEntry> nodes in my xml file (within the same root node as the <track> 
nodes).

I have the history setting ticked, and the code change is the same.  I would 
expect to see some paths that fail to find alternative paths like saveTrack 
warning log lines:

[21:18:21.8444] Plugins::TrackStat::Storage::saveTrack (926) No matching 
alternative path found for M:\Music\Phil's Music\Rips\Coldplay\X&Y\08 - A 
Message.flac.

I checked the track_history table:  SELECT * FROM track_history t where url 
like '%Rips%'

I have over 700 rows that contain urls with "Rips" in them.  I've got rid of 
this folder from my path (split it into one folder per genre instead), so there 
shouldn't be any history row urls with "Rips" in it.

This could be from my first import before I changed addToHistory.  Does "Delete 
unused statistic" also remove redundant history data, or only statistic data?

I also looked for track_history rows with url containing "Progressive", and get 
842 rows, so I have new urls in the table too.  Most of the "Rips" 
track_history row id's are a higher number than the "Progressive" id's, so the 
old "Rips" rows have been created after the corrected ones.

I see there is also a subroutine called "saveRating" - I haven't modified this. 
 It appears that I have retrieved last played, rating and playcount stats from 
my stats file just by modifying "saveTrack".

Phil
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to