Bugzilla – Bug 6479
Can't play LastFM songs that don't exist in my library
Last modified: 2008-12-18 11:12:53 UTC
I have spoken to the author of the LastFM radio plugin (James Craig), and he thinks the following is a SqueezeCenter bug... More often than not, since moving to SC7.0, I can't seem to stream LastFM stations. I think the LastFM plays fine when it plays a song that I have in my library, but when it tries to play a song that isn't in my library, I get the following: [12:22:05.5260] Plugins::SqueezeScrobbler::LastFM::postToLastFM (632) Sending http://ws.audioscrobbler.com/radio/adjust.php?session=62addfbb89efafdcded85a3860727e1e&url=lastfm%3A%2F%2Fuser%2FHergest%2Fneighbours [12:22:07.1064] Slim::Schema::Storage::throw_exception (67) Error: Error executing 'UPDATE tracks SET bitrate = ? WHERE ( id = ? )': DBD::mysql::st execute failed: Data truncated for column 'bitrate' at row 1 at P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Storage/DBI.pm line 771. [12:22:07.1070] Slim::Schema::Storage::throw_exception (67) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (P:/Music/SlimServer/trunk/server/Slim/Schema/Storage.pm line 67) frame 1: Slim::Schema::Storage::throw_exception (P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Storage/DBI.pm line 773) frame 2: DBIx::Class::Storage::DBI::_execute (P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Storage/DBI.pm line 797) frame 3: DBIx::Class::Storage::DBI::update (P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Row.pm line 115) frame 4: DBIx::Class::Row::update (P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Relationship/CascadeActions.pm line 30) frame 5: DBIx::Class::Relationship::CascadeActions::update (P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/InflateColumn.pm line 222) frame 6: DBIx::Class::InflateColumn::update (P:/Music/SlimServer/trunk/server/Slim/Schema/DBI.pm line 35) frame 7: Slim::Schema::DBI::update (P:/Music/SlimServer/trunk/server/Slim/Schema.pm line 2267) frame 8: Slim::Schema::_postCheckAttributes (P:/Music/SlimServer/trunk/server/Slim/Schema.pm line 1015) frame 9: Slim::Schema::updateOrCreate (P:/Music/SlimServer/trunk/server/Slim/Schema/ResultSet/Track.pm line 106) frame 10: Slim::Schema::ResultSet::Track::updateOrCreate (P:/Music/SlimServer/trunk/server/Slim/Music/Info.pm line 336) frame 11: Slim::Music::Info::setBitrate (P:/Music/SlimServer/trunk/server/Slim/Player/Squeezebox2.pm line 354) frame 12: Slim::Player::Squeezebox2::directHeaders (P:/Music/SlimServer/trunk/server/Slim/Networking/Slimproto.pm line 555) frame 13: Slim::Networking::Slimproto::_http_response_handler (P:/Music/SlimServer/trunk/server/Slim/Networking/Slimproto.pm line 430) frame 14: Slim::Networking::Slimproto::client_readable (P:/Music/SlimServer/trunk/server/Slim/Networking/Select.pm line 243) frame 15: (eval) (P:/Music/SlimServer/trunk/server/Slim/Networking/Select.pm line 243) frame 16: Slim::Networking::Select::select (P:\Music\SlimServer\trunk\server\slimserver.pl line 500) frame 17: main::idle (P:\Music\SlimServer\trunk\server\slimserver.pl line 450) frame 18: main::main (P:\Music\SlimServer\trunk\server\slimserver.pl line 1000) [12:22:07.1075] Slim::Networking::Select::select (245) Error: Select task failed: Carp::Clan::__ANON__(): Error executing 'UPDATE tracks SET bitrate = ? WHERE ( id = ? )': DBD::mysql::st execute failed: Data truncated for column 'bitrate' at row 1 at P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Storage/DBI.pm line 771. It appears to be trying to set the bitrate when it isn't known.
Andy's looking at LastFM issues now.
This is very likely a bug in the 3rd party Last.fm plugin. The bitrate field in the database is a float type, so unless you try to store text data in it, this error shouldn't happen.
Andy, did you actually look at the stack trace? There's no mention of the LastFM plugin in it.
Yeah there is, and isn't this bug about playing Last.fm tracks?
Sorry, I don't see it - where is it? (I believe the first line of Peter's log is unrelated to the error - it was 2 seconds earlier) To me the problem looks like it's here: (P:/Music/SlimServer/trunk/server/Slim/Player/Squeezebox2.pm line 354) frame 12: Slim::Player::Squeezebox2::directHeaders indicating that there is a problem parsing headers found in the LastFM stream. I don't think that has anything to do with the plugin itself?
Since all Last.fm tracks are 128k mp3 files the plugin's parseDirectHeaders method should return '128000' for the bitrate field.
The core plugins e.g. Pandora actually return '128_000' as bit rate, which is the same as I've done in LastFM.
This bug is being closed since it was resolved for a version which is now released! Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html If you are still seeing this bug, please re-open it and we will consider it for a future release.