Add save path and editing to WebUI new category dialog

This commit is contained in:
Thomas Piccirello
2018-07-23 01:49:34 -04:00
committed by sledgehammer999
parent c28cbe0a74
commit c3f002a544
12 changed files with 197 additions and 71 deletions

View File

@@ -1210,10 +1210,8 @@ void TorrentHandle::setName(const QString &name)
bool TorrentHandle::setCategory(const QString &category)
{
if (m_category != category) {
if (!category.isEmpty()) {
if (!Session::isValidCategoryName(category) || !m_session->categories().contains(category))
return false;
}
if (!category.isEmpty() && !m_session->categories().contains(category))
return false;
QString oldCategory = m_category;
m_category = category;