lrossouw;451114 Wrote: > > 1) The tables I create seem to survive rescans. Do they survive > squeezecentre upgrades? Only needed to keep the weekly history of > (c)-(e). > There are no guarantees.
Mine has survived all upgrades beside the upgrades where the database engine changed (6.3(SQLite) -> 6.5(MySQL) and 7.3(MySQL) -> early beta of 7.4(SQLite) and early beta of 7.4(SQLite) -> late beta of 7.4(MySQL)). You can probably expect a database change between 7.4 and 8.0 as 7.4 will be based on MySQL while 8.0 is planned to be based on SQLite. If it's important that the data survives a rescan, remember the situation where the url changes during a rescan due to a moved or renamed file. In TrackStat I solve this by also storing the musicbrainz_id and after the rescan I synchronize my tables with the tracks table based on url and musicbrainz_id values. However, I suppose you could just retrieve new data from LastFM if a counter is lost, so lost data might not be a big problem in your case. lrossouw;451114 Wrote: > > 2) I get the artist/track name (blob value) from the > contributors/tracks table then query last.fm using their api using this > to get the data. How do I ensure that I don't get into utf8 problems? > At the moment I pass it unadjusted to the the "get" that fetches the > last.fm data via xml (other than url escaping it). > >From the LastFM API it sounds like they want utf8 encoding. In the LastFM scanning module bundled with Custom Scan I use escape($artist->name) where $artist is a Slim::Schema::Contributor object retrieved from the database. Although, I'm not completely sure if this works correctly or not. Character encoding could be a mess, there is a Slim::Utils::Unicode module which contains a number of conversion methods but I suppose you've already seen that ? lrossouw;451114 Wrote: > > 3) This would seem to be a useful add-on to custom scan, but want to > get it working standalone first. > Get back to me when you want to integrate it. I suppose you are aware of the license limitation that you can only send 5 requests per second to LastFM ? Earlier it was 1 request per second but it seems like they've raised the limit a bit since I did the LastFM module bundled with Custom Scan. -- erland Erland Isaksson 'My homepage' (http://erland.isaksson.info) (Install my plugins through Extension Downloader) (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=66987 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
