Repository: Flexget/Flexget

Issue:
Missing categories from Alpharatio plugin
<!---
Before opening an issue, verify:

- Is this a feature request? Post it on https://feathub.com/Flexget/Flexget
- Did you recently upgrade? Look at the Change Log and Upgrade Actions to make sure that you don't need to make any changes to your config https://flexget.com/ChangeLog https://flexget.com/UpgradeActions
- Are you running FlexGet as a daemon? Stop it completely and then start it again https://flexget.com/CLI/daemon
- Did you search to see if the issue already exists? https://github.com/Flexget/Flexget/issues
- Did you fill out the issue template as completely as possible?

The issue template is here because it helps to ensure you submitted all the necessary information the first time, and allows us to more quickly review issues. Please fill it out correctly and do not ignore it, no matter how irrelevant you think it may be. Thanks in advance for your help with this!
--->

### Expected behaviour:

Alpharatio plugin support all categories listed on website

### Actual behaviour:

Task fails when using missing category

### Steps to reproduce:

Run task with categories missing (TvUHD, TvPackUHD, MovieUHD, MoviePackUHD)

#### Config:
```yaml
tasks:

  search-tv:
    priority: 2
    template:
      - global-settings
      - tv-settings
    discover:
      what:
        - next_series_episodes: yes
      from:
        - alpharatio:
            <<: *alpharatio_credentials
            category: TvHD, TvUHD
        - iptorrents: 
            <<: *iptorrents_credentials
            category: [22, 5, 99]
        - torrentleech: 
            <<: *torrentleech_credentials
            category: [32]
      interval: 3 hours
    cfscraper: yes

  search-movies:
    priority: 3
    template:
      - global-settings
      - movie-settings
    discover:
      release_estimations:
        optimistic: 30 days
      what:
        - movie_list: Movies
      from:
        - alpharatio:
            <<: *alpharatio_credentials
            category: MovieHD, MovieUHD
        - torrentleech: 
            <<: *torrentleech_credentials
            category: [14, 37, 47]
        - iptorrents: 
            <<: *iptorrents_credentials
            category: [48, 20, 100, 101]
      interval: 3 hours
    cfscraper: yes
```
  
#### Log:
<details>
 <summary>(click to expand)</summary>

[/tasks/search-tv/discover/from/0/alpharatio/category] Must be one of the following: tvsd, tvhd, tvdvdrip, tvpacksd, tvpackhd, moviesd, moviehd, moviepacksd, moviepackhd, moviexxx, mvid, gamespc, gamesxbox, gamesps3, gameswii, appspc, appsmac, appslinux, appsmobile, 0dayXXX, ebook, audiobook, music, misc

</details>

### Additional information:

Missing categories are:
TvUHD, TvPackUHD, MovieUHD, MoviePackUHD

- FlexGet version: 3.0.4
- Python version: Python 3.7.5
- Installation method: Docker wiserain/flexget:latest
- Using daemon (yes/no): yes
- OS and version:
- Link to crash log:

<!---
In config and debug/crash logs, remember to redact any personal or sensitive information such as passwords, API keys, private URLs and so on.

Please verify that the following data is present before submitting your issue:

- Link to a paste service or paste above the relevant config (preferably full config, including templates if present). Please make sure the paste does not expire, if possible.
- Link to a paste service or paste above debug-level logs of the relevant task/s (use `flexget -L debug execute --tasks <Task_name>`).
- FlexGet version (use `flexget -V` to get it).
- Full Python version, for example `2.7.11` (use `python -V` to get it). 
- Installation method (pip, git install, etc).
- Whether or not you're running FlexGet as a daemon.
- OS and version.
- Attach crash log if one was generated, in addition to the debug-level log. It can be found in the directory with your config file.
--->



Discussion:
> ### Steps to reproduce:
> 
> Run task with categories missing (TvUHD, TvPackUHD, MovieUHD, MoviePackUHD)

I'm not a member so I can't get the category mapping. Are you able to find the category numbers that map to the 4 missing ones you posted above?

