Flexget now support Sonarr

Flexget now has a plugin that enables it to use Soanrr as a show input, meaning you can use Sonarr great UI with Flexget’s powerfull and dynamic downloading abilities.
For those who don’t know flexget, you should check it out: http://flexget.com/

1 Like

I’ve been scratching my Head on this. I used to use flex get before i discovered private trackers and sickbeard/Rage. Can you explain a scenario where having sonarr fill flex get would be more efficient than just using sonarr?

1 Like

well, if you know flexget then you know its an incredibly versatile tool to enable downloading files (with an emphasis on torrents) from any location, whether its private or not very easily. it also syncs up to basically every torrent client and etc. if you already get your desired functionality from sonarr there is obviously no reason to switch, but a lot of users either use flexget with a private tracker that is not supported by sonarr, or just use it because they’re used to.

I use it to download torrents from a private tracker and then send the download to sonarr post processing dir, to take advantage of its episode tracking and 3rd party app support (namely the amazing nzb360). up until now I had to manage the show list seperately on flexget, but now I just manage it from sonarr itself, meaning I can add a show via my nzb360 app on android and flexget will download that show on a tracker that is not supported by sonarr.

1 Like

When it comes to private trackers and more advanced configurations, then nothing can even come close to Flexget (if we are talking about torrents).
If I got you right, the plugin will basically use Sonarr as the input only, to get the list of series from Sonarr, and everything else will be handled by Flexget (looking at the rss feeds, selecting proper quality, releases, sending them to the torrent client, moving the downloaded files to the correct folder, etc).
If using Sonarr only for this, then no indexer and downloader should be enabled at all, just us no renaming or moving?
Up to now I was using TVDB for this, Flexget would get the shows I need from my TVDB favorites list. If I’m correct, this would replace TVDB favorites with Sonarr’s UI to add and remove series, episodes?

1 Like

you’re half right, in the sense that you already have the ability to set certain attributes from sonarr in flexget in relation with a show, or more specifically, you can select to include/exclude ended shows, or paused shows.
i am currently working on sending the desired quality to flexget as well (shouldn’t be too hard, just need to find the time to do so), but the future plans is basically to send everything you can set in sonarr to flexget (including show path for post download file manipulation, exclude list for releases and such and more).
since flexget is at least as versatile as sonarr (and in many ways much more) this is all just a question of parsing the api responses for more data to be used in flexget.

btw, there are also input plugins for sickbeard & couchpotato for the so inclined. couchpotato integration as an input is awesome and really straightforward.

1 Like

I wonder if you had time to implement more functions into the Flexget plugin?
Would be great if all the post-processing (move&seed torrents, maybe move&rename&seed, set seed ratio&time) would be possible inside Sonarr and pass these to Flexget?

Is it possible to make the search function of Sonarr work with Flexget? I mean it is obvious with new releases that appear in the RSS feeds (which I believe are configured in Flexget, not in Sonarr), but what about search functions for older, none rss-based torrents? How can Flexget handle these, or they would be handled by Sonarr and not passed to Flexget?

Flexget is really the best once it comes to customization, but a great UI like Sonarr is really a nice addition to Flexget, bringing together best of both worlds!

That’s a lot of questions :smile:, i’ll try and answer them all:

  1. I did manage to add the ability to set desired quality via the sonarr plugin (it sets whatever quality is set as the cutoff quality in Sonarr, it was too much of a pain to send the entire quality profile to flexget and I wasn’t even sure anyone will use this).
  2. I recently created a new plugin called sonarr_emit, which sends flexget the first missing episode for every show, instead of just setting the series.
  3. In regards with post processing, I use a script to copy all my downloads to the relevant post processing dir (sonarr, cp and headphones) so whatever torrent I download is just copied, processed and the the copy is deleted. I find it easier that way. I don’t know about setting these parameters via sonarr though.
    Basically, everything that exists in Sonarr’s API can be called upon, but you would need to send it to one of the torrent client plugin that flexget uses (like deluge and/or transmission) and that would require more work on their end, i’ll look into it.
  4. About manual search, i’m not exactly sure what you mean by that, Could you elaborate ?what do you mean non-rss based torrents? what’s their source then?

Hope that answer some of your questions :smile:

1 Like

Sorry for the delay in my reply, for some reason I didn’t receive any notification.

Yesterday I tried out the Sonarr plugin for Flexget, and it was working very nice. Will need to check on this in more details, but it is really good.

I don’t understand now about the quality settings you mention: if I want only 720p releases and nothing else, how can I configure this in Sonarr and send it to Flexget?

I need to check the sonarr_emit plugin, not sure what does the “first missing episode for every show instead of just setting the series” mean. What is the difference between the sonarr and sonarr_emit plugins?

I leave postprocessing to Flexget, as it is doing that part with Deluge excellent.

About manual search I referred to backsearch, that is, for searching within the site and not the rss feed. This is useful for older episodes, as rss feeds are very short most of the time. But this is not so important.

sonarr supports quality profile, which is something that flexget cannot do in a straight forward fashion (for now). What I did is simply send the quality listed in the “Cutoff” section of the quality profile you use in sonarr in order to simplify things for now. But unfortunately you just cannot get sonarr’s quality decision abilities in flexget yet.

the difference between sonarr and sonarr_emit plugins is the output. sonarr plugin generate a list of just the series names themselves while sonarr_emit also send the first missing episodes for a series as defined in flexget (meaning, if you missed 2 episodes in season 1, got all of season 2, and missed the entirety of season 3, it will send the 1st missing episode of season 1). Honestly, this could have been just one plugin, but I split it into two to match other existing plugin in flexget.

