1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

This shouldn't really be needed but maybe it fixes zizzifizzix's problem (or at least, anyone else from having it)

This commit is contained in:
Jeff Mitchell
2011-06-15 08:46:01 -04:00
parent 1c59840dd1
commit be86cdd97c

View File

@@ -151,15 +151,27 @@ TomahawkSettings::scannerPaths()
#ifndef TOMAHAWK_HEADLESS #ifndef TOMAHAWK_HEADLESS
if( value( "scanner/paths" ).isNull() ) if( value( "scanner/paths" ).isNull() )
{ {
setValue( "scanner/paths", value( "scannerpath" ) ); if ( !value( "scannerpath" ).isNull() )
setValue( "scanner/paths", QStringList( value( "scannerpath" ).toString() ) );
else if ( !value( "scannerpaths" ).isNull() )
setValue( "scanner/paths", value( "scannerpaths" ) );
sync();
remove( "scannerpath" ); remove( "scannerpath" );
remove( "scannerpaths" );
sync();
} }
return value( "scanner/paths", QDesktopServices::storageLocation( QDesktopServices::MusicLocation ) ).toStringList(); return value( "scanner/paths", QDesktopServices::storageLocation( QDesktopServices::MusicLocation ) ).toStringList();
#else #else
if( value( "scanner/paths" ).isNull() ) if( value( "scanner/paths" ).isNull() )
{ {
setValue( "scanner/paths", value( "scannerpath" ) ); if ( !value( "scannerpath" ).isNull() )
setValue( "scanner/paths", QStringList( value( "scannerpath" ).toString() ) );
else if ( !value( "scannerpaths" ).isNull() )
setValue( "scanner/paths", value( "scannerpaths" ) );
sync();
remove( "scannerpath" ); remove( "scannerpath" );
remove( "scannerpaths" );
sync();
} }
return value( "scanner/paths", "" ).toStringList(); return value( "scanner/paths", "" ).toStringList();
#endif #endif
@@ -177,7 +189,7 @@ bool
TomahawkSettings::hasScannerPaths() const TomahawkSettings::hasScannerPaths() const
{ {
//FIXME: After enough time, remove this hack //FIXME: After enough time, remove this hack
return contains( "scanner/paths" ) || contains( "scannerpath" ); return contains( "scanner/paths" ) || contains( "scannerpath" ) || contains( "scannerpaths" );
} }