GithubHelp home page GithubHelp logo

l3uddz / traktarr Goto Github PK

View Code? Open in Web Editor NEW
573.0 23.0 52.0 3.36 MB

Script to add new series & movies to Sonarr/Radarr based on Trakt lists.

License: GNU General Public License v3.0

Python 99.40% Shell 0.14% Dockerfile 0.46%

traktarr's People

Contributors

chazlarson avatar daghaian avatar desimaniac avatar horjulf avatar l3uddz avatar mitchellklijs avatar nemchik avatar owine avatar saltydk avatar z3t avatar zenjabba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

traktarr's Issues

Suggested Documentation Addition - systemd Environment locales

Describe the bug
It took me several days to create a valid systemd file that Python3 was happy with. I'd recommend updating the documentation and adding these two lines to the [Service] block of the service file, in case any other Ubuntu 16.04 users encounter the same complaints from Python3 about locales not being exported.

Environment=LC_ALL=C.UTF-8
Environment=LANG=C.UTF-8

To Reproduce
Steps to reproduce the behavior:

  1. enable the currently provided systemd service file on Ubuntu 16.04
  2. systemctl start traktarr.service
  3. Service doesn't start, citing exit code=1
  4. journalctl -xe provides the following:
Traceback (most recent call last):
  File "/usr/local/bin/traktarr", line 951, in <module>
    app()
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 676, in main
    _verify_python3_env()
  File "/usr/local/lib/python3.5/dist-packages/click/_unicodefun.py", line 118, in _verify_python3_env
    'for mitigation steps.' + extra)
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult http://click.pocoo.org/python3/for mitigation steps.

This system supports the C.UTF-8 locale which is recommended.
You might be able to resolve your issue by exporting the
following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

System Information

  • Traktarr Version: v1.2.4
  • Operating System: Ubuntu Server 16.04 LTS running in Proxmox LXC

Additional context
running each export [locale] command also works, but it's not permanent. The locales aren't retained after reboot.

traktarr.service error.

Hi team,

Getting this error when trying to run traktarr as a systemd service.

Dec 07 20:12:11 LanBOX python3[38656]: 2018-12-07 20:12:11,149 - ERROR      - traktarr                            - run                                 - Unhandled exception occurred while processing scheduled tasks: unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime'
Dec 07 20:12:11 LanBOX python3[38656]: Traceback (most recent call last):
Dec 07 20:12:11 LanBOX python3[38656]:   File "/opt/traktarr/traktarr.py", line 846, in run
Dec 07 20:12:11 LanBOX python3[38656]:     time.sleep(max(schedule.idle_seconds(), 0))
Dec 07 20:12:11 LanBOX python3[38656]:   File "/usr/local/lib/python3.6/dist-packages/schedule/__init__.py", line 528, in idle_seconds
Dec 07 20:12:11 LanBOX python3[38656]:     return default_scheduler.idle_seconds
Dec 07 20:12:11 LanBOX python3[38656]:   File "/usr/local/lib/python3.6/dist-packages/schedule/__init__.py", line 152, in idle_seconds
Dec 07 20:12:11 LanBOX python3[38656]:     return (self.next_run - datetime.datetime.now()).total_seconds()
Dec 07 20:12:11 LanBOX python3[38656]: TypeError: unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime'```

New features, do they belong in traktarr?

Hey there l3uddz, in a private fork of this repo, I've added a few features. Maybe you'd accept PRs for them? They expand what traktarr does, so maybe you're not comfortable with that.