backsearch is a feature that is related to nzb servers, it doesn’t really mean anything with rss. You can however archive all of the incoming rss feeds in flexget in then search the archive using a task. look at the archive plugin for that.

glad to hear you like the sonarr plugin, i wasn’t sure anyone will use this.

Thanks for the explanations! It is really great.
Excuse me for the n00b question, but I’m not sure about the “cutoff” sections regarding the quality. If I use Sonarr plugin, I add a series in Sonarr and define quality 720p hdtv only, and I add another show, there I define hdtv x264 (SD) then Flexget will download the correct quality or not?

In case of sonarr_emit plugin: now I understand how it works. But if I missed a season 1 episode once back in a time, and now we are at season 3, it will try to download the missing episode from season 1 too, while continue to get new episodes from the ongoing season 3, correct?
However, the season 1 episode will never appear again in my rss feeds, so most probably it will not be downloaded ever (unless it turns up again in the rss feed for some reason).

I think Sonarr is one of the best ways to create input for Flexget. I have used tvdb favourites until now, but I will migrate to Sonarr. Will see how it works on a long run. Hope others will like it too!

each series has its own quality profile, so yes, each series can hold a different quality.

sonarr_emit sends just 1 item for flexget to download. it is used in order to override FG’s own queue list (for any number of reasons). meaning, if you ONLY use a task that uses sonarr_emit, than you will get only 1 item to download each time the task runs. if you download the item and sonarr processes it and sets it as downloaded (or any other status) than the next time the tasks runs you will get the next item to download, and so forth. i hope that’s clearer.

personally I don’t use it, I just use sonarr as input for series and run a script that copies all download to its post processing dir.

Now it is completely clear. I don’t need emit part neither.

What I did try is to use sonarr as input only, and everything else was handled by flexget and deluge.
I use flexget to move the downloaded episode to the series folder to the series name and season from tvdb, and it continues seeding too. It is great as I use a private tracker, and with flexget it is working great.
Sonarr recognized the downloaded episode too.

Actually Flexget is a very powerful app, but with Sonarr’s excellent webui it is perfect!

Great work!

Can you please show your config file. I can’t manage my own. Everything is failed with my shows

Hello @liiight

I glad to see that you’re the plugin creator!!! Thanks for that.
But I don’t understand why I got this message : Input sonarr_emit did not return anything

Here is my log summary : http://pastebin.com/LsqZJX6z

But there is two wanted episodes in my sonarr …

My config file (@Germetik I hope this can help you) :

templates:
  global:
    configure_series:
      from:
        sonarr:
          base_url: http://192.168.1.116
          port: 8989
          api_key: xxx
          include_ended: false
          only_monitored: true
          include_data: false
      settings:
        identified_by: ep
        timeframe: 2 minutes
        target: 720p
tasks:
  FrenchTorrentDB:
    discover:
      what:
        - sonarr_emit:
            base_url: http://192.168.1.116
            port: 8989
            api_key: xxx
            include_ended: false
            only_monitored: true
      from:
        - FTDB:
            category:
              - "tv_hd_vostfr"
              - "tv_vostfr"
            username: xxx
            password: xxx
      ignore_estimations: yes
    thetvdb_lookup: yes
    pushover:
      userkey: xxx
      apikey: xxx
      title: Downloading {{series_name}}
      message: Episode {{series_id}}
    deluge:
      username: pi
      password: raspberry
      label: tv
    exists_series: /media/Lacie-CloudBox/TV Shows/

I’m currently trying to get flexget to work with sonarr. In sonarr I have all of my shows set to sdtv and this is passed successfully to flexget. The problem is none of my rss feeds specify sdtv. The qualities are usually specified as HDTV with no 720p or 1080p in the filename.

I can work around this by using ‘quality: hdtv <720’ in my flexget config. This works fine, however, I would prefer to be able to use what is set in sonarr.

I’m not sure I understand.
You set to download a show as SDTV in sonnar but your feed does not include SDTV?

My feeds do not include the text SDTV and they are rejected by flexget ifI use the quality provided by sonarr.

For example my feed contains:

My Show S01E01 HDTV
My Show S01E01 HDTV 720p
My Show S01E01 HDTV 1080p

I want the first one. Technically speaking the first one is SDTV but the name never says that. This is how it is on every RSS feed I have used. Currently using eztv rss and kat rss.

I see. Tricky. I’d recommend opening a thread in the flexget forum, as this is definitely a flexget question and not a Sonnar plugin question. I’m sure it’s doable I just don’t know how

I see you made some changes to the sonarr plugin a few months ago. I have a couple of ideas/suggestions. I’ve been manually modifying the sonarr.py file each time I update emby and it’s getting annoying so I figure I’ll see if you can implement these changes.

  1. I added a quality override where it maps SDTV from sonarr to ‘hdtv <720p’ in flexget

     if quality_name == 'Raw-HD':  # No better match yet in Flexget
         return 'remux'
     elif quality_name == 'DVD':  # No better match yet in Flexget
         return 'dvdrip'
     elif quality_name == 'SDTV': # No better match yet in Flexget
         return 'hdtv <720p'
     else:
         return quality_name.replace('-', ' ').lower()
    

and 2. I don’t like how include_data modifies the path so I comment that out in sonarr.py. It would be nice to have quality and path separate settings. Something like ‘include_data_quality’ and ‘include_data_path’.

This is what I do:

        if config.get('include_data') and profiles_json:  # Check if to retrieve quality & path
            #path = show.get('path')

Those are great suggestions. If you could open a git issue I’d appreciate it: https://github.com/Flexget/Flexget/issues

Also, a soon to come feature will enable adding and removing from sonarr via flexget as well, stay tuned.