haijeploeg / excludarr

Excludarr manages your libraries in Radarr/Sonarr. It keeps track of your library and checks if your movies and series are also available on a configured streaming provider. It can exclude the movies and series that are available on a configured streaming provider. But it can also re-add movies and series if they are not streaming anymore.
MIT License
197 stars 12 forks source link

Add support for a exclusion list #24

Closed jokerigno closed 2 years ago

jokerigno commented 2 years ago

First: I LOVE THIS tool!

It helped me saving a lot of space!

One feature I miss is the ability to exclude some movie-tv show. Let me share an example: my daughter loves Bing (a bunny cartoon). Here in italy it is available on amazon prime but not all the episodes. So I would love to be able to clean my library keeping bing on my local files.

Thank you

haijeploeg commented 2 years ago

Cool! So basically what you want is to prevent Excludarr to delete the series/movies that are on a excluded list that you configure yourself?

This can also be linked to #21 I guess. If we can filter on season and episode, only the episodes that are not on a streaming provider are being downloaded and monitored by Sonarr/Radarr.

jokerigno commented 2 years ago

YEs basically I want that Excludarr exclude (LOL) some serie/movies that I want to keep. For example star wars despecialized version.

haijeploeg commented 2 years ago

This feature is also pushed in feature/rewrite_typer. Planning on releasing it around christmas! So stay tuned and be patient! 🚀

haijeploeg commented 2 years ago

Exclude functionality is added in Excludarr version 1.0.1. You can upgrade now! Please check the README.md carefully and check the configuration example file for more information about how to exclude and what you should change also in your configuration file.

jokerigno commented 2 years ago

Maybe I'm just a noob but I renistalled excludarr-1.0.2 and then tried to run different commands like "excludarr providers list" but it doesn't work as expected.

> root@Joshua:~# excludarr providers list
Traceback (most recent call last):
  File "/usr/bin/excludarr", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib64/python3.9/site-packages/excludarr/main.py", line 68, in cli
    app(prog_name="excludarr")
  File "/usr/lib64/python3.9/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/usr/lib64/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib64/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib64/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib64/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib64/python3.9/site-packages/typer/main.py", line 500, in wrapper
    return callback(**use_params)  # type: ignore
  File "/usr/lib64/python3.9/site-packages/excludarr/commands/providers.py", line 20, in list
    locale = config.locale
  File "/usr/lib64/python3.9/site-packages/excludarr/utils/config.py", line 77, in locale
    return self.general_section.get("locale", None)
  File "/usr/lib64/python3.9/site-packages/excludarr/utils/config.py", line 61, in general_section
    return self.config.get("general", {})
AttributeError: 'NoneType' object has no attribute 'get'

Just for confirm I addeda file named ".excludarr.yml" in my root folder / with this content:

general:
  # Do a fast search of the movie. If this settings is false,
  # all results from JustWatch will be gathered before continueing.
  # This can be painfully slow and is in most cases not needed.
  # Only disable this if Excludarr cannot find a movie and if you know what you are doing!
  fast_search: true
  # Set your locale, this can be a two letter country code or locale like: en_US.
  locale: IT
  # A list of providers you have a subscription on. You can get a list of available
  # providers using: `excludarr providers list`
  providers:
    - Netflix
    - Amazon Prime Video
    - Disney Plus

# TMDB settings are optional. This is only used in case the serie is not found on JustWatch.
# If a serie is not found on JustWatch using the IMDB ID, the TMDB API is being used to obtain
# the TMDB ID from the TVDB ID. This is mostly not needed, only if you have a lot of unknown
# series and your match score is really low.
tmdb:
  api_key: xxxxxxxxxxxxx

radarr:
  # The Radarr base url (include http of https)
  url: 'http://192.168.2.100:7878'
  # The Radarr api key
  api_key: xxxxxxxxxxx
  # Verify the SSL connection
  verify_ssl: false
  # Optional: exclude different titles. input the name the table output is showing.
  # This will exclude the title in all actions (exclude and re-add) that excludarr does.
  # This will prevent that excludarr will touch the title in Radarr.
  # exclude:
  #   - 'Dave Chappelle: The Closer'

sonarr:
  # The Radarr base url (include http of https)
  url: 'http://192.168.2.100:8989'
  # The Radarr api key
  api_key: xxxxxxxxxxx
  # Verify the SSL connection
  verify_ssl: false
  # Optional: exclude different titles. input the name the table output is showing.
  # This will exclude the title in all actions (exclude and re-add) that excludarr does.
  # This will prevent that excludarr will touch the title in Sonarr.
  # exclude:
  #   - Queen of the South

any hint?

haijeploeg commented 2 years ago

Hi Jokerigno,

No worries! As I am understand correctly you are trying to use the /.excludarr.yml file. If that is the case excludarr is not reading that file. Excludarr can only read the following files:

/etc/excludarr/excludarr.yml
~/.config/excludarr/excludarr.yml
~/.excludarr/config/excludarr.yml
~/.excludarr.yml
./.excludarr.yml

The recommended method is to create a directory: /etc/excludarr and place excludarr.yml in that directory (so: /etc/excludarr/excludarr.yml.

Could you try to do that and let me know if it works?

jokerigno commented 2 years ago

The recommended method is to create a directory: /etc/excludarr and place excludarr.yml in that directory (so: /etc/excludarr/excludarr.yml.

That made the difference!

Thank you and merry christmas! :)