I've already coded up:

  • Add the collection tag to movies in Plex based off a Trakt list
    The idea is to watch a Trakt list and automatically tag the matching Plex films with a collection that is the name of the Trakt list. This complements the original traktarr feature of adding a list to radarr nicely. You can use Traktarr to add a James Bond list, then create a "James Bond" collection in Plex.
    traktarr tagmovies -t "https://trakt.tv/users/danio1972/lists/james-bond-series"
    This uses the plexapi module.

  • Import a text or csv file of movie names and years into a Trakt list
    Once I had Trakt list downloading and collection tagging, I needed a way to make lists easily. My workflow now is to troll the web for lists like this one for example, use some simple scraping (like [...document.querySelectorAll('h4[data-tag=subhead]')].map(n => n.innerHTML).join('\n') to create a list of title year pairs, then run traktarr newlist -f movies.txt --name "Classic Blaxploitation"
    This uses the the tmdbsimple module to map names to tmdb ids and trakt.py to write to Trakt. I could drop the trakt.py dependency and implement it manually like you have in media/trakt.py

Would you accept a PR with these features?

Movie skipped

Hello,
i cannot understand why this movie is skipped.
Looking at the debug it is because it has no runtime spefified, but if i watch on tmdb or on imdb there is a runtime.
What can i do?
I tried to put 0 or [] in config.json on the option "blacklisted_min_runtime": 60, but nothing changed.
Can someone help me?
or is there a way to skip runtime check?

2019-10-30 15:07:44,959 - DEBUG - helpers.tmdb - verify_movie_exists_on_tmdb - 'Midway (2019)' [TMDb ID: 522162] exists on TMDb.
2019-10-30 15:07:44,960 - DEBUG - helpers.trakt - blacklisted_movie_id - 'Midway' | Blacklisted IDs Check | Passed.
2019-10-30 15:07:44,960 - DEBUG - helpers.trakt - blacklisted_movie_title - 'Midway' | Blacklisted Titles Check | Passed.
2019-10-30 15:07:44,960 - DEBUG - helpers.trakt - blacklisted_movie_year - 'Midway' | Blacklisted Years Check | Passed.
2019-10-30 15:07:44,960 - DEBUG - helpers.trakt - blacklisted_movie_country - 'Midway' | Blacklisted Countries Check | Ignoring valid countries check.
2019-10-30 15:07:44,960 - DEBUG - helpers.trakt - blacklisted_movie_country - 'Midway' | Blacklisted Countries Check | Passed.
2019-10-30 15:07:44,960 - DEBUG - helpers.trakt - blacklisted_movie_language - 'Midway' | Blacklisted Languages Check | Ignoring valid languages check.
2019-10-30 15:07:44,960 - DEBUG - helpers.trakt - blacklisted_movie_language - 'Midway' | Blacklisted Languages Check | Passed.
2019-10-30 15:07:44,961 - DEBUG - helpers.trakt - blacklisted_movie_genre - 'Midway' | Blacklisted Genres Check | Skipping blacklisted genres check.
2019-10-30 15:07:44,961 - DEBUG - helpers.trakt - blacklisted_movie_genre - 'Midway' | Blacklisted Genres Check | Passed.
2019-10-30 15:07:44,961 - DEBUG - helpers.trakt - blacklisted_movie_runtime - 'Midway' | Blacklisted Runtime Check | Blacklisted because it had no runtime specified.
2019-10-30 15:07:44,961 - INFO - Traktarr - movies - SKIPPED: 'Midway (2019)'

Add a collection?

Is it possible to make it so you can add a collection and then have it search for that?

2018-09-26 03:50:15,785 - ERROR - helpers.trakt - extract_list_user_and_key_from_url - The URL "https://trakt.tv/users/teravault/collection/movies/" is not in the correct format

If so, awesome, if not thats okay. I'll just manually add them as I have time.

Using CLI with debug enabled uses wrong list type. Expected trending, seen anticipated.

Enabling debug in the traktarr config causes unexpected results when importing movies with CLI. With debug enabled it will use the list type anticipated even though you specified trending.

Steps to reproduce the behavior:
Run with debug set as false:
traktarr movies -t trending -l 100 -s votes
and as expected it'll import movies from the trending list with output:
Retrieved Trakt 'Trending' movies list, movies found: 1285

Run with debug set as true:
traktarr movies -t trending -l 100 -s votes
and it'll unexpectedly import movies from the anticipated list type with output:

Request URL: https://api.trakt.tv/shows/anticipated
Retrieved Trakt 'Trending' movies list, movies found: 1017

Note: it says shows and not movies, and anticipated and not trending
I think it is still using the trending list but I cannot explain why the amount of movies found decreases when debug is enabled and more movies are imported.

Reproducible using Master (latest).

Near the time of writing this trakt.tv had:
1002 in trending
1436 in anticipated

Only add currently running shows?

I've installed traktarr and it's running wonderfully. However, I have two separate sonarrs, one for currently running tv shows, and ended shows.

I only have traktarr running on the airing tv shows as it's just to keep up with newly released shows, however I have some instances where traktarr will add ended tv shows from trakt. Is there a way to only add currently airing shows with traktarr via filtering?

Thanks!

Create a release?

I'm exploring creating an AUR package for traktarr and it would be super keen if it could be based on an actual release. Is that something you'd consider? :)

