extragear/multimedia/amarok/src

Dan hydrogen at notyetimplemented.com
Mon Mar 10 05:12:00 CET 2008


Bart Cerneels wrote:
> SVN commit 783619 by shanachie:
>
> Fix the playlist session restoring. Default saving to M3U now since there is still a minor problem with XSPF.
>   
Hi,

This was disabled originally because of problems that have not been fixed:

1) Metadata filling in on start;
2) Grouping in the playlist doesn't work because of the delayed metadata,
3) It introduces crashes with service tracks.

I don't think this should be reenabled until these issues are dealt with...

Comments?
>
>
>  M  +0 -1      meta/PlaylistFileSupport.cpp  
>  M  +6 -0      playlist/PlaylistModel.cpp  
>  M  +1 -1      playlist/PlaylistModel.h  
>  M  +6 -0      playlistmanager/PlaylistManager.cpp  
>
>
> --- trunk/extragear/multimedia/amarok/src/meta/PlaylistFileSupport.cpp #783618:783619
> @@ -67,7 +67,6 @@
>          debug() << "local file";
>  
>          file.setFileName( url.path() );
> -        file.open( QFile::ReadOnly );
>  
>          if( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
>          {
> --- trunk/extragear/multimedia/amarok/src/playlist/PlaylistModel.cpp #783618:783619
> @@ -88,6 +88,12 @@
>      QAction* redoButton  = m_undoStack->createRedoAction( this, i18n("Redo") );
>      ac->addAction("playlist_redo", redoButton);
>      redoButton->setIcon( KIcon( "edit-redo-amarok" ) );
> +
> +    //FIXME: because the restoring in app.cpp:711 causes problems we do it here. This doesn't respect the command line flags though.
> +    if ( AmarokConfig::savePlaylist() )
> +    {
> +        The::playlistModel()->restoreSession();
> +    }
>  }
>  
>  Model::~Model()
> --- trunk/extragear/multimedia/amarok/src/playlist/PlaylistModel.h #783618:783619
> @@ -156,7 +156,7 @@
>              ///Return list of items in playlist
>              QList<Item*> itemList() const { return m_items; }
>  
> -            inline const QString defaultPlaylistPath() const { return Amarok::saveLocation() + "current.xspf"; }
> +            inline const QString defaultPlaylistPath() const { return Amarok::saveLocation() + "current.m3u"; }
>  
>  
>              /**
> --- trunk/extragear/multimedia/amarok/src/playlistmanager/PlaylistManager.cpp #783618:783619
> @@ -214,6 +214,12 @@
>      Meta::M3UPlaylistPtr playlist( new Meta::M3UPlaylist( tracks ) );
>  
>      QFile file( location );
> +    if (!file.open( QIODevice::WriteOnly | QIODevice::Text ))
> +    {
> +        debug() << "failed to open file " << location;
> +        return false;
> +    }
> +
>      playlist->save( file, AmarokConfig::relativePlaylist() );
>  
>      file.close();
>   



More information about the Amarok-devel mailing list