Phil Meyer;223717 Wrote: > Does iTunesUpdate plugin recognise TrackStat info (star rating, last > played time and playcount)? > Welcome to the mess of SlimServer statistics information.
The problem here is that the implementation of ratings, last played time and play counts in standard SlimServer isn't very good. The result is that there is at least three different implementations. 1. The standard SlimServer implementation that don't allow ratings to be changed in SlimServer. SlimServer isn't the source of the rating information. It presumes any rating in SlimServer can be safely overwritten during rescan. This is what happens with the standard iTunes integration in SlimServer when it performs a rescan using the iTunes Library xml file and also with the MusicIP integration. Since SlimServer isn't the source of the rating information, it can safely be discarded during rescans. One problem with last played and play counts in standard SlimServer is that this information isn't considered important. It can safely be discarded and reset during rescans. If the iTunes or MusicIP integrations are used, it will retrieve new values for these during rescan and overwrite anything inside SlimServer. Another problem is that last played and play counts are changed immediately a track is played, it doesn't matter if you skip past a track after it has played for 0.1 seconds or play the complete track, the play count and last played time will be increased the same in both situations. 2. The iTunes Update makes it possible to change ratings from SlimServer. It still doesn't make SlimServer the source of this information, so to store it in a safe place it sends the ratings to iTunes when they are changed in SlimServer. It fixes the play counts/last played limitations in similar way. It reads the information from iTunes and increases the iTunes counters and ignores any information in SlimServer. It also has a fix which makes sure the increase only happens after a specific amount of the track has been played, which results in that you can safely skip past a track in SlimServer without updating the play count in iTunes through iTunes Update. You can change ratings directly in the user interface of iTunes Update, in this case the ratings will only be changed in standard SlimServer and written to iTunes. These changed ratings will never be seen by TrackStat. If you have both iTunes Update and TrackStat installed, I think TrackStat will win the control of the Now Playing menu of the SqueezeBox. So holding down any digit on the remote here will result in the TrackStat rating change code to be executed. However, iTunes Update pickup the changed rating notification that TrackStat sends so these ratings will also be written to iTunes by the iTunes Update plugin. The same thing also happens if you change the ratings through the TrackStat web interface. So I think the only situation where TrackStat wont be aware of the changed rating is if you change it in the iTunes Update interface. TrackStat will pickup the change during next rescan if it was on an unrated track, but if it was a changed rating on a previously rated track it will be ignored. 3. The TrackStat plugin tries to make SlimServer the source of the statistic information. To do this it stores the information in a separate table in the database to make sure it isn't overwritten or reset during rescans. When a rating is changed in TrackStat it is written to both this separate table, to the SlimServer standard tables and sent as a notification which is picked up by the iTunes Update plugin. When a track is played it only updates the separate table and sends a signal for anyone to listen to. However, as James already have mentioned, iTunes Update doesn't pickup this signal since it have its own implementation of the play count/last played handling. The reason iTunes Update doesn't pickup this signal is because it needs to work even if TrackStat isn't installed. TrackStat has the same logic regarding play counts and last played time as iTunes Update. Actually the logic regarding this is based on the iTunes Update code. If I remember correctly it will work exactly the same as iTunes Update with the default values, but TrackStat also makes it possible to configure how much of a track you need to play for it to increase the play count and last played time. The main reasons that there exists three different implementations regarding this is: - Standard SlimServer doesn't consider statistics to be important and due to this it can be discarded during rescans. - The standard SlimServer logic related to increasing of play counts and last played time isn't working very good as it doesn't differ between a skipped track and played track. But as this statistics isn't considered important this is not an issue in standard SlimServer. - The available third party plugins needs to work by themselves. iTunes Update can't presume a user wants to use TrackStat and TrackStat can't presume a user wants to use iTunes Update. IMO it would be good if the code to decide when a play count/last played time should be updated was made smarter in SlimServer. This way we could have the logic in one place and iTunes Update and TrackStat could just pickup the signal from SlimServer and pass it further to their respective storages. In the same way it would also be good if SlimServer allowed a rating to be changed and just send a notification to TrackStat and iTunes Update when this happen. Phil Meyer;223717 Wrote: > One other issue I have (generally an iTunes issue), is that I have to > add new files to the iTunes library. i.e. I have my iTunes library > folder outside of my SlimServer music folder path, so that any > downloaded protected iTunes music store files will not be seen by > SlimServer. So after any changes to my music library, such as ripping > new music, changing file names, etc, I have to "Add folder..." in > iTunes to load the whole folder again. iTunes will scan the whole > folder, and leave old removed items in the iTunes library (I can't find > a way to prune these from the library). If you like to sync iTunes with a removed/changed/new folder you should really look at the iTunes Library Updater: http://itlu.ownz.ch/wordpress/ Phil Meyer;223717 Wrote: > So, do I have to manually update iTunes library before using any > SlimServer->iTunes sync, or does iTunes hold ratings info in some xml > file irrespective of whether the music files are in its library? If you add new music to your music library on the SlimServer side, you need to make iTunes aware of that music before TrackStat export or iTunes Update will work correctly with that music. Phil Meyer;223717 Wrote: > If so, it would be good for a slimserver rescan to somehow update the > iTunes library (add new files, remove deleted files) whilst/after the > slimserver rescan is running/finished.The standard SlimServer will not do > this because its iTunes integration presumes that iTunes is the master. TrackStat won't do this because I don't want to have a direct connection between SlimServer and iTunes since the main purpose of the TrackStat integration is to solve the case when SlimServer and iTunes runs on different computers. I guess it would be possible for the iTunes Update plugin to pickup a rescan notification from SlimServer and then perform the exact same job as the "iTunes Library Updater" application I mentioned earlier does. James, will have to answer if this is a possibility, I would imagine that it would be a bit of work to implement this. I'm also not sure if this fits in the goal of iTunes Update plugin. Phil Meyer;223744 Wrote: > SlimServer is definitely my master music library source.If this is the case, > I'm not sure it's a good idea to make iTunes the master of statistics such as ratings, play counts and last played times. Maybe you should do just as I've done and accept that any changed statistic in iTunes/iPod isn't interesting to get back to SlimServer ? I've decided this and I just need to export the statistics to iTunes to make the smart playlists in iTunes that decide what to synchronized with the iPod to work good enough. If you also decide this, it isn't that important that the statistics in SlimServer is exactly the same as in iTunes. You could have both TrackStat and iTunes Update installed. You could use the TrackStat global import/export functionality to get the information in SlimServer and iTunes fairly synced to start with. After this you can use the iTunes Update plugin to make sure the changes in SlimServer results in updated information in iTunes. One thing that I haven't mentioned yet regarding the iTunes Update direct connection to iTunes is that it will startup iTunes. So iTunes will be running always when you have SlimServer running. I'm not sure if this will work if you and your wife are having separate iTunes libraries. I could see potential issues if you are playing your music on SlimServer and your wife at the same time like to browse her iTunes library on the same computer. If this really is a problem, the solution is probably to use the log mode instead of direct mode in iTunes Update/TrackStat. -- erland Erland Isaksson 'My homepage' (http://erland.homeip.net) 'My download page' (http://erland.homeip.net/download) (Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse, Custom Scan, Custom Skip, Multi Library and RandomPlayList plugins' (http://wiki.erland.homeip.net/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=37986 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/plugins