Cannot run Traktarr

I am using Raspberry Pi 4 with everything updated. I followed the instructions to install by the letter and did some setting up to my /opt/traktarr/config.json. After that I created the automatic script and rebooted the Pi. When I try "traktarr run" I get the following:

Traceback (most recent call last):
File "/usr/local/bin/traktarr", line 1291, in
app()
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1063, in invoke
Command.invoke(self, ctx)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/bin/traktarr", line 52, in app
cfg = Config(configfile=config, cachefile=cachefile, logfile=logfile).cfg
File "/opt/traktarr/misc/config.py", line 127, in cfg
tmp = self.load_config()
File "/opt/traktarr/misc/config.py", line 165, in load_config
return AttrConfig(json.load(fp))
File "/usr/lib/python3.7/json/init.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 29 column 31 (char 532)

Seems like a python issue but I have no idea what this all means... I double checked if I had installed python and all the requirements + all user permissions.

Language support for sonarr v3

Describe the problem
Sonarr v3 took the languages out of the quality profile and put them into a seperate profile, this isnt supported by traktarr at the moment. When adding a series automated by traktarr, it is added as the default language, which is english and i dont want english, i want german.

Describe any solutions you think might work
Add an option to set the language profile

Additional context
Ombi has the same problem: Ombi-app/Ombi#2359
Currently, the v3 API is backwards compatible and takes the first language profile if none is specified.
As a workaround, i changed the language profiles so that german is the first

SeriesType not set correctly for anime

When adding Anime using CLI traktarr does not change the SeriesType to Anime. You still have to go into Sonarr and manually change the series type from standard to anime

Not able to add movies/shows

Hi,

i am trying to get this running. it fails if a new item should be added:

image
it doesn't matter if it's a tv show or a movie.

This is my config file:

  {
  "automatic": {
    "movies": {
      "anticipated": 3,
      "boxoffice": 10,
      "interval": 20,
      "popular": 3,
      "trending": 3
    },
    "shows": {
      "anticipated": 10,
      "interval": 48,
      "popular": 1,
      "trending": 1
    }
  },
  "core": {
    "debug": false
  },
  "filters": {
    "movies": {
      "allowed_countries": ["us", "gb", "de", "ca"],
      "blacklist_title_keywords": ["barbie"],
      "blacklisted_genres": ["music"],
      "blacklisted_max_year": 2019,
      "blacklisted_min_runtime": 60,
      "blacklisted_min_year": 2018,
      "blacklisted_tmdb_ids": []
    },
    "shows": {
      "allowed_countries": ["us", "gb", "de", "ca"],
      "blacklisted_genres": [
        "animation",
        "game-show",
        "talk-show",
        "home-and-garden",
        "children",
        "reality",
        "anime",
        "news",
        "documentary",
        "special-interest"
],
      "blacklisted_max_year": 2019,
      "blacklisted_min_runtime": 15,
      "blacklisted_min_year": 2018,
      "blacklisted_networks": [
        "twitch",
        "youtube",
        "nickelodeon",
        "hallmark",
        "reelzchannel",
        "disney",
        "cnn",
        "cbbc",
        "the movie network",
        "teletoon",
        "cartoon network",
        "espn",
        "yahoo!",
        "fox sports"
],
      "blacklisted_tvdb_ids": []
    }
  },
  "notifications": {
    "verbose": true
  },
  "radarr": {
    "api_key": "XXX",
    "profile": "GER - HD 720/1080",
    "root_folder": "/home/plex/media/movies/",
    "url": "XXX"
  },
  "sonarr": {
    "api_key": "XXX",
    "profile": "HD - 720p/1080p",
    "root_folder": "/home/plex/media/tv/",
    "tags": {},
    "url": "XXX"
  },
  "trakt": {
    "api_key": "XXX"
  }
}

