Commit 6b0c72b9 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Library: Save media list from Library class & ensure they are saved with their workspace path

parent 8593ed1f
...@@ -94,7 +94,11 @@ Library::save( QXmlStreamWriter& project ) ...@@ -94,7 +94,11 @@ Library::save( QXmlStreamWriter& project )
project.writeStartElement( "medias" ); project.writeStartElement( "medias" );
while ( it != end ) while ( it != end )
{ {
it.value()->getMedia()->save( project ); Q_ASSERT( (*it)->isRootClip() == true );
const Media* m = (*it)->getMedia();
project.writeStartElement( "media" );
project.writeAttribute( "mrl", m_workspace->toWorkspacePath( m ) );
project.writeEndElement();
++it; ++it;
} }
project.writeEndElement(); project.writeEndElement();
......
...@@ -111,14 +111,6 @@ Media::source() const ...@@ -111,14 +111,6 @@ Media::source() const
return m_source; return m_source;
} }
void
Media::save( QXmlStreamWriter& project )
{
project.writeStartElement( "media" );
project.writeAttribute( "mrl", m_fileInfo->absoluteFilePath() );
project.writeEndElement();
}
void void
Media::setBaseClip( Clip *clip ) Media::setBaseClip( Clip *clip )
{ {
......
...@@ -95,8 +95,6 @@ public: ...@@ -95,8 +95,6 @@ public:
const Clip* baseClip() const { return m_baseClip; } const Clip* baseClip() const { return m_baseClip; }
void setBaseClip( Clip* clip ); void setBaseClip( Clip* clip );
void save( QXmlStreamWriter& project );
void onMetaDataComputed(); void onMetaDataComputed();
// This has to be called from the GUI thread. // This has to be called from the GUI thread.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment