Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #304

  • Loading branch information...
commit 814749ff65fe1e99639f6148e13ebf2f2d5fae35 1 parent 687f64b
Daniel Kabel authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 settings/Settings.cpp
11 settings/Settings.cpp
View
@@ -3,6 +3,7 @@
#include <QNetworkProxy>
#include "data/ScraperInterface.h"
#include "globals/Manager.h"
+#include "renamer/Renamer.h"
Settings *Settings::m_instance = 0;
@@ -801,8 +802,14 @@ void Settings::loadFrodoDefaults()
void Settings::renamePatterns(int renameType, QString &fileNamePattern, QString &fileNamePatternMulti, QString &directoryPattern, QString &seasonPattern)
{
- fileNamePattern = m_settings.value(QString("RenamePattern/%1/FileName").arg(renameType), "<title>.<extension>").toString();
- fileNamePatternMulti = m_settings.value(QString("RenamePattern/%1/FileNameMulti").arg(renameType), "<title>-part<partNo>.<extension>").toString();
+ QString fileNamePatternDefault = "<title>.<extension>";
+ QString fileNamePatternMultiDefault = "<title>-part<partNo>.<extension>";
+ if (renameType == Renamer::TypeTvShows) {
+ fileNamePatternDefault = "S<season>E<episode> - <title>.<extension>";
+ fileNamePatternMultiDefault = "S<season>E<episode> - <title>-part<partNo>.<extension>";
+ }
+ fileNamePattern = m_settings.value(QString("RenamePattern/%1/FileName").arg(renameType), fileNamePatternDefault).toString();
+ fileNamePatternMulti = m_settings.value(QString("RenamePattern/%1/FileNameMulti").arg(renameType), fileNamePatternMultiDefault).toString();
directoryPattern = m_settings.value(QString("RenamePattern/%1/DirectoryPattern").arg(renameType), "<title> (<year>)").toString();
seasonPattern = m_settings.value(QString("RenamePattern/%1/SeasonPattern").arg(renameType), "Season <season>").toString();
}
Please sign in to comment.
Something went wrong with that request. Please try again.