Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Open more than just tracks for Spotify from the commandline #180

Closed
wants to merge 1 commit into from

1 participant

@xhochy
Collaborator

Things like opening playlists is already supported by the code but only used for DropJobs

@xhochy
Collaborator

Args. Contains code that will come up later as a separate pull request.

@xhochy xhochy closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  src/TomahawkApp.cpp
@@ -671,7 +671,7 @@ TomahawkApp::loadUrl( const QString& url )
#ifndef ENABLE_HEADLESS
if ( url.startsWith( "tomahawk://" ) )
return GlobalActionManager::instance()->parseTomahawkLink( url );
- else if ( url.contains( "open.spotify.com" ) || url.contains( "spotify:track" ) )
+ else if ( url.contains( "open.spotify.com" ) || url.startsWith( "spotify:" ) )
return GlobalActionManager::instance()->openSpotifyLink( url );
else if ( url.contains( "www.rdio.com" ) )
return GlobalActionManager::instance()->openRdioLink( url );
View
12 src/libtomahawk/accounts/spotify/SpotifyAccount.cpp
@@ -1396,6 +1396,18 @@ SpotifyAccount::sendMessage( const QVariantMap &m, QObject* obj, const QString&
return qid;
}
+bool
+SpotifyAccount::hasPlaylist(const QString& plId)
+{
+ return m_updaters.contains( plId );
+}
+
+Tomahawk::playlist_ptr
+SpotifyAccount::playlistForURI(const QString& plId)
+{
+ m_updaters[ plId ];
+}
+
void
SpotifyAccount::registerUpdaterForPlaylist( const QString& plId, SpotifyPlaylistUpdater* updater )
View
3  src/libtomahawk/accounts/spotify/SpotifyAccount.h
@@ -103,7 +103,8 @@ class DLLEXPORT SpotifyAccount : public CustomAtticaAccount
virtual SipPlugin* sipPlugin() { return 0; }
virtual bool preventEnabling() const { return m_preventEnabling; }
-
+ bool hasPlaylist( const QString& plId );
+ Tomahawk::playlist_ptr playlistForURI( const QString& plId );
void registerUpdaterForPlaylist( const QString& plId, SpotifyPlaylistUpdater* updater );
void registerPlaylistInfo( const QString& name, const QString& plid, const QString &revid, const bool sync, const bool subscribed , const bool owner = false);
void registerPlaylistInfo( SpotifyPlaylistInfo* info );
Something went wrong with that request. Please try again.