Bug 146020 - amarok last.fm this item is not available for streaming when using custom station
Summary: amarok last.fm this item is not available for streaming when using custom sta...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-27 12:35 UTC by kostas
Modified: 2007-05-31 10:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kostas 2007-05-27 12:35:25 UTC
Version:           1.4.5 (using KDE 3.5.1 Level "a" , SUSE 10.1)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.27-0.9-default

when trying to add custom station (artist names ) in amaroks last.fm a popup appears with :This item is not available for streaming .But global tags are playable. Also when amarokapp starts I get the following log (suse 10.1):
kdecore (KAction): WARNING: KAction::insertKAccel( kaccel = 0x80943c8 ): KAccel object already contains an action name "play_pause"
QLayout "unnamed" added to QVBox "unnamed", which already has a layout
kdecore (KAction): WARNING: KAction::insertKAccel( kaccel = 0x80943c8 ): KAccel object already contains an action name "play_pause"
QLayout: Adding KToolBar/mainToolBar (child of QVBox/unnamed) to layout for PlaylistWindow/PlaylistWindow
STARTUP
Comment 1 Seb Ruiz 2007-05-28 02:13:42 UTC
what was the url that you tried to add?

btw, that debug is useless.
Comment 2 kostas 2007-05-28 19:01:18 UTC
no exact URL I just entered the artist names witch on suse 10.2 and same amarok version where playable. Also previously this function was also ok for suse 10.1 same version. engage>play last.fm stream>custom station and then entered artist names. the after 3 seconds of streaming appears a message this item is not available for streaming.
Comment 3 Vincenzo Reale 2007-05-30 19:42:19 UTC
I experienced the same issue with the last svn source.
Comment 4 Seb Ruiz 2007-05-31 10:10:34 UTC
SVN commit 670063 by seb:

Last.fm has changed the way we can listen to artist radios due to licensing. This means that we can't listen to the radio station from multiple artists. Only one artist from now on...

Sorry for the string breakage, but it is a critical fix.
CCMAIL: kde-i18n-doc@kde.org

BUG: 146020


 M  +4 -5      lastfm.cpp  
 M  +2 -2      playlistwindow.cpp  


--- branches/stable/extragear/multimedia/amarok/src/lastfm.cpp #670062:670063
@@ -222,10 +222,9 @@
     QString token;
     CustomStationDialog dialog( 0 );
 
-    if( dialog.exec() == QDialog::Accepted ) {
-        const QStringList artists = QStringList::split( ",", dialog.text() );
-        for( uint i = 0; i < artists.count(); i++ )
-            token += ( i > 0 ? "," : "" ) + artists[i].simplifyWhiteSpace();
+    if( dialog.exec() == QDialog::Accepted )
+    {
+        token =  dialog.text();
     }
 
     return token;
@@ -1080,7 +1079,7 @@
 {
     makeVBoxMainWidget();
 
-    new QLabel( i18n( "Enter the name of a band or artist you like:\n(You can enter multiple artists separated by commas)" ), mainWidget() );
+    new QLabel( i18n( "Enter the name of a band or artist you like:" ), mainWidget() );
 
     m_edit = new KLineEdit( mainWidget(), "CustomStationEdit" );
     m_edit->setFocus();
--- branches/stable/extragear/multimedia/amarok/src/playlistwindow.cpp #670062:670063
@@ -949,7 +949,7 @@
     const QString token = LastFm::Controller::createCustomStation();
     if( token.isEmpty() ) return;
 
-    const KURL url( "lastfm://artistnames/" + token );
+    const KURL url( "lastfm://artist/" + token + "/similarartists" );
     Playlist::instance()->insertMedia( url, Playlist::Append|Playlist::DirectPlay );
 }
 
@@ -959,7 +959,7 @@
     const QString token = LastFm::Controller::createCustomStation();
     if( token.isEmpty() ) return;
 
-    const KURL url( "lastfm://artistnames/" + token );
+    const KURL url( "lastfm://artist/" + token + "/similarartists" );
     Playlist::instance()->insertMedia( url );
 }
 
Comment 5 Seb Ruiz 2007-05-31 10:14:41 UTC
SVN commit 670067 by seb:

Forward port r670063 to trunk
CCBUG: 146020


 M  +4 -5      lastfm.cpp  
 M  +2 -2      playlistwindow.cpp  


--- trunk/extragear/multimedia/amarok/src/lastfm.cpp #670066:670067
@@ -235,10 +235,9 @@
     QString token;
     CustomStationDialog dialog( 0 );
 
-    if( dialog.exec() == QDialog::Accepted ) {
-        const QStringList artists = dialog.text().split( ',' );
-        for( int i = 0; i < artists.count(); i++ )
-            token += ( i > 0 ? "," : "" ) + artists[i].simplified();
+    if( dialog.exec() == QDialog::Accepted )
+    {
+        token = dialog.text();
     }
 
     return token;
@@ -1102,7 +1101,7 @@
     setMainWidget( vbox );
 
 
-    new QLabel( i18n( "Enter the name of a band or artist you like:\n(You can enter multiple artists separated by commas)" ), mainWidget() );
+    new QLabel( i18n( "Enter the name of a band or artist you like:" ), mainWidget() );
 
     m_edit = new KLineEdit( mainWidget() );
     m_edit->setFocus();
--- trunk/extragear/multimedia/amarok/src/playlistwindow.cpp #670066:670067
@@ -809,7 +809,7 @@
     const QString token = LastFm::Controller::createCustomStation();
     if( token.isEmpty() ) return;
 
-    const KUrl url( "lastfm://artistnames/" + token );
+    const KURL url( "lastfm://artist/" + token + "/similarartists" );
     Playlist::instance()->insertMedia( url, Playlist::Append|Playlist::DirectPlay );
 }
 
@@ -819,7 +819,7 @@
     const QString token = LastFm::Controller::createCustomStation();
     if( token.isEmpty() ) return;
 
-    const KUrl url( "lastfm://artistnames/" + token );
+    const KURL url( "lastfm://artist/" + token + "/similarartists" );
     Playlist::instance()->insertMedia( url, Playlist::Append|Playlist::DirectPlay  );
 }