What am i doing wrong? :/

P.S. Using latest Release

Cheers

Minimum Availability not adhering to config

Describe the bug
If you use the CLI and set --minimum-availability it'll work.
If you set your minimum_availability in the config, it will not work.

System Information

  • Traktarr Version: Develop (Latest)

Automatic - Diffrent settings

Been reading up on the config and it looks promising for a fully automatic server.

Just one question tough, is it possible to set up different rules for different root folders.

i.e. ../tv/reality only adds new shows within that genre. And /tv/hd excludes reality, docu, etc?

Or do I have run run different instances of traktarr? :)

Thanks!

Ignore tags when adding from watchlist

Any blacklist tag should be ignored when adding new shows/movies from a trakt watchlist. Since it's on your watchlist you'd want it anyway, whether it's not the correct country or language according to your settings.

Limit to only "top X results"

Is there no filter to limit to just the top X shows in the list?

Say I only want to monitor for the top 10 trending movies?

notifications to telegram?

Hi,

I would like to ask if its possible to implement telegram notifications, as its a really good messenger with a public API.

Or maybe document how to write a custom notification plugin.

Changing "blacklisted_min_runtime" causes unexpected results when using CLI.

Changing "blacklisted_min_runtime" causes unexpected results when using CLI to import movies.

When running the following command we see unexpected output based on blacklisted_min_runtime:
traktarr movies -t trending -l 100 -s votes
With blacklisted_min_runtime set at 40 we see:
Retrieved Trakt 'Trending' movies list, movies found: 1285
and with it set to 1 we see:
Retrieved Trakt 'Trending' movies list, movies found: 993

I would expect the list to be the same each time, or at most movies found to increase as we decrease blacklisted minimum runtime. We are seeing the opposite here.

I also observed no more movies being imported when blacklist runtime was set to 40. Strangely, I observed movies being imported with runtimes over 40 minutes when blacklist runtime was set to 1.

Reproducible with Master (latest)

Near the time of writing this trakt.tv had:
1002 in trending
1436 in anticipated

Support for full movie names via command line

IMDbPY seems to offer a simple way for you to bring name into imdb id

# Search for a movie (get a list of Movie objects).
s_result = ia.search_movie('The Untouchables')

# Print the long imdb canonical title and movieID of the results.
for item in s_result:
   print(item['long imdb canonical title'], item.movieID)

Ability to remove existing radarr/sonarr media after limit

Describe the problem
At the moment, existing media from radarr/sonarr is removed, then the program loops through trakt list until the limit is reached.

It would be great to have the ability to limit the list. e.g. so I could set 250 most watched of all time, and it only adds media from the top 250, not 250 more every run.

Ability to add tv show with more then x episodes

Describe the problem
Traktarr is adding every tv show, also shows with only 1 episode which I want to remove

Describe any solutions you think might work
We should have the function to set, how much episodes a tv show minimum have to add.

Additional context
.

Automatic Traktlist breaking Traktarr

So I installed the Traktarr Docker on my unRAID server Today and I got it working just using the CLI but wanted to try out the "Automatic" setting so I could just leave it and let it do it's thing. This is the config I am using when trying to use the Automatic mode https://pastebin.com/Es9Ut1ww and this is the error that that console gives me https://i.imgur.com/DJsap0z.png. I can use Traktarr fine when I don't input the "Lists" line but that seems to break it. Any ideas? Thanks guys

