mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-22 05:33:32 +02:00
* Fixed displaying filename in properties dialog.
This commit is contained in:
@@ -35,8 +35,6 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "taglib/fileref.h"
|
#include "taglib/fileref.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -231,7 +229,11 @@ MetadataEditor::loadResult( const Tomahawk::result_ptr& result )
|
|||||||
|
|
||||||
if ( result->collection() && result->collection()->source()->isLocal() )
|
if ( result->collection() && result->collection()->source()->isLocal() )
|
||||||
{
|
{
|
||||||
QFileInfo fi( QUrl( m_result->url() ).toLocalFile() );
|
QString furl = m_result->url();
|
||||||
|
if ( furl.startsWith( "file://" ) )
|
||||||
|
furl = furl.right( furl.length() - 7 );
|
||||||
|
|
||||||
|
QFileInfo fi( furl );
|
||||||
setFileName( fi.absoluteFilePath() );
|
setFileName( fi.absoluteFilePath() );
|
||||||
setFileSize( TomahawkUtils::filesizeToString( fi.size() ) );
|
setFileSize( TomahawkUtils::filesizeToString( fi.size() ) );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user