toddrob99 / searcharr

Sonarr & Radarr & Readarr Telegram Bot
MIT License
244 stars 62 forks source link

Added multilanguage Support - Sonarr API v3 Parameter #52

Closed Seriox closed 1 year ago

Seriox commented 1 year ago

For https://github.com/toddrob99/searcharr/issues/51

Basically I just copied/pasted everything regarding Quality Profile as it is very similar to the language profile. A GET Request for language profiles only works with Sonarr API v3. Tested with 1,2 and 3 languages. (en_us.yml) Searcharr let's me select between the languages if more than one language is specified in settings.py. If only one language is set, than Searcharr just uses that one.

Feel free to close this PR if not needed or you want to do it differently.

toddrob99 commented 1 year ago

@Seriox, it appears Sonarr is deprecating language profiles and adding language support to custom formats instead. After upgrading to Sonarr v4 in my test instance, the response to the languageprofile API endpoint has changed to this (I had multiple languages enabled in the language profile before, and it was not named "Deprecated"):

[
  {
    "name": "Deprecated",
    "upgradeAllowed": true,
    "cutoff": {
      "id": 1,
      "name": "English"
    },
    "languages": [
      {
        "language": {
          "id": 1,
          "name": "English"
        },
        "allowed": true
      }
    ],
    "id": 1
  }
]

As a result, I am going to remove language profile support from Searcharr v3.

Seriox commented 1 year ago

Alright, I think it's similar to Radarr then. I would say that this solution (in v4) is a lot better than having multiple language profiles besides the quality Profiles.