Docker - Container stuck in restart

Like the title describe the container is stuck in restarting in the latest version of traktarr. Expect the system to stay on "Up" so I can attach it and start writing commands but the container keeps restarting.

Download container from cloudb0x/traktarr
Create the config file at volume destination /config
Check status using docker-compose ps
Check logs using docker container logs [container]

Settings:

traktarr:
image: cloudb0x/traktarr
network_mode: host
container_name: trakt-tv
environment:
- TRAKTARR_CONFIG=/config/config.json
- TRAKTARR_CACHEFILE=/config/cache.db
- TRAKTARR_LOGFILE=/config/traktarr.log
volumes:
- /opt/appdata/traktarr:/config
cap_add:
- NET_ADMIN
restart: always

Addings shows without a country

Adding shows that do not have a country set in trakt results in an error and it ignores the show.

Traceback (most recent call last):
  File "/usr/local/bin/traktarr", line 306, in shows
    series['show']['country'].upper())
AttributeError: 'NoneType' object has no attribute 'upper'

This is while using the --ignore-blacklist command aswell.

Only Sonarr and Shows

Hi,
I just ran with docker compose and woke fine but I only want to keep shows and sonarr part from the conf file. Shall I delete the other lines? As Radarr already have Trakt list. And I also don't want the automatic list I only personal list? Thanks

Disabled_for

Traktarr seems to be ignoring my disabled_for settings.

Second Radarr instance

Hi
Recently setup traktarr. Working great adding to Radarr and Sonarr. Thanks very much!

My current setup currently involves a second instance of Radarr purely for 4K material. Is it possible to add this to traktarr also (separate radarr instance in the config json)? Or is a separate instance of traktarr required with a different config?

Appreciate your time.

Cant add anything

ERROR - traktarr - show - FAILED adding The 100 (2014) with tags: None
ERROR - traktarr - movies - FAILED adding Moana (2016)

Everything I try to add gives me an error.

I'm using version 1.2.1

"filters": {
"movies": {
"allowed_countries": ["us"],
"allowed_languages": [],
"blacklist_title_keywords": ["barbie"],
"blacklisted_genres": [],
"blacklisted_max_year": 2019,
"blacklisted_min_runtime": 30,
"blacklisted_min_year": 1950,
"blacklisted_tmdb_ids": []
},
"shows": {
"allowed_countries": ["us"],
"allowed_languages": [],
"blacklisted_genres": ["talk-show", "anime", "news"],
"blacklisted_max_year": 2019,
"blacklisted_min_runtime": 15,
"blacklisted_min_year": 1950,
"blacklisted_networks": [],
"blacklisted_tvdb_ids": []
}
},
"notifications": {
"verbose": true
},
"radarr": {
"api_key": "XXXX",
"profile": "HD-1080p",
"root_folder": "XXXXX",
"url": "http://localhost:7878/"
},
"sonarr": {
"api_key": "XXXXX",
"profile": "HD-1080p",
"root_folder": "XXXX",
"tags": {},
"url": "http://localhost:8989/"
},
"trakt": {
"client_id": "XXXXX",
"client_secret": "XXXX"
}
}

way to disable radarr but keep sonarr?

I've been running traktarr for about 24 hours now, really enjoying it. I use sonarr but not radarr and I'd like to disable the radarr section so I can stop getting "connection refused" errors in my logs. I've tried deleting the options in config.json but traktarr just adds them back in. Any ideas? Running traktarr, version 1.2.3

Couple Questions.

Ran across this when searching for a new trakt to sonarr option since flexget seems to have died on me for that purpose.. I haven't started using this yet as I have a few questions about a couple things..

  1. Is there any way to disable the whole removal of shows/movies from trakt lists when adding them sonarr? I prefer to keep everything in my trakt lists well in my trakt lists as I usually go to said trakt list and sort by random when I am stuck on trying to figure out something to watch.

