mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Require torrent category creation to be explicit
This commit is contained in:
committed by
sledgehammer999
parent
e29ab0087b
commit
435daaceed
@@ -1211,10 +1211,8 @@ bool TorrentHandle::setCategory(const QString &category)
|
||||
{
|
||||
if (m_category != category) {
|
||||
if (!category.isEmpty()) {
|
||||
if (!Session::isValidCategoryName(category)) return false;
|
||||
if (!m_session->categories().contains(category))
|
||||
if (!m_session->addCategory(category))
|
||||
return false;
|
||||
if (!Session::isValidCategoryName(category) || !m_session->categories().contains(category))
|
||||
return false;
|
||||
}
|
||||
|
||||
QString oldCategory = m_category;
|
||||
|
||||
Reference in New Issue
Block a user