1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-21 13:21:52 +02:00

* Fixed displaying filename in properties dialog.

This commit is contained in:
Christian Muehlhaeuser
2013-04-29 01:47:22 +02:00
parent 87311cfbd7
commit b4752ba7a6

View File

@@ -35,8 +35,6 @@
#include "utils/Logger.h"
#include "taglib/fileref.h"
#include <QDialog>
#include <QDialogButtonBox>
#include <QFileInfo>
@@ -231,7 +229,11 @@ MetadataEditor::loadResult( const Tomahawk::result_ptr& result )
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() );
setFileSize( TomahawkUtils::filesizeToString( fi.size() ) );
}