Or does this not remove them from the trakt lists but keeps a cache of shows/movies it's added and that's what I'm seeing from the demo thing when it says something like "removed existing radarr movies from trakt movies list"

  1. Is there an option to set shows/movies to unmonitored (especially shows)? I sometimes prefer to have a show unmonitored until I at least see at least 1-2 episodes of a new show to determine if I'm going to watch it.

  2. Ontop of the unmonitored option thing, is there a way to set up multiple sonarr/radarr options for seperate trakt lists?

Example:

"sonarr": {
    "api_key": "",
    "profile": "HD-1080p",
    "root_folder": "/tv/",
    "tags": {},
    "url": "http://localhost:8989/"
  },
"sonarr": {
    "api_key": "",
    "profile": "HD-1080p",
    "root_folder": "/anime/",
    "tags": {anime},
    "url": "http://localhost:8989/"
  }

as I have seperate trakt lists for shows and anime, and movies and anime movies, and I would want to set up the tagging for the anime lists while not having the tag set for normal shows.

3.5 Do tags have to have the whole "networks" thing with them, as like with 3 I'd like for it to just tag a whole list with that tag, and not just specific networks..

or would I have to go about setting up 4 seperate .config files for 3 and 3.5

  1. Could this potentially work for windows? or is there specific things in the code that work only for Ubuntu/Debian

Option to not import movies with broken TMDB URL.

Describe the problem

Often Trakt has entries with broken TMDB URLs. Radarr doesn't like having these imported.

Describe any solutions you think might work

Introduce an option to check if TMDB URL returns 404, if it does, don't import the movie.

Additional context

We can request these links are fixed on Trakt, but it takes a long time to have that happen. It would be best to not add them to Radarr. In the future Trakt may offer a better way to fix broken URLs but until then it would be easier to ignore all broken URLs.

Medusa support

Hi, great project. Are there any plans for supporting medusa ? (sickchill fork) who is gaining support in the community as an alternative to sonar/radarr. They also have a easy api.

json error

I'm getting this error when I try to run pgtrakt:

obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 758775 (char 758774) 2019-04-20 17:59:32,260 - WARNING - helpers.misc - backoff_handler - Backing off 0.6 seconds afters 2 tries calling function <function Trakt._make_items_request at 0x7f4c72c9ea60> with args (<media.trakt.Trakt object at 0x7f4c751264e0>,) and kwargs {'url': 'https://api.trakt.tv/movies/played/all', 'limit': 1000, 'languages': (), 'object_name': 'movies', 'type_name': 'played', 'genres': None} 2019-04-20 17:59:32,854 - INFO - media.trakt - _headers - No user 2019-04-20 17:59:32,927 - INFO - media.trakt - _make_items_request - There are 131 pages left to retrieve results from 2019-04-20 17:59:37,932 - INFO - media.trakt - _headers - No user 2019-04-20 17:59:38,054 - INFO - media.trakt - _make_items_request - There are 130 pages left to retrieve results from 2019-04-20 17:59:43,058 - INFO - media.trakt - _headers - No user 2019-04-20 17:59:43,240 - INFO - media.trakt - _make_items_request - There are 129 pages left to retrieve results from 2019-04-20 17:59:48,246 - INFO - media.trakt - _headers - No user 2019-04-20 17:59:48,312 - ERROR - media.trakt - _make_items_request - Exception retrieving played movies: Traceback (most recent call last): File "/opt/appdata/pgtrakt/media/trakt.py", line 87, in _make_items_request resp_json = req.json() File "/usr/local/lib/python3.6/dist-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 758775 (char 758774) 2019-04-20 17:59:48,319 - WARNING - helpers.misc - backoff_handler - Backing off 0.4 seconds afters 3 tries calling function <function Trakt._make_items_request at 0x7f4c72c9ea60> with args (<media.trakt.Trakt object at 0x7f4c751264e0>,) and kwargs {'url': 'https://api.trakt.tv/movies/played/all', 'limit': 1000, 'languages': (), 'object_name': 'movies', 'type_name': 'played', 'genres': None} 2019-04-20 17:59:48,720 - INFO - media.trakt - _headers - No user 2019-04-20 17:59:48,799 - INFO - media.trakt - _make_items_request - There are 131 pages left to retrieve results from 2019-04-20 17:59:53,804 - INFO - media.trakt - _headers - No user 2019-04-20 17:59:53,923 - INFO - media.trakt - _make_items_request - There are 130 pages left to retrieve results from 2019-04-20 17:59:58,928 - INFO - media.trakt - _headers - No user 2019-04-20 17:59:59,109 - INFO - media.trakt - _make_items_request - There are 129 pages left to retrieve results from 2019-04-20 18:00:04,115 - INFO - media.trakt - _headers - No user 2019-04-20 18:00:04,176 - ERROR - media.trakt - _make_items_request - Exception retrieving played movies: Traceback (most recent call last): File "/opt/appdata/pgtrakt/media/trakt.py", line 87, in _make_items_request resp_json = req.json() File "/usr/local/lib/python3.6/dist-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 758775 (char 758774) 2019-04-20 18:00:04,185 - ERROR - backoff - _log_giveup - Giving up _make_items_request(...) after 4 tries (None) 2019-04-20 18:00:04,186 - ERROR - pgtrack - movies - Aborting due to failure to retrieve Trakt played_all movies list

