Don't show the "Retrieving Grooveshark playlists" task forever if the user has no playlists.
This commit is contained in:
parent
c38043b7e7
commit
456011d100
@ -597,16 +597,20 @@ void GroovesharkService::UserPlaylistsRetrieved() {
|
|||||||
|
|
||||||
QVariantMap result = ExtractResult(reply);
|
QVariantMap result = ExtractResult(reply);
|
||||||
QVariantList playlists = result["playlists"].toList();
|
QVariantList playlists = result["playlists"].toList();
|
||||||
QVariantList::iterator it;
|
|
||||||
for (it = playlists.begin(); it != playlists.end(); ++it) {
|
foreach (const QVariant& playlist_variant, playlists) {
|
||||||
// Get playlist info
|
// Get playlist info
|
||||||
QVariantMap playlist = (*it).toMap();
|
QVariantMap playlist = playlist_variant.toMap();
|
||||||
int playlist_id = playlist["PlaylistID"].toInt();
|
int playlist_id = playlist["PlaylistID"].toInt();
|
||||||
QString playlist_name = playlist["PlaylistName"].toString();
|
QString playlist_name = playlist["PlaylistName"].toString();
|
||||||
|
|
||||||
// Request playlist's songs
|
// Request playlist's songs
|
||||||
RefreshPlaylist(playlist_id, playlist_name);
|
RefreshPlaylist(playlist_id, playlist_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (playlists.isEmpty()) {
|
||||||
|
model()->task_manager()->SetTaskFinished(task_playlists_id_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroovesharkService::PlaylistSongsRetrieved() {
|
void GroovesharkService::PlaylistSongsRetrieved() {
|
||||||
|
@ -424,11 +424,11 @@ msgstr ""
|
|||||||
msgid "Add stream..."
|
msgid "Add stream..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:905
|
#: internet/groovesharkservice.cpp:909
|
||||||
msgid "Add to Grooveshark favorites"
|
msgid "Add to Grooveshark favorites"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:911
|
#: internet/groovesharkservice.cpp:915
|
||||||
msgid "Add to Grooveshark playlists"
|
msgid "Add to Grooveshark playlists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -474,7 +474,7 @@ msgstr ""
|
|||||||
msgid "Added within three months"
|
msgid "Added within three months"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:1103
|
#: internet/groovesharkservice.cpp:1107
|
||||||
msgid "Adding song to favorites"
|
msgid "Adding song to favorites"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -633,7 +633,7 @@ msgstr ""
|
|||||||
msgid "Are you sure you want to delete the \"%1\" preset?"
|
msgid "Are you sure you want to delete the \"%1\" preset?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:1075
|
#: internet/groovesharkservice.cpp:1079
|
||||||
msgid "Are you sure you want to delete this playlist?"
|
msgid "Are you sure you want to delete this playlist?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1045,7 +1045,7 @@ msgstr ""
|
|||||||
msgid "Convert any music that the device can't play"
|
msgid "Convert any music that the device can't play"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:958
|
#: internet/groovesharkservice.cpp:962
|
||||||
msgid "Copy to clipboard"
|
msgid "Copy to clipboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1125,7 +1125,7 @@ msgstr ""
|
|||||||
msgid "Covers from %1"
|
msgid "Covers from %1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:488 internet/groovesharkservice.cpp:1027
|
#: internet/groovesharkservice.cpp:488 internet/groovesharkservice.cpp:1031
|
||||||
msgid "Create a new Grooveshark playlist"
|
msgid "Create a new Grooveshark playlist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1265,7 +1265,7 @@ msgstr ""
|
|||||||
msgid "Delay between visualizations"
|
msgid "Delay between visualizations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:491 internet/groovesharkservice.cpp:1074
|
#: internet/groovesharkservice.cpp:491 internet/groovesharkservice.cpp:1078
|
||||||
msgid "Delete Grooveshark playlist"
|
msgid "Delete Grooveshark playlist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1880,11 +1880,11 @@ msgstr ""
|
|||||||
msgid "Genre"
|
msgid "Genre"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:922
|
#: internet/groovesharkservice.cpp:926
|
||||||
msgid "Get an URL to share this Grooveshark song"
|
msgid "Get an URL to share this Grooveshark song"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:701
|
#: internet/groovesharkservice.cpp:705
|
||||||
msgid "Getting Grooveshark popular songs"
|
msgid "Getting Grooveshark popular songs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1934,7 +1934,7 @@ msgstr ""
|
|||||||
msgid "Grooveshark login error"
|
msgid "Grooveshark login error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:954
|
#: internet/groovesharkservice.cpp:958
|
||||||
msgid "Grooveshark song's URL"
|
msgid "Grooveshark song's URL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2602,7 +2602,7 @@ msgstr ""
|
|||||||
msgid "My Recommendations"
|
msgid "My Recommendations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:1028 ui/equalizer.cpp:172
|
#: internet/groovesharkservice.cpp:1032 ui/equalizer.cpp:172
|
||||||
#: ../bin/src/ui_deviceproperties.h:369
|
#: ../bin/src/ui_deviceproperties.h:369
|
||||||
#: ../bin/src/ui_magnatunedownloaddialog.h:135
|
#: ../bin/src/ui_magnatunedownloaddialog.h:135
|
||||||
#: ../bin/src/ui_wizardfinishpage.h:84
|
#: ../bin/src/ui_wizardfinishpage.h:84
|
||||||
@ -3223,7 +3223,7 @@ msgstr ""
|
|||||||
msgid "Remove playlist"
|
msgid "Remove playlist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:1161
|
#: internet/groovesharkservice.cpp:1165
|
||||||
msgid "Removing song from favorites"
|
msgid "Removing song from favorites"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3301,7 +3301,7 @@ msgstr ""
|
|||||||
msgid "Results"
|
msgid "Results"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:672
|
#: internet/groovesharkservice.cpp:676
|
||||||
msgid "Retrieving Grooveshark favorites songs"
|
msgid "Retrieving Grooveshark favorites songs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3383,7 +3383,7 @@ msgid "Search"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharksearchplaylisttype.cpp:32
|
#: internet/groovesharksearchplaylisttype.cpp:32
|
||||||
#: internet/groovesharkservice.cpp:840
|
#: internet/groovesharkservice.cpp:844
|
||||||
msgid "Search Grooveshark"
|
msgid "Search Grooveshark"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -4143,7 +4143,7 @@ msgstr ""
|
|||||||
msgid "Unset cover"
|
msgid "Unset cover"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: internet/groovesharkservice.cpp:982
|
#: internet/groovesharkservice.cpp:986
|
||||||
msgid "Update Grooveshark playlist"
|
msgid "Update Grooveshark playlist"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user