From aad6401cec0c7c6f3f0ec71107ba33c6a0e264c2 Mon Sep 17 00:00:00 2001 From: Mattias Andersson Date: Fri, 20 Feb 2015 21:09:04 +0100 Subject: [PATCH] Use consistent string replacment scheme Make the CD ripper dialog use the same naming scheme for replacement strings as the organise dialog. --- src/ripper/ripcddialog.cpp | 14 ++++++++------ src/ripper/ripcddialog.ui | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ripper/ripcddialog.cpp b/src/ripper/ripcddialog.cpp index b567473cd..3912e5f74 100644 --- a/src/ripper/ripcddialog.cpp +++ b/src/ripper/ripcddialog.cpp @@ -286,12 +286,14 @@ QString RipCDDialog::GetOutputFileName(const QString& basename) const { QString RipCDDialog::ParseFileFormatString(const QString& file_format, int track_no) const { QString to_return = file_format; - to_return.replace(QString("%artist%"), ui_->artistLineEdit->text()); - to_return.replace(QString("%album%"), ui_->albumLineEdit->text()); - to_return.replace(QString("%genre%"), ui_->genreLineEdit->text()); - to_return.replace(QString("%year%"), ui_->yearLineEdit->text()); - to_return.replace(QString("%tracknum%"), QString::number(track_no)); - to_return.replace(QString("%track%"), + to_return.replace(QString("%artist"), ui_->artistLineEdit->text()); + to_return.replace(QString("%album"), ui_->albumLineEdit->text()); + to_return.replace(QString("%disc"), ui_->discLineEdit->text()); + to_return.replace(QString("%genre"), ui_->genreLineEdit->text()); + to_return.replace(QString("%year"), ui_->yearLineEdit->text()); + to_return.replace(QString("%title"), track_names_.value(track_no - 1)->text()); + to_return.replace(QString("%track"), QString::number(track_no)); + return to_return; } diff --git a/src/ripper/ripcddialog.ui b/src/ripper/ripcddialog.ui index 040f7f54b..66213f454 100644 --- a/src/ripper/ripcddialog.ui +++ b/src/ripper/ripcddialog.ui @@ -204,7 +204,7 @@ - %tracknum% - %artist% - %track% + %track - %artist - %title