mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 03:50:20 -07:00
RSS episode filter refactoring and logging (prep for later commits).
--HG-- branch : magao-dev
This commit is contained in:
parent
043ae1eb17
commit
2244b7cb66
4 changed files with 54 additions and 20 deletions
|
@ -71,10 +71,9 @@ AutomatedRssDownloader::AutomatedRssDownloader(const QWeakPointer<Rss::Manager>
|
|||
Q_ASSERT(ok);
|
||||
m_ruleList = manager.toStrongRef()->downloadRules();
|
||||
m_editableRuleList = new Rss::DownloadRuleList; // Read rule list from disk
|
||||
m_episodeValidator = new QRegExpValidator(
|
||||
QRegExp("^(^[1-9]{1,1}\\d{0,3}x([1-9]{1,1}\\d{0,3}(-([1-9]{1,1}\\d{0,3})?)?;){1,}){1,1}",
|
||||
Qt::CaseInsensitive),
|
||||
ui->lineEFilter);
|
||||
m_episodeRegex = new QRegExp("^(^[1-9]{1,1}\\d{0,3}x([1-9]{1,1}\\d{0,3}(-([1-9]{1,1}\\d{0,3})?)?;){1,}){1,1}",
|
||||
Qt::CaseInsensitive);
|
||||
m_episodeValidator = new QRegExpValidator(*m_episodeRegex, ui->lineEFilter);
|
||||
ui->lineEFilter->setValidator(m_episodeValidator);
|
||||
QString tip = "<p>" + tr("Matches articles based on episode filter.") + "</p><p><b>" + tr("Example: ")
|
||||
+ "1x2;8-15;5;30-;</b>" + tr(" will match 2, 5, 8 through 15, 30 and onward episodes of season one", "example X will match") + "</p>";
|
||||
|
@ -134,6 +133,7 @@ AutomatedRssDownloader::~AutomatedRssDownloader()
|
|||
delete ui;
|
||||
delete m_editableRuleList;
|
||||
delete m_episodeValidator;
|
||||
delete m_episodeRegex;
|
||||
}
|
||||
|
||||
void AutomatedRssDownloader::loadSettings()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue