This is going to be long as I describe my situation and what I've done to solve it, so bear with me. My actual goal here is to get my TrackStat ratings back into my LMS and then over to iTunes, but the path is going to be littered with challenges.
A few notes first:
1. I use the ¬ character as a separator in my file names. It is not used in the metadata, but it allows me to easily take file names and easily create metadata, which is a good thing in case things go really bad with my metadata (and backups).
2. I had a FLAC files, but recently converted them to ALAC (.m4a).
3. I also have mp3 files. They were unchanged.
4. All (well, most) of my files have a MusicBrainz ID. (The alac files took the same MB ID as the flac files. A small sample test of removing the flac MB ID and getting a new MB ID based on the alac file uses the same MB ID.)
5. I have a TrackStat backup XML file with thousands of files rated.
6. About the ¬ character...I have my files stored as /artist/album/year ¬ disc-track ¬ title. That's how the OS (details at the bottom of this post) sees the files and that is sort of how LMS sees them, too. I say sort of because sometimes LMS says the file is year ¬ disc-track ¬ title and other times it says the file is year ¬ disc-track ¬ title. And this is also how TrackStat sees the URL: year%2520%25C2%25AC%2520disc-track%2520%25C2%25AC%2520title.m4a. Question: Where did the Â/%25C2 come from?! I didn't put it there. I think the the errant  is a part of the problem.
My process so far:
1. After converting the FLAC files to ALAC, I cleared my LMS library and rescanned.
2. I edited the TrackStat backup XML file that I had from before I changed my flac files to alac files and changed the file extensions from .flac to .m4a. I also changed path directories previously called "flac" to "alac".
3. Using Custom Scan, I attempted to restore my TrackStat ratings. The ratings for the unchanged mp3 files appear to have been restored correctly, but not for the alac files. I don't understand why this is just an issue for the alac/m4a files. So I ran CustomScan and TrackStat in debug mode to look at the log files for clues. Sadly, there's nothing there that look suspicious to me. Erland, do you see anything?
4. Edited the TrackStat XML file to remove Â/%25C2 and processed the newly saved TrackStat file. No success.Originally Posted by server.log
5. Changed my file names removing the ¬/%25AC character and changed TrackStat to match it and processed that newly saved TrackStat file. No success.
6. I tried removing the MusicBrainz ID from the TrackStat file and processing that newly saved file. No success.
I am defining success as being able to see the rating in TrackStat/LMS in the web UI.
Again, my goal is to restore my ratings. After I get them in LMS, then I can begin the process of getting them to iTunes, but one step at a time.
I'm out of ideas. What else can I do?
-prabbit
LMS details:
Logitech Media Server Version: 7.7.3 - r33913 @ Wed Mar 28 02:01:55 PDT 2012
Operating system: Mac OS X 10.6.8 - EN - utf8
Platform Architecture: x86_64
Perl Version: 5.10.0 - darwin-thread-multi-2level
Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
Custom Scan v2.8.3779
TrackStat v3.0.3786
Results 1 to 10 of 38
-
2012-04-23, 10:19 #1Senior Member
- Join Date
- Apr 2007
- Posts
- 153
TrackStat/Custom Scan/LMS Â/¬/URL problem
Last edited by prabbit; 2012-04-23 at 10:32. Reason: Add Custom Scan/TrackStat versions
-
2012-04-23, 22:54 #2
After you have restored TrackStat, try to restart LMS before you view the ratings, the reason is that TrackStat has some caching of data for the web interface so there could be some bug so if you first view a specific track, then do the restore and then view exactly the same track/album as before it would show the cached data instead of what's in the database. If you see the message saying "Store rating: 70" in the log, it's an indication that the rating is written to the database and then the cause is probably the above mentioned cache issue.
It is of course a bug, because I should really empty the cache after a restore, but I might have missed this and then just restarting LMS after the restore operation has completely finished should do the same thing as it's cached in memory.Erland Isaksson (My homepage)
(Developer of many plugins/applets (both free and commercial).
If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)
You may also want to try my Android apps Squeeze Display and RSS Photo Show
Interested in the future of music streaming ? ickStream - A world of music at your fingertips.
-
2012-04-24, 10:14 #3Senior Member
- Join Date
- Apr 2007
- Posts
- 153
Restarting LMS didn't help and just to cover my bases, this is what I did:
1. Uninstalled TrackStat and Custom Scan.
2. Deleted the entire Squeezebox cache directory.
3. Restarted LMS.
4. Cleared my entire library and rescanned.
5. Confirmed that no files had any TrackStat ratings.
6. Deleted my server.log and scanner.log files.
7. Restarted LMS.
8. Installed TrackStat (but not Custom Scan).
9. Restarted LMS.
10. With logging for TrackStat on Debug, I restored my ratings.
11. Before viewing any ratings, I restarted LMS.
12. I cleared my web browser's cache (you know, just to be safe).
13. Ratings for my mp3 files are present (just like before); however, ratings for my m4a files are not present even though the log file says the ratings are being written/saved.
Any other ideas?
-
2012-04-24, 10:54 #4
Can you install Database Query plugin and run its "TrackStat Inconsistency/Problems" query and post the result ?
It sounds very strange if the log in point 10 indicates that the m4a ratings are updated but they aren't available in point 13Erland Isaksson (My homepage)
(Developer of many plugins/applets (both free and commercial).
If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)
You may also want to try my Android apps Squeeze Display and RSS Photo Show
Interested in the future of music streaming ? ickStream - A world of music at your fingertips.
-
2012-04-24, 12:10 #5Senior Member
- Join Date
- Apr 2007
- Posts
- 153
Here is the result
Originally Posted by result
-
2012-04-24, 22:38 #6
Can you run the "Squeezebox Server Inconsistency/Problems" query also ?
The first number which is a negative number looks strange, I've seen other people with this behavior and that have been caused of them using cue sheets. There is a bug related to cue sheets and musicbrainz tags in LMS, but your issue isn't related to cue sheet tracks, is it ?
Another thing I would try is to try to use the "Remove all data" button in TrackStat settings page in the "Backup" section just before you start the restore, this will make sure the TrackStat database tables are empty before the restore operation starts and make sure previous data can't cause any issues.
Finally, can you check how the "Rating" number is set in the standard "Song Info" page which you get to when clicking on a song in one of the standard browse menus or in the current playlist, is that also empty ?Erland Isaksson (My homepage)
(Developer of many plugins/applets (both free and commercial).
If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)
You may also want to try my Android apps Squeeze Display and RSS Photo Show
Interested in the future of music streaming ? ickStream - A world of music at your fingertips.
-
2012-04-25, 09:24 #7Junior Member
- Join Date
- Dec 2010
- Posts
- 20
I've got a negative number for "Missing entries in Trackstat" as well, and I don't even know what cue sheets are. Also I get the following error when I click on "Unused entries in Trackstat data":
The reason why I'm looking into this is that I have one album for which trackstat doesn't seem to find any tracks anymore. Looking into the trackstat exports shows a big number of duplicate entries for the same song of this album, each with the same MusicBrainz id, only differing in the value for "added".Code:Error: Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed: no such function: from_unixtime [for Statement " select track_statistics.rating,track_statistics.playcount,from_unixtime(track_statistics.lastplayed) as lastplayed,from_unixtime(track_statistics.added) as added,track_statistics.url from track_statistics left join tracks on tracks.urlmd5=track_statistics.urlmd5 and tracks.audio=1 where tracks.url is null order by track_statistics.url "] at /share/MD0_DATA/.qpkg/LogitechMediaServer/var/home/SqueezeboxServer/Slim/Schema/Storage.pm line 126 , no such function: from_unixtime
I'm wondering whether there's a way to delete all entries in the trackstat database for a specific MusicBrainz id?
-
2012-04-25, 09:30 #8Senior Member
- Join Date
- Apr 2007
- Posts
- 153
-
2012-04-25, 10:28 #9Senior Member
- Join Date
- Apr 2007
- Posts
- 153
Sure. Here it is...
I figured that negative number might be strange. I don't use or have any cue sheets.
Originally Posted by Squeezebox Server Inconsistency/Problems
I removed all data and after I did this is what the database query for TrackStat Statistics looks like. Is this what you would expect? There's no entry under "Number of totally played songs." Should there be values under the unplayed albums/artists?
This is what TrackStat Statistics looks like after I have deleted the data and then restored from my backup file. The number of songs is correct, but I would expect several thousand more songs to have a rating.
Originally Posted by TrackStat Statistics--After Flush Before Restore
Originally Posted by TrackStat Statistics--After Flush After Restore
I'm not exactly sure what you mean by "how the 'Rating' is set." Do you mean is the rating set (that is, does it have a value/1-10/stars/asterisks)? When I browse to a song (or search) and look at its rating, there is no rating (in other words, yes, the rating is empty). Of course, the exception is the mp3s where the rating is correctly being restored.
-
2012-04-26, 06:38 #10Junior Member
- Join Date
- Dec 2010
- Posts
- 20
I've just opened a separate thread for my problem with duplicate TrackStat entries, which may or may not be related:
http://forums.slimdevices.com/showth...n-every-rescan

Reply With Quote