For reference, here are the current mappings for AR:
```
'tvsd':        1,
'tvhd':        2,
'tvdvdrip':    3,
'tvpacksd':    4,
'tvpackhd':    5,
'moviesd':     6,
'moviehd':     7,
'moviepacksd': 8,
'moviepackhd': 9,
'moviexxx':   10,
'mvid':       11,
'gamespc':    12,
'gamesxbox':  13,
'gamesps3':   14,
'gameswii':   15,
'appspc':     16,
'appsmac':    17,
'appslinux':  18,
'appsmobile': 19,
'0dayXXX':    20,
'ebook':      21,
'audiobook':  22,
'music':      23,
'misc':       24
```
Talked to AR on IRC and got a new mapping. I'll make a pull  request in a bit:
```
1   TvSD
2   TvHD
3   TvUHD
4   TvDVDRip
5   TvPackSD
6   TvPackHD
7   TvPackUHD
8   MovieSD
9   MovieHD
10  MovieUHD
11  MoviePackSD
12  MoviePackHD
13  MoviePackUHD
14  MovieXXX
15  Bluray
16  AnimeSD
17  AnimeHD
18  GamesPC
19  GamesxBox
20  GamesPS
21  GamesNin
22  AppsWindows
23  AppsMAC
24  AppsLinux
25  AppsMobile
26  0dayXXX
27  eBook
28  AudioBook
29  Music
30  Misc.
```

Resolving patch:
diff --git a/flexget/components/sites/sites/alpharatio.py b/flexget/components/sites/sites/alpharatio.py
--- a/flexget/components/sites/sites/alpharatio.py
+++ b/flexget/components/sites/sites/alpharatio.py
@@ -27,28 +27,34 @@
 CATEGORIES = {
     'tvsd': 'filter_cat[1]',
     'tvhd': 'filter_cat[2]',
-    'tvdvdrip': 'filter_cat[3]',
-    'tvpacksd': 'filter_cat[4]',
-    'tvpackhd': 'filter_cat[5]',
-    'moviesd': 'filter_cat[6]',
-    'moviehd': 'filter_cat[7]',
-    'moviepacksd': 'filter_cat[8]',
-    'moviepackhd': 'filter_cat[9]',
-    'moviexxx': 'filter_cat[10]',
-    'mvid': 'filter_cat[11]',
-    'gamespc': 'filter_cat[12]',
-    'gamesxbox': 'filter_cat[13]',
-    'gamesps3': 'filter_cat[14]',
-    'gameswii': 'filter_cat[15]',
-    'appspc': 'filter_cat[16]',
-    'appsmac': 'filter_cat[17]',
-    'appslinux': 'filter_cat[18]',
-    'appsmobile': 'filter_cat[19]',
-    '0dayXXX': 'filter_cat[20]',
-    'ebook': 'filter_cat[21]',
-    'audiobook': 'filter_cat[22]',
-    'music': 'filter_cat[23]',
-    'misc': 'filter_cat[24]',
+    'tvuhd': 'filter_cat[3]',
+    'tvdvdrip': 'filter_cat[4]',
+    'tvpacksd': 'filter_cat[5]',
+    'tvpackhd': 'filter_cat[6]',
+    'tvpackuhd': 'filter_cat[7]',
+    'moviesd': 'filter_cat[8]',
+    'moviehd': 'filter_cat[9]',
+    'movieuhd': 'filter_cat[10]',
+    'moviepacksd': 'filter_cat[11]',
+    'moviepackhd': 'filter_cat[12]',
+    'moviepackuhd': 'filter_cat[13]',
+    'moviexxx': 'filter_cat[14]',
+    'bluray': 'filter_cat[15]',
+    'animesd': 'filter_cat[16]',
+    'animehd': 'filter_cat[17]',
+    'gamespc': 'filter_cat[18]',
+    'gamesxbox': 'filter_cat[19]',
+    'gamesps': 'filter_cat[20]',
+    'gamesnin': 'filter_cat[21]',
+    'appswindows': 'filter_cat[22]',
+    'appsmac': 'filter_cat[23]',
+    'appslinux': 'filter_cat[24]',
+    'appsmobile': 'filter_cat[25]',
+    'filter_cat[0]dayXXX': 'filter_cat[26]',
+    'ebook': 'filter_cat[27]',
+    'audiobook': 'filter_cat[28]',
+    'music': 'filter_cat[29]',
+    'misc': 'filter_cat[30]',
 }
 
 LEECHSTATUS = {'normal': 0, 'freeleech': 1, 'neutral leech': 2, 'either': 3}


Test patch: