Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixes #304

  • Loading branch information...
commit 814749ff65fe1e99639f6148e13ebf2f2d5fae35 1 parent 687f64b
Daniel Kabel authored

Showing 1 changed file with 9 additions and 2 deletions. Show diff stats Hide diff stats

  1. +9 2 settings/Settings.cpp
11 settings/Settings.cpp
@@ -3,6 +3,7 @@
3 3 #include <QNetworkProxy>
4 4 #include "data/ScraperInterface.h"
5 5 #include "globals/Manager.h"
  6 +#include "renamer/Renamer.h"
6 7
7 8 Settings *Settings::m_instance = 0;
8 9
@@ -801,8 +802,14 @@ void Settings::loadFrodoDefaults()
801 802
802 803 void Settings::renamePatterns(int renameType, QString &fileNamePattern, QString &fileNamePatternMulti, QString &directoryPattern, QString &seasonPattern)
803 804 {
804   - fileNamePattern = m_settings.value(QString("RenamePattern/%1/FileName").arg(renameType), "<title>.<extension>").toString();
805   - fileNamePatternMulti = m_settings.value(QString("RenamePattern/%1/FileNameMulti").arg(renameType), "<title>-part<partNo>.<extension>").toString();
  805 + QString fileNamePatternDefault = "<title>.<extension>";
  806 + QString fileNamePatternMultiDefault = "<title>-part<partNo>.<extension>";
  807 + if (renameType == Renamer::TypeTvShows) {
  808 + fileNamePatternDefault = "S<season>E<episode> - <title>.<extension>";
  809 + fileNamePatternMultiDefault = "S<season>E<episode> - <title>-part<partNo>.<extension>";
  810 + }
  811 + fileNamePattern = m_settings.value(QString("RenamePattern/%1/FileName").arg(renameType), fileNamePatternDefault).toString();
  812 + fileNamePatternMulti = m_settings.value(QString("RenamePattern/%1/FileNameMulti").arg(renameType), fileNamePatternMultiDefault).toString();
806 813 directoryPattern = m_settings.value(QString("RenamePattern/%1/DirectoryPattern").arg(renameType), "<title> (<year>)").toString();
807 814 seasonPattern = m_settings.value(QString("RenamePattern/%1/SeasonPattern").arg(renameType), "Season <season>").toString();
808 815 }

0 comments on commit 814749f

Please sign in to comment.
Something went wrong with that request. Please try again.