mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Improved feed assignment behavior
This commit is contained in:
@@ -128,6 +128,9 @@ void RssDownloadRuleList::loadRulesFromVariantHash(const QVariantHash &h)
|
||||
void RssDownloadRuleList::saveRule(const RssDownloadRule &rule)
|
||||
{
|
||||
Q_ASSERT(rule.isValid());
|
||||
if(m_rules.contains(rule.name())) {
|
||||
removeRule(rule.name());
|
||||
}
|
||||
m_rules.insert(rule.name(), rule);
|
||||
// Update feedRules hashtable
|
||||
foreach(const QString &feed_url, rule.rssFeeds()) {
|
||||
@@ -150,15 +153,6 @@ void RssDownloadRuleList::removeRule(const QString &name)
|
||||
saveRulesToStorage();
|
||||
}
|
||||
|
||||
void RssDownloadRuleList::updateRule(const RssDownloadRule &rule)
|
||||
{
|
||||
if(!m_rules.contains(rule.name())) return;
|
||||
removeRule(rule.name());
|
||||
saveRule(rule);
|
||||
// Save rules
|
||||
saveRulesToStorage();
|
||||
}
|
||||
|
||||
void RssDownloadRuleList::renameRule(const QString &old_name, const QString &new_name)
|
||||
{
|
||||
if(!m_rules.contains(old_name)) return;
|
||||
|
||||
Reference in New Issue
Block a user