Summary: | organize files: when the year is not set in the tags it always sets it to 0 | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Vasilis Vasaitis <vvasaitis> |
Component: | Collections/Local | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | matej, ralf-engels, unnamedrambler |
Priority: | NOR | ||
Version: | 2.3.0.90 | ||
Target Milestone: | 2.3.2 | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.3.2 |
Description
Vasilis Vasaitis
2010-05-16 15:55:44 UTC
Thanks for the report! Fix coming soon. commit f69f3f947b02e5e105589eb1d41eb802de35f042 Author: Casey Link <unnamedrambler@gmail.com> Date: Sat May 29 14:44:36 2010 -0500 When a track has no year, organize dialog should replace %year with an empty string, before it was replacing it with 0. BUG: 237834 diff --git a/ChangeLog b/ChangeLog index e80a6a5..4534e99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,8 @@ VERSION 2.3.2-Beta 1 Patch by Richard Longland <rlongland@hotmail.com>. BUGFIXES: + * Fixed organize dialog's handling of the year tag. If there is no year + then the %year token should be an empty string.(BR 237834) * The "Ignore 'The'" option in the organize files dialog is now case insensitive. (BR 237831) * Filenames with dots (.) and other special RegEx characters will now be diff --git a/src/dialogs/OrganizeCollectionDialog.cpp b/src/dialogs/OrganizeCollectionDialog.cpp index ffebbbb..ff2ddac 100644 --- a/src/dialogs/OrganizeCollectionDialog.cpp +++ b/src/dialogs/OrganizeCollectionDialog.cpp @@ -171,7 +171,10 @@ OrganizeCollectionDialog::buildDestination( const QString &format, const Meta::T args["folder"] = ui->folderCombo->currentText(); args["title"] = cleanPath( track->prettyName() ); args["composer"] = track->composer() ? cleanPath( track->composer()->prettyName() ) : QString(); - args["year"] = track->year() ? cleanPath( track->year()->prettyName() ) : QString(); + + // if year == 0 then we don't want include it + QString year = track->year() ? cleanPath( track->year()->prettyName() ) : QString(); + args["year"] = year.localeAwareCompare( "0" ) == 0 ? QString() : year; args["album"] = track->album() ? cleanPath( track->album()->prettyName() ) : QString(); if( track->discNumber() ) |