Commit 983a45f025d11d554fb4b47337de258be125c0af
- Diff rendering mode:
- inline
- side by side
ChangeLog
(2 / 0)
|   | |||
| 7 | 7 | FEATURES: | |
| 8 | 8 | ||
| 9 | 9 | CHANGES: | |
| 10 | * Allow moodbar files witout the leading '.' (both .<trackfilename>.mood | ||
| 11 | and <trackfilename>.mood now work) | ||
| 10 | 12 | ||
| 11 | 13 | BUGFIXES: | |
| 12 | 14 |
src/moodbar/MoodbarManager.cpp
(17 / 2)
|   | |||
| 99 | 99 | if( !QFile::exists( moodFilePath ) ) | |
| 100 | 100 | { | |
| 101 | 101 | debug() << "no such file"; | |
| 102 | m_hasMoodMap.insert( track, false ); | ||
| 103 | return false; | ||
| 102 | //for fun, try without the leading '.' | ||
| 103 | |||
| 104 | QFileInfo fInfo( moodFilePath ); | ||
| 105 | QString testName = fInfo.fileName(); | ||
| 106 | testName.remove( 0, 1 ); | ||
| 107 | |||
| 108 | moodFilePath.replace( fInfo.fileName(), testName ); | ||
| 109 | |||
| 110 | debug() << "trying : " << moodFilePath; | ||
| 111 | if( !QFile::exists( moodFilePath ) ) | ||
| 112 | { | ||
| 113 | debug() << "no luck removing the leading '.' either..."; | ||
| 114 | m_hasMoodMap.insert( track, false ); | ||
| 115 | return false; | ||
| 116 | } | ||
| 117 | |||
| 118 | debug() << "whoops, missing leading '.', so mood file path: " << moodFilePath; | ||
| 104 | 119 | } | |
| 105 | 120 | ||
| 106 | 121 | //it is a local file with a matching .mood file. Good enough for now! |

