New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: categories cleanup #10006
core: categories cleanup #10006
Conversation
ngosang
commented
Oct 27, 2020
- swap categories 2050 Movies/BluRay / 2060 Movies/3D
- swap categories 6050 XXX/Pack / 6070 XXX/Other
- swap categories 7010 Books/Mags / 7020 Books/EBook / 7030 Books/Comics
- category validation is case sensitive
- renamed some categories to follow Newznab specs
acc568e
to
b99b55d
Compare
@garfield69 take a look at this PR. |
* swap categories 2050 Movies/BluRay / 2060 Movies/3D * swap categories 6050 XXX/Pack / 6070 XXX/Other * swap categories 7010 Books/Mags / 7020 Books/EBook / 7030 Books/Comics * category validation is case sensitive * renamed some categories to follow Newznab specs
b99b55d
to
e89297a
Compare
@Taloth Sorry to bother you but we need an expert in Newznab / Torznab.
|
The best approach there is to look at newznab and nzedb for those special categories and just pick something that's best. (https://github.com/nZEDb/nZEDb/blob/b485fa326a0ff1f47ce144164eb1f070e406b555/resources/db/schema/data/10-categories.tsv) For the categories specified in the newznab documentation you definitely should try to follow it, because it means defaults like 5070 will work properly. The torznab spec refers to newznab and only adds a few new attributes for seeds, not categories. So there's no 'one truth'. It's perhaps possible to contact bb and see if the official list can be extended. But there's already some divergence so it probably doesn't matter much. Edit to add: I just saw you swapped 2050 and 2060... That's clearly newznab vs nzedb. nzedb has them inverted. |
Since there is not a clear standard I think we should follow Newznab as close as possible and add new categories when required. This PR is moving in that direction. @garfield69 We should update the Wiki to add reference links to make it clear what specs we are following.
I don't have access, but I think it's not really important since they are not standard. Will be interesting to see if they have more new categories. @Taloth could you share the
We are already adding custom categories in most trackers but there are some bugs in the code like #9746 I'm working on it. Offtopic: the Torznab caps in Jackett are wrong too. In one indexer with only 2 categories ( <categories>
<category id="100048" name="Movie/HD/Bluray"/>
<category id="100007" name="Movie/Xvid"/>
<category id="2000" name="Movies">
<subcat id="2010" name="Movies/Foreign"/>
<subcat id="2020" name="Movies/Other"/>
<subcat id="2030" name="Movies/SD"/>
<subcat id="2040" name="Movies/HD"/>
<subcat id="2045" name="Movies/UHD"/>
<subcat id="2050" name="Movies/3D"/>
<subcat id="2060" name="Movies/BluRay"/>
<subcat id="2070" name="Movies/DVD"/>
<subcat id="2080" name="Movies/WEBDL"/>
</category>
<category id="2030" name="Movies/SD"/>
<category id="2040" name="Movies/HD"/>
</categories> It's wrong because we are adding all subcategories of Movies (most of them are not supported) and some categories like <categories>
<category id="2000" name="Movies">
<subcat id="2030" name="Movies/SD"/>
<subcat id="2040" name="Movies/HD"/>
</category>
<category id="100048" name="Movie/HD/Bluray"/>
<category id="100007" name="Movie/Xvid"/>
</categories> This should solve some issues in Sonarr category tree. @garfield69 If you agree you can merge this PR. |
I could, but most indexers do not require an apikey: https://nzbgeek.info/api?t=caps (newznab 1.0.0, not sure if that's an actual newznab version)
Right, so you have to map the string category to an internal number, and alias that to an official newznab category. Here's what we did for hdaccess (no long exists, but was one of the two trackers that natively supported torznab).
It's not necessarily wrong to have subcategories that don't contain any releases, in fact it could be useful in some cases. It's like "Yes I recognize this category". In fact, by default Sonarr only selects 5030 and 5040. |
add 6045(XXXSD), 6080(XXXWEBDL), 6090(XXXUHD)
the dashboard continued to use the old names for categories until I used Shift-F5 to flush the Chrome browser cache |
That's not going to work and it's not necessary. Maybe some of them need to close and reopen the browser to see the new cats but it's not a big deal. 😃 |
* Core: Categories are stored in a real tree * Sorting: First Torznab categories sorted by Id and then custom cats sorted by Name * Filtering: Results with child category are not removed when searching by parent category. Details in Jackett#8049 * Jacket UI: Add parent category when at least one child category exists * Torznab (caps): Remove non existent children categories. Remove duplicated categories. Details in Jackett#10006
* Core: Categories are stored in a real tree * Sorting: First Torznab categories sorted by Id and then custom cats sorted by Name * Filtering: Results with child category are not removed when searching by parent category. Details in Jackett#8049 * Jacket UI: Add parent category when at least one child category exists * Torznab (caps): Remove non existent children categories. Remove duplicated categories. Details in Jackett#10006
* Core: Categories are stored in a real tree * Sorting: First Torznab categories sorted by Id and then custom cats sorted by Name * Filtering: Results with child category are not removed when searching by parent category. Details in Jackett#8049 * Jacket UI: Add parent category when at least one child category exists * Torznab (caps): Remove non existent children categories. Remove duplicated categories. Details in Jackett#10006
* Core: Categories are stored in a real tree * Sorting: First Torznab categories sorted by Id and then custom cats sorted by Name * Filtering: Results with child category are not removed when searching by parent category. Details in #8049 * Jacket UI: Add parent category when at least one child category exists * Torznab (caps): Remove non existent children categories. Remove duplicated categories. Details in #10006