mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
Some normalization
This commit is contained in:
@@ -149,24 +149,24 @@ Collection::deleteStation( const dynplaylist_ptr& s )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
playlist_ptr
|
Tomahawk::playlist_ptr
|
||||||
Collection::playlist( const QString& guid )
|
Collection::playlist( const QString& guid )
|
||||||
{
|
{
|
||||||
return m_playlists.value( guid, playlist_ptr() );
|
return m_playlists.value( guid, Tomahawk::playlist_ptr() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dynplaylist_ptr
|
Tomahawk::dynplaylist_ptr
|
||||||
Collection::autoPlaylist( const QString& guid )
|
Collection::autoPlaylist( const QString& guid )
|
||||||
{
|
{
|
||||||
return m_autoplaylists.value( guid, dynplaylist_ptr() );
|
return m_autoplaylists.value( guid, Tomahawk::dynplaylist_ptr() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dynplaylist_ptr
|
Tomahawk::dynplaylist_ptr
|
||||||
Collection::station( const QString& guid )
|
Collection::station( const QString& guid )
|
||||||
{
|
{
|
||||||
return m_stations.value( guid, dynplaylist_ptr() );
|
return m_stations.value( guid, Tomahawk::dynplaylist_ptr() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -596,19 +596,19 @@ GlobalActionManager::handleAutoPlaylistCommand( const QUrl& url )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dynplaylist_ptr
|
Tomahawk::dynplaylist_ptr
|
||||||
GlobalActionManager::loadDynamicPlaylist( const QUrl& url, bool station )
|
GlobalActionManager::loadDynamicPlaylist( const QUrl& url, bool station )
|
||||||
{
|
{
|
||||||
QStringList parts = url.path().split( "/" ).mid( 1 ); // get the rest of the command
|
QStringList parts = url.path().split( "/" ).mid( 1 ); // get the rest of the command
|
||||||
if( parts.isEmpty() ) {
|
if( parts.isEmpty() ) {
|
||||||
tLog() << "No specific station command:" << url.toString();
|
tLog() << "No specific station command:" << url.toString();
|
||||||
return dynplaylist_ptr();
|
return Tomahawk::dynplaylist_ptr();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( parts[ 0 ] == "create" ) {
|
if( parts[ 0 ] == "create" ) {
|
||||||
if( !url.hasQueryItem( "title" ) || !url.hasQueryItem( "type" ) ) {
|
if( !url.hasQueryItem( "title" ) || !url.hasQueryItem( "type" ) ) {
|
||||||
tLog() << "Station create command needs title and type..." << url.toString();
|
tLog() << "Station create command needs title and type..." << url.toString();
|
||||||
return dynplaylist_ptr();
|
return Tomahawk::dynplaylist_ptr();
|
||||||
}
|
}
|
||||||
QString title = url.queryItemValue( "title" );
|
QString title = url.queryItemValue( "title" );
|
||||||
QString type = url.queryItemValue( "type" );
|
QString type = url.queryItemValue( "type" );
|
||||||
@@ -737,7 +737,7 @@ GlobalActionManager::loadDynamicPlaylist( const QUrl& url, bool station )
|
|||||||
return pl;
|
return pl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return dynplaylist_ptr();
|
return Tomahawk::dynplaylist_ptr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -152,7 +152,7 @@ DynamicPlaylist::create( const Tomahawk::source_ptr& author,
|
|||||||
bool autoLoad
|
bool autoLoad
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
dynplaylist_ptr dynplaylist = dynplaylist_ptr( new DynamicPlaylist( author, guid, title, info, creator, type, mode, shared, autoLoad ) );
|
dynplaylist_ptr dynplaylist = Tomahawk::dynplaylist_ptr( new DynamicPlaylist( author, guid, title, info, creator, type, mode, shared, autoLoad ) );
|
||||||
|
|
||||||
DatabaseCommand_CreateDynamicPlaylist* cmd = new DatabaseCommand_CreateDynamicPlaylist( author, dynplaylist, autoLoad );
|
DatabaseCommand_CreateDynamicPlaylist* cmd = new DatabaseCommand_CreateDynamicPlaylist( author, dynplaylist, autoLoad );
|
||||||
connect( cmd, SIGNAL(finished()), dynplaylist.data(), SIGNAL(created()) );
|
connect( cmd, SIGNAL(finished()), dynplaylist.data(), SIGNAL(created()) );
|
||||||
|
@@ -865,7 +865,7 @@ ViewManager::playlistForInterface( Tomahawk::playlistinterface_ptr interface ) c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return playlist_ptr();
|
return Tomahawk::playlist_ptr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -880,7 +880,7 @@ ViewManager::dynamicPlaylistForInterface( Tomahawk::playlistinterface_ptr interf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return dynplaylist_ptr();
|
return Tomahawk::dynplaylist_ptr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ RecentlyPlayedPlaylistsModel::loadFromSettings()
|
|||||||
{
|
{
|
||||||
// qDebug() << "loading playlist" << playlist_guids[i];
|
// qDebug() << "loading playlist" << playlist_guids[i];
|
||||||
|
|
||||||
playlist_ptr pl = m_cached.value( playlist_guids[i], playlist_ptr() );
|
playlist_ptr pl = m_cached.value( playlist_guids[i], Tomahawk::playlist_ptr() );
|
||||||
if( pl.isNull() )
|
if( pl.isNull() )
|
||||||
pl = Tomahawk::Playlist::load( playlist_guids[i] );
|
pl = Tomahawk::Playlist::load( playlist_guids[i] );
|
||||||
if( pl.isNull() )
|
if( pl.isNull() )
|
||||||
|
Reference in New Issue
Block a user