Follow the parent category options

PR #19957.
Closes #19941.
This commit is contained in:
Vladimir Golovnev
2023-11-20 20:37:17 +03:00
committed by GitHub
parent 32fbacf615
commit a1c78a0455
9 changed files with 170 additions and 36 deletions

View File

@@ -155,13 +155,17 @@ namespace BitTorrent
virtual void setDownloadPathEnabled(bool enabled) = 0;
static bool isValidCategoryName(const QString &name);
static QString subcategoryName(const QString &category);
static QString parentCategoryName(const QString &category);
// returns category itself and all top level categories
static QStringList expandCategory(const QString &category);
virtual QStringList categories() const = 0;
virtual CategoryOptions categoryOptions(const QString &categoryName) const = 0;
virtual Path categorySavePath(const QString &categoryName) const = 0;
virtual Path categorySavePath(const QString &categoryName, const CategoryOptions &options) const = 0;
virtual Path categoryDownloadPath(const QString &categoryName) const = 0;
virtual Path categoryDownloadPath(const QString &categoryName, const CategoryOptions &options) const = 0;
virtual bool addCategory(const QString &name, const CategoryOptions &options = {}) = 0;
virtual bool editCategory(const QString &name, const CategoryOptions &options) = 0;
virtual bool removeCategory(const QString &name) = 0;