extragear/multimedia/amarok/src
Bart Cerneels
bart.cerneels at kde.org
Mon Mar 10 08:51:23 CET 2008
On Mon, Mar 10, 2008 at 7:56 AM, Maximilian Kossick
<maximilian.kossick at googlemail.com> wrote:
> use MetaProxys and do the following
> 1)save old metadata somewhere and pass it to MetaProxy as temporary
> metadata (not implemented yet, but should be pretty easy to do)
> 2) fix the playlist code so that it is able to regroup tracks after
> the playlist was notified of a metadata change
> 3) collectionmanager needs a trackProviderAdded signal, and MetaProxy
> has to use that instead of collectionAdded
I was wondering how to use MetaProxy for that specific funtion, this
sound like a very good sollution.
>
>
>
> On Mon, Mar 10, 2008 at 5:12 AM, Dan <hydrogen at notyetimplemented.com> wrote:
> > 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...
I had to enable it to test the playlist saving, which was also broken.
Well, at least now we have exposed the problem -before- we release the alpha.
> >
> > Comments?
Let's just try to fix the problems, seems maxx_k knows how to do it elegantly.
> > >
> > >
> > > 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();
> > >
> >
> > _______________________________________________
> > Amarok-devel mailing list
> > Amarok-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/amarok-devel
> >
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>
More information about the Amarok-devel
mailing list