Any idea whats wrong here?

seasons and episodes?

Currently if you just add a season of a show via trakt, traktarr doesn't pick it up via the shows command.

the api suggests:

Possible values: 

    movies , shows , seasons , episodes

as values for the call, but traktarr only uses shows for now.

is that something that would be easy to add?

Blacklist shows based on rating

Most categories are covered for blacklisting, but it’s surprising being able to blacklist based on rating isn’t an option.

TV Shows Skipped

Describe the bug
I started grabbing from a trakt list of TV-Shows and noticed my root_folder for Sonarr was incorrect. I stopped traktarr service, stopped Plex, stopped Sonarr.
I then went into Sonarr's DB file with SQlite Viewer and removed all the items that Traktarr added where it had the incorrect path.

I edited my traktarr config file, started all the services I stopped and ran the command again -
traktarr shows - t link

Now, as I'm running that same list again, traktarr is skipping all the TV shows and none are being added back into Sonarr.

2019-11-19 13:01:41,227 - INFO       - Traktarr                            - shows                               - Retrieved Trakt 'Https://trakt.tv/users/drew-casteo/lists/disney-tv-shows' shows list, shows found: 173
2019-11-19 13:01:41,227 - INFO       - Traktarr                            - shows                               - Removed existing Sonarr shows from Trakt shows list, shows left to process: 160
2019-11-19 13:01:41,228 - INFO       - Traktarr                            - shows                               - Sorted shows list to process by highest 'votes'.
2019-11-19 13:01:41,228 - INFO       - Traktarr                            - shows                               - Processing list now...
2019-11-19 13:01:42,006 - INFO       - Traktarr                            - shows                               - SKIPPED: 'The Simpsons (1989)'
2019-11-19 13:01:42,767 - INFO       - Traktarr                            - shows                               - SKIPPED: 'Gravity Falls (2012)'
2019-11-19 13:01:43,560 - INFO       - Traktarr                            - shows                               - SKIPPED: 'Star Wars: The Clone Wars (2008)'
2019-11-19 13:01:44,392 - INFO       - Traktarr                            - shows                               - SKIPPED: 'Star Wars Rebels (2014)'
2019-11-19 13:01:45,220 - INFO       - Traktarr                            - shows                               - SKIPPED: 'Boy Meets World (1993)'
2019-11-19 13:01:45,910 - INFO       - Traktarr                            - shows                               - SKIPPED: 'X-Men: The Animated Series (1992)'
2019-11-19 13:01:46,623 - INFO       - Traktarr                            - shows                               - SKIPPED: 'Phineas and Ferb (2007)'
2019-11-19 13:01:47,390 - INFO       - Traktarr                            - shows                               - SKIPPED: 'DuckTales (1987)'

To Reproduce
Steps to reproduce the behavior:

  1. Use an incorrect root_folder for traktarr's Sonarr setting
  2. Run the command traktarr shows -t LINK
  3. Let the command finish or stop once a few shows have been added to Sonarr
  4. Stop Sonarr, Traktarr and Plex services
  5. Go into Sonarr's DB file and remove all shows that was added that has the wrong path from the Series folder. Save the DB
  6. Restart services that was stopped
  7. Run the command in steps 2 again

Expected behavior
Since the shows were no longer in Sonarr, Traktarr should be adding it into Sonarr but instead, it skips the shows.

System Information

  • Traktarr, version 1.2.5
  • Operating System: Ubuntu 18.04

Additional context
I am using Traktarr with CloudBox. Installed Traktarr using CloudBox's command.
I did the same for Radarr and had the same results.

Please consider adding a max search depth option

Love the service this provides, but one problem I frequently come across is at some point I feel like my automatic search for shows & movies is "scraping the bottom of the barrel" and adding low quality content that I would never add and likewise never watch. I've adjusted my intervals accordingly to try and avoid this problem, but it would be really nice to have a depth option so I can keep my intervals low and searches regular in case something new starts to trend or become popular.

For example:
Currently, when Traktarr is searching for popular movies and I already have the first 500 in Trakt's list, it will download the 501st most popular movie. With a depth option of 100, if the first 100 results doesn't yield anything that I don't already have then it stops searching.

Thank you!

Aborting due to failure to retrieve movie exclusion list from Radarr

Don’t know why this is happening. I don’t have any exclusions setup in radarr.

2019-10-06 11:17:10,736 - INFO - Traktarr - validate_trakt - ...Validated Trakt API Key.
2019-10-06 11:17:10,742 - DEBUG - media.pvr - validate_api_key - Request Response: 200
2019-10-06 11:17:10,742 - INFO - Traktarr - validate_pvr - Validated Radarr URL & API Key.
2019-10-06 11:17:10,750 - DEBUG - media.pvr - get_quality_profile_id - Request URL: http://192.168.2.232:7878/radarr/api/profile
2019-10-06 11:17:10,750 - DEBUG - media.pvr - get_quality_profile_id - Request Response: 200
2019-10-06 11:17:10,750 - DEBUG - media.pvr - get_quality_profile_id - Found Quality Profile ID for 'HD - 720p/1080p': 6
2019-10-06 11:17:10,750 - INFO - Traktarr - get_quality_profile_id - Retrieved Quality Profile ID for 'HD - 720p/1080p': 6
2019-10-06 11:17:13,000 - DEBUG - media.pvr - _get_objects - Request URL: http://192.168.2.232:7878/radarr/api/movie
2019-10-06 11:17:13,000 - DEBUG - media.pvr - _get_objects - Request Response: 200
2019-10-06 11:17:13,132 - DEBUG - media.pvr - _get_objects - Found 3463 objects
2019-10-06 11:17:13,132 - INFO - Traktarr - get_objects - Retrieved Radarr movies list, movies found: 3463
2019-10-06 11:17:13,145 - DEBUG - media.pvr - _get_objects - Request URL: http://192.168.2.232:7878/radarr/api/exclusions
2019-10-06 11:17:13,145 - DEBUG - media.pvr - _get_objects - Request Response: 200
2019-10-06 11:17:13,145 - DEBUG - media.pvr - _get_objects - Found 0 objects
2019-10-06 11:17:13,145 - ERROR - Traktarr - get_exclusions - Aborting due to failure to retrieve movie exclusion list from Radarr

UNC Path Not Working

I entered the root folder as \fileserver1.skynet.com\Media\TV Shows. When it was entered into Sonarr, the show had the root path as C:\fileserver1.skynet.com\Media\TV Shows.

The same happened for Radarr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.