Giter VIP home page Giter VIP logo

radarr-collections's People

Contributors

dobbersp avatar fryfrog avatar rhinorhys avatar roxedus 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

radarr-collections's Issues

Error - Profile template for People monitoring not recognised as a number - Exiting

Hi,

first of all thank you very much, i was looking for something like this for a time now.

i have a problem while searching for people:
here is my people.conf

[Quentin Tarantino]
id = 138
monitor = Directing, Production, Writing
reject =
min_year = 0

when i run the script with the people option
python rcm.py ./config -p

i get this error:

Error - Profile template for People monitoring not recognised as a number - Exiting

im running this on Ubuntu 18.04.4

Exclude movie from auto list import

Hi

Is there any way for this tool to use the same exceptions as the inbuilt exclusion list in Radarr. It's far more convenient to use one list of exclusions and doing it within the UI is easier than adding them to a config file.

Great tool by the way

TypeError: expected str, bytes or os.PathLike object, not list

Running this app for the very first time -
Windows 10 v19043.1165 x64
Radarr Version3.2.2.5080
Python v3.9.7
radarr-collections pulled from master today Sept 5 2021

Received following error when it was trying to add 100 Women

[21-09-05 09:11:39] >>                     TMDB ID: 20648     100 Women (2002)                                                                                                 Adding to Wanted
Traceback (most recent call last):
  File "c:\radarr-collections-master\rcm.py", line 522, in <module>
    else: tmdb_check(movie["tmdbId"])
  File "c:\radarr-collections-master\rcm.py", line 288, in tmdb_check
    collection_check(col_id, tmdbId)
  File "c:\radarr-collections-master\rcm.py", line 276, in collection_check
    for id_check in parts:  database_check(id_check, white_name, col_json, input_id)
  File "c:\radarr-collections-master\rcm.py", line 202, in database_check
    path = os.path.join([rootpath, folder])
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\ntpath.py", line 78, in join
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not list
Found 0 Movies

Failed to add [Response Code: 400]

I can't seem to get this working. When adding a movie I get ---> Failed to add [Response Code: 400] This is with radarr v3.1.1.4954

Looks like this is the error radarr is throwing
`2021-05-31 16:29:05.6|Warn|RadarrErrorPipeline|API Error:
BadRequest: Invalid request body. The JSON value could not be converted to System.Boolean. Path: $.monitored | LineNumber: 0 | BytePositionInLine: 20.

[v3.1.1.4954] Radarr.Http.REST.BadRequestException: BadRequest: Invalid request body. The JSON value could not be converted to System.Boolean. Path: $.monitored | LineNumber: 0 | BytePositionInLine: 20.
at Radarr.Http.REST.RestModule1.ReadResourceFromRequest(Boolean skipValidate, Boolean skipSharedValidate) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 253 at Radarr.Http.REST.RestModule1.<set_CreateResource>b__43_0(Object options) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 206
at Nancy.NancyModule.<>c__DisplayClass38_01.<Post>b__0(Object args) at Nancy.NancyModule.<>c__DisplayClass40_01.b__0(Object args, CancellationToken ct)
at Nancy.Routing.Route1.Invoke(DynamicDictionary parameters, CancellationToken cancellationToken) at Nancy.Routing.DefaultRouteInvoker.Invoke(Route route, CancellationToken cancellationToken, DynamicDictionary parameters, NancyContext context) at Nancy.Routing.DefaultRequestDispatcher.Dispatch(NancyContext context, CancellationToken cancellationToken) at Nancy.NancyEngine.InvokeRequestLifeCycle(NancyContext context, CancellationToken cancellationToken, IPipelines pipelines)

I tried run this against radarr v0.2.0.1503 and it worked.

Traceback error

Hi

Great script, but I just realised it stopped working for me. I get this error:

Traceback (most recent call last): File "/app/rcm.py", line 418, in <module> for movie in data: TypeError: 'int' object is not iterable

Help please - thanks in advance.

Help output not formatted correctly, missing \n for a couple options

0 ✓ fryfrog@apollo ~/git/radarr-collections $[master*] python2 rcm.py -h
rcm.py <option>

Options:
| Short    | Long           | Use
|----------|----------------|---------
| -h       | --help         |  Displays this help.
| -f       | --full         |  Repeat initial scan, recheck all movies.
| -s <num> | --start <num>  |  Specify start point, useful for big libraries if errors occur. (forces -f)
| -t <num> | --tmdbid <num> |  Check single TMDB ID for Collections.| -d       | --down         |  Only search movies with files. Ignore Wanted list.
| -p       | --people       |  Disable all Collection scanning, only scan People.| -q       | --quiet        |  Disables verbose logging in command line. Log file still created.
| -n       | --nolog        |  Disables log file creation. Verbose logging still visible.
| -c       | --cache        |  Disables automatic adding to Radarr, instead saves list of missing movies to text file.
| -a       | --art          |  Saves list of Collection artwork URLs to text file.

Looks like the -d and -q options aren't getting new lines maybe?

500 Error when adding to Radarr

I think I'm probably missing something silly but I have my config as such:

## Radarr settings
[radarr]
# What you type in your browser to view Radarr
server = localhost:7878/radarr
# api key can be found under Settings > General
api_key = myapikey
# Use https:// instead of http://
ssl = false
# Force unix style file path
docker = false

[tmdb]
# API key for TMDB
api_key =  myapikey

[adding]
# Reccomended defaults below are False, you'll be suprised how many movies will be added on the first run!
# Add new items monitored
monitored = true
# Automatically run a historical / backlog search when new items added
autosearch = false
# TMDB ID of a Movie in your database that will be used to copy the Profile and Root Path from when adding movies from People Monitoring
profile = 673

[results]
# Only check movies with files. Ignore Wanted list.
ignore_wanted = false
# Only check monitored movies in Radarr.
ignore_unmonitored = false
# Minimum column width for output files
column = 60
# Directory to create logs and output folder in. Default is current working directory ./
# If using Roxedus' docker container, set to path = /config
path =

[blacklist]
# Reject movies by TMDB ratings
min_rating = 0
min_votes = 0
# Reject movies in collections by earliest release year
min_year = 0
# Comma separated list of TMDB IDs to ignore if missing from database
blacklist

and I'm getting the error:

[v0.2.0.1358] Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: s. Path 'title', line 1, position 158.
  at Newtonsoft.Json.JsonTextReader.ParsePostValue () [0x0017b] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.JsonTextReader.ReadInternal () [0x00051] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.JsonTextReader.Read () [0x00007] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x0024d] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0015d] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0006d] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000dd] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00057] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <5e099fb6434a463a960f4009caf8abae>:0
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <5e099fb6434a463a960f4009caf8abae>:0
  at NzbDrone.Common.Serializer.Json.Deserialize (System.String json, System.Type type) [0x00000] in <7084924a59f8492b9528f8e6bea68198>:0
  at NzbDrone.Api.Extensions.ReqResExtensions.FromJson (System.IO.Stream body, System.Type type) [0x00014] in <0f2a435164944a8d9e5d219b0531f695>:0
  at NzbDrone.Api.Extensions.ReqResExtensions.FromJson[T] (System.IO.Stream body, System.Type type) [0x00000] in <0f2a435164944a8d9e5d219b0531f695>:0
  at NzbDrone.Api.Extensions.ReqResExtensions.FromJson[T] (System.IO.Stream body) [0x00000] in <0f2a435164944a8d9e5d219b0531f695>:0
  at NzbDrone.Api.REST.RestModule`1[TResource].ReadResourceFromRequest (System.Boolean skipValidate) [0x0000b] in <0f2a435164944a8d9e5d219b0531f695>:0
  at NzbDrone.Api.REST.RestModule`1[TResource].<set_CreateResource>b__41_0 (System.Object options) [0x00006] in <0f2a435164944a8d9e5d219b0531f695>:0
  at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)
  at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0

It throws these errors:

-08-19 12:40:26] >>                     TMDB ID: 10014     A Nightmare on Elm Street Part 2: Freddy's Revenge (1985)                        Adding to Wanted
[19-08-19 12:40:26] >>>                                       ---> Failed to add [Response Code: 500]
[19-08-19 12:40:26] >>    Radarr ID: 5500  TMDB ID: 10072     A Nightmare on Elm Street 3: Dream Warriors (1987)                               In Database
[19-08-19 12:40:26] >>    Radarr ID: 5501  TMDB ID: 10131     A Nightmare on Elm Street 4: The Dream Master (1988)                             In Database
[19-08-19 12:40:26] >>    Radarr ID: 5502  TMDB ID: 10160     A Nightmare on Elm Street: The Dream Child (1989)                                In Database
[19-08-19 12:40:27] >>                     TMDB ID: 11284     Freddy's Dead: The Final Nightmare (1991)                                        Adding to Wanted
[19-08-19 12:40:27] >>>                                       ---> Failed to add [Response Code: 500]

Announced movie with no release year get rejected

year is 0 because there is no known release year

[21-08-12 21:07:25] >      Baby Driver Collection (ID: 726865): 2 Movies in collection:

[21-08-12 21:07:25] >>                      TMDB ID: 628861    Baby Driver 2 (0)                                                                                                                           > Rejected: 0 in Year

pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13

Just set up this script and ran it for the first time. Excellent work!

I get this message upon running:

PS C:\Radarr\collector> python rcm.py ./config

C:\Radarr\collector\rcm.py:328: DeprecationWarning: pathlib.Path.enter() is deprecated and scheduled for removal in Python 3.13; Path objects as a context manager is a no-op
with Path.joinpath(output_path, folder) as fold:

C:\Radarr\collector\rcm.py:358: DeprecationWarning: pathlib.Path.enter() is deprecated and scheduled for removal in Python 3.13; Path objects as a context manager is a no-op
with Path.joinpath(config_path, u'memory.dat') as file:

My python info:

Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32

AttributeError: 'str' object has no attribute '_make_child'

Getting this in docker with the new build.


Traceback (most recent call last):

  File "/app/rcm.py", line 300, in <module>

    if not Path.exists(Path.joinpath(config_path, "rcm.conf")): nologfatal(u"\n" + "Error - {}/rcm.conf does not exist.".format(config_path))

  File "/usr/local/lib/python3.9/pathlib.py", line 972, in joinpath

    return self._make_child(args)

AttributeError: 'str' object has no attribute '_make_child'

Too many errors adding to Radarr - none of found movies are added.

rcm.py generates the following error:

Traceback (most recent call last):
File "C:\Users*\Downloads\radarr-collections-master\rcm.py", line 525, in
collection_check(col_id)
File "C:\Users*
\Downloads\radarr-collections-master\rcm.py", line 239, in collection_check
if len(col_json['name']) < int(config[u'results'][u'column']): top_c = int(config[u'results'][u'column'])
TypeError: 'int' object is not subscriptable
Too many errors adding to Radarr, found_21-06-21_21-38-11.txt has been saved in the output folder instead

Radarr tells me:

API Error:
BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.: BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.

Radarr info:

Version
3.2.2.5080
.NET
Yes (5.0.5)
DB Migration
195
AppData directory
C:\ProgramData\Radarr
Startup directory
C:\ProgramData\Radarr\bin
Mode
Service
Uptime

More detailed Radarr log:

2021-06-21 21:48:46.2|Debug|Api|[POST] /api/movie?apikey=(removed) 400.BadRequest (4 ms)
2021-06-21 21:48:46.5|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=15338: 200.OK (163 ms)
2021-06-21 21:48:46.7|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=836529: 200.OK (157 ms)
2021-06-21 21:48:47.0|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=348445: 200.OK (143 ms)
2021-06-21 21:48:49.0|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=574475: 200.OK (130 ms)
2021-06-21 21:48:49.6|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=340023: 200.OK (205 ms)
2021-06-21 21:48:49.8|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=786892: 200.OK (177 ms)
2021-06-21 21:48:50.1|Debug|Api|[GET] /api/v3/log?page=1&pageSize=50&sortDirection=descending&sortKey=time: 200.OK (4 ms)
2021-06-21 21:48:50.7|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=9367: 200.OK (172 ms)
2021-06-21 21:48:50.7|Warn|RadarrErrorPipeline|API Error:
BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.

[v3.2.2.5080] Radarr.Http.REST.BadRequestException: BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   at Radarr.Http.REST.RestModule`1.ReadResourceFromRequest(Boolean skipValidate, Boolean skipSharedValidate) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 253
   at Radarr.Http.REST.RestModule`1.<set_CreateResource>b__43_0(Object options) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 206
   at Nancy.NancyModule.<>c__DisplayClass38_0`1.<Post>b__0(Object args)
   at Nancy.NancyModule.<>c__DisplayClass40_0`1.<Post>b__0(Object args, CancellationToken ct)
   at Nancy.Routing.Route`1.Invoke(DynamicDictionary parameters, CancellationToken cancellationToken)
   at Nancy.Routing.DefaultRouteInvoker.Invoke(Route route, CancellationToken cancellationToken, DynamicDictionary parameters, NancyContext context)
   at Nancy.Routing.DefaultRequestDispatcher.Dispatch(NancyContext context, CancellationToken cancellationToken)
   at Nancy.NancyEngine.InvokeRequestLifeCycle(NancyContext context, CancellationToken cancellationToken, IPipelines pipelines)


2021-06-21 21:48:50.7|Debug|Api|[POST] /api/movie?apikey=(removed) 400.BadRequest (2 ms)
2021-06-21 21:48:52.5|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=10213: 200.OK (179 ms)
2021-06-21 21:48:52.5|Warn|RadarrErrorPipeline|API Error:
BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.

[v3.2.2.5080] Radarr.Http.REST.BadRequestException: BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   at Radarr.Http.REST.RestModule`1.ReadResourceFromRequest(Boolean skipValidate, Boolean skipSharedValidate) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 253
   at Radarr.Http.REST.RestModule`1.<set_CreateResource>b__43_0(Object options) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 206
   at Nancy.NancyModule.<>c__DisplayClass38_0`1.<Post>b__0(Object args)
   at Nancy.NancyModule.<>c__DisplayClass40_0`1.<Post>b__0(Object args, CancellationToken ct)
   at Nancy.Routing.Route`1.Invoke(DynamicDictionary parameters, CancellationToken cancellationToken)
   at Nancy.Routing.DefaultRouteInvoker.Invoke(Route route, CancellationToken cancellationToken, DynamicDictionary parameters, NancyContext context)
   at Nancy.Routing.DefaultRequestDispatcher.Dispatch(NancyContext context, CancellationToken cancellationToken)
   at Nancy.NancyEngine.InvokeRequestLifeCycle(NancyContext context, CancellationToken cancellationToken, IPipelines pipelines)


2021-06-21 21:48:52.5|Debug|Api|[POST] /api/movie?apikey=(removed) 400.BadRequest (2 ms)
2021-06-21 21:48:52.7|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=12095: 200.OK (150 ms)
2021-06-21 21:48:52.7|Warn|RadarrErrorPipeline|API Error:
BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.

[v3.2.2.5080] Radarr.Http.REST.BadRequestException: BadRequest: Invalid request body. ''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   at Radarr.Http.REST.RestModule`1.ReadResourceFromRequest(Boolean skipValidate, Boolean skipSharedValidate) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 253
   at Radarr.Http.REST.RestModule`1.<set_CreateResource>b__43_0(Object options) in D:\a\1\s\src\Radarr.Http\REST\RestModule.cs:line 206
   at Nancy.NancyModule.<>c__DisplayClass38_0`1.<Post>b__0(Object args)
   at Nancy.NancyModule.<>c__DisplayClass40_0`1.<Post>b__0(Object args, CancellationToken ct)
   at Nancy.Routing.Route`1.Invoke(DynamicDictionary parameters, CancellationToken cancellationToken)
   at Nancy.Routing.DefaultRouteInvoker.Invoke(Route route, CancellationToken cancellationToken, DynamicDictionary parameters, NancyContext context)
   at Nancy.Routing.DefaultRequestDispatcher.Dispatch(NancyContext context, CancellationToken cancellationToken)
   at Nancy.NancyEngine.InvokeRequestLifeCycle(NancyContext context, CancellationToken cancellationToken, IPipelines pipelines)


2021-06-21 21:48:52.7|Debug|Api|[POST] /api/movie?apikey=(removed) 400.BadRequest (2 ms)
2021-06-21 21:48:53.9|Debug|Api|[GET] /api/movie/lookup/tmdb?apikey=(removed)&tmdbid=656663: 200.OK (130 ms)

Any ideas?

I get error "KeyError: 'tmdb'" when running it

`
Welcome to Radarr Collection and People Manager by u/RhinoRhys

No previous data found - This must be your first time?

Running full scan:

---> 875 Unchecked Movies

---> 0 monitored People

875 Unchecked Movies:

[23-01-19 18:24:57] 1: Radarr ID: 1 TMDB ID: 293660 Deadpool (2016) In Collection

[23-01-19 18:24:58] > Deadpool Collection (ID: 448150): 3 Movies in collection:

Not sure how to fix this:

[23-01-19 18:24:58] >> Radarr ID: 142 TMDB ID: 383498 Deadpool 2 (2018) In Database

else: tmdb_check(movie["tmdbId"]) 

File "/app/rcm.py", line 254, in tmdb_check

collection_check(col_id, tmdbId)

File "/app/rcm.py", line 242, in collection_check

for id_check in parts:  database_check(id_check, white_name, col_json, input_id)

File "/app/rcm.py", line 166, in database_check

elif lookup_json[u'ratings'][u'tmdb'][u'value'] < float(config[u'blacklist'][u'min_rating']) or lookup_json['ratings'][u'tmdb'][u'votes'] < int(config[u'blacklist'][u'min_votes']): log(words[u'text'][u'rated'].format(*payload))

KeyError: 'tmdb'

Total Movies Found: 0

Thank You for using Radarr Collection and People Manager by u/RhinoRhys`

Results vs Output mismatch

rcm.py script reference config section called "results" (lines 54 & 55), however the section in rcm.conf is called "output" (line 32), which generates a KeyError.

if config[u'results'][u'path'] == "": config[u'results'][u'path'] = "./"
output_path = get_dir(config[u'results'][u'path'])

rcm.py exits after finding a match

python /home/plex/radarr-collections/rcm.py /home/plex/radarr-collections-config -p

Welcome to Radarr Collection and People Manager by u/RhinoRhys

People only mode: Ignoring Collections

Checking 1 monitored People:

[19-03-11 12:35:50] 1: Michael Haneke (ID: 6011): Monitoring: Directing

[19-03-11 12:35:50] >> Credited for Directing on 25 Movies:

[19-03-11 12:35:50] >> Radarr ID: 1385 TMDB ID: 445 Caché (2005) In Library
[19-03-11 12:35:50] >> Radarr ID: 1379 TMDB ID: 1791 The Piano Teacher (2001) In Library
[19-03-11 12:35:50] >> Radarr ID: 1387 TMDB ID: 1987 Benny's Video (1992) In Library
[19-03-11 12:35:50] >> Radarr ID: 1380 TMDB ID: 10234 Funny Games (1997) In Library
[19-03-11 12:35:50] >> Radarr ID: 1384 TMDB ID: 30970 Code Unknown (2000) In Library
[19-03-11 12:35:50] >> Radarr ID: 1383 TMDB ID: 24190 Time of the Wolf (2003) In Library
[19-03-11 12:35:50] >> Radarr ID: 1381 TMDB ID: 8461 Funny Games (2007) In Library
[19-03-11 12:35:50] >> Radarr ID: 1378 TMDB ID: 32761 The Seventh Continent (1989) In Library
[19-03-11 12:35:50] >> Radarr ID: 1388 TMDB ID: 32764 71 Fragments of a Chronology of Chance (1994) In Library
[19-03-11 12:35:50] >> Radarr ID: 1408 TMDB ID: 26891 The Castle (1997) In Library
[19-03-11 12:35:50] >> Radarr ID: 1382 TMDB ID: 37903 The White Ribbon (2009) In Library
[19-03-11 12:35:50] >> TMDB ID: 48336 Lumière and Company (1995) Missing
[19-03-11 12:35:50] >>> ---> Added sucessfully
Traceback (most recent call last):
File "/home/plex/radarr-collections/rcm.py", line 433, in
person_check(person)
File "/home/plex/radarr-collections/rcm.py", line 323, in person_check
database_check(tmdb_Id, white_name, per_json, role + " - " + job)
File "/home/plex/radarr-collections/rcm.py", line 279, in database_check
tmdb_ids.append(post_data['tmdbId'])
TypeError: string indices must be integers, not str
Found 1 Movies

Thank You for using Radarr Collection and People Manager by u/RhinoRhys

Error on creating output file

Hi

I've just upgraded to the latest version and receiving the following error message when running as '-c'
image

This is the error when doing a full scan '-f'
image

NameError: name 'old_unmon' is not defined

During an initial scan got:

Traceback (most recent call last):
File "D:\src\RadarrCollectionandPeopleManager\rcm.py", line 507, in
if movie["tmdbId"] not in old_unmon + old_want: log(words[u'text'][u'unmonitored'].format(logtext))
NameError: name 'old_unmon' is not defined
Found 0 Movies

Remedied by adding:
old_want, old_unmon = [],[]
after #397
skip, col_ids = [],[]

People scanning not working

Full scanning works fine, but as this is now more or less built into radarr, not as needed. People scanning does not appear to be working. Tried the default example, Quenting, Tom, no luck.

Welcome to Radarr Collection and People Manager by u/RhinoRhys
Auto adding disabled: saving results to file
People only mode: Ignoring Collections
1 monitored People:
[23-01-23 22:28:49] 1: Tom Hardy (ID: 2524): Monitoring: Acting
[23-01-23 22:28:49] >> Appeared in 50 Movies:
[23-01-23 22:28:50] >> TMDB ID: 45158 A for Andromeda (2006) Adding to Wanted
Traceback (most recent call last):
File "/app/rcm.py", line 520, in
person_check(person)
File "/app/rcm.py", line 291, in person_check
database_check(movie['id'], white_name, per_json, " - Cast - " + movie[u'character'].title())
File "/app/rcm.py", line 177, in database_check
elif stage == 3: index = tmdb_ids.index(int(config[u'adding'][u'profile']))
ValueError: invalid literal for int() with base 10: ''
Total Movies Found: 0
Thank You for using Radarr Collection and People Manager by u/RhinoRhys

Thanks

Ignore Collection

I would like to blacklist collections by ID rather than have to enter every individual movie ID.

Add Aphrodite / Radarr V3 Support

Great script - just need some help getting running please! I'm a python newbie. So far tried:

(i) installing Python27 to windows
(ii) and I've then run:

C:\Python27\python.exe -m pip install requests

C:\Python27\python.exe -m pip install --upgrade pip

C:\Python27\python.exe -m pip install configparser

C:\Python27\python.exe C:\scripts\radarr-collections-master\rcm.py ./config

and I get:

C:\scripts\radarr-collections-master>C:\Python27\python.exe C:\scripts\radarr-collections-master\rcm.py ./config Traceback (most recent call last): File "C:\scripts\radarr-collections-master\rcm.py", line 416, in <module> data = api("Radarr") File "C:\scripts\radarr-collections-master\rcm.py", line 159, in api return response.json() ## EXIT File "C:\Python27\lib\site-packages\requests\models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "C:\Python27\lib\json\__init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Help please

Aborts half way through with error

The script frequently aborts for me while only getting part way through scanning movies.

I get the following error:

Traceback (most recent call last):
File "/app/rcm.py", line 525, in
collection_check(col_id)
File "/app/rcm.py", line 255, in collection_check
elif not cache: input_id = int(config[u'adding'][u'profile'])
ValueError: invalid literal for int() with base 10: ''
Found 0 Movies

Release year in people search

Would it be possible to include the earliest release year in the people search?
e.g. Any Tom Cruise Film after 2015
This would mean you wouldn't have to manually blacklist hundreds of earlier films and you'd only get new films?

UnicodeEncodeError: 'charmap' codec can't encode characters in position blah: character maps to <undefined>

Get this error when hitting collections with foreign names. E.g.:

[21-01-01 13:40:21] 4747: Radarr ID: 4878 TMDB ID: 16364 Robotech: The Shadow Chronicles (2006) In Collection

[21-01-01 13:40:21] > ????(??) (ID: 396839): 4 Movies in collection:

Traceback (most recent call last):
File "D:\src\RadarrCollectionandPeopleManager\rcm.py", line 513, in
else: tmdb_check(movie["tmdbId"])
File "D:\src\RadarrCollectionandPeopleManager\rcm.py", line 270, in tmdb_check
collection_check(col_id, tmdbId)
File "D:\src\RadarrCollectionandPeopleManager\rcm.py", line 257, in collection_check
log(words[u'text'][u'other'].format(*payload) + u"\n")
File "D:\src\RadarrCollectionandPeopleManager\rcm.py", line 40, in log
elif sys.version_info[0] == 3: f.write(pay + u"\n")
File "C:\Python39\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 26-33: character maps to

ValueError when blacklist is empty

If there are no entries in the Blacklist configuration, rcm.py produces a ValueError. Workaround is to ensure there is a movie ID in the blacklist, even if it is a dummy entry.

Traceback (most recent call last):
  File "rcm.py", line 59, in <module>
    blacklist = [int(item) for item in blacklist]
ValueError: invalid literal for int() with base 10: ''

Issue on Mac

Getting this when I run it on Mac

Traceback (most recent call last): File "rcm.py", line 304, in <module> config_path = get_dir(sys.argv[1]) IndexError: list index out of range

TypeError: object of type 'NoneType' has no len() on initial run, not sure how to fix this.

Running this in docker, it seems that it's connected to Radarr and finds the movies, but then pukes immediately. The only argument I'm passing is -c

Welcome to Radarr Collection and People Manager by u/RhinoRhys

No previous data found - This must be your first time?
Auto adding disabled: saving results to file

Running full scan:
---> 5128 Unchecked Movies
---> 0 monitored People

5128 Unchecked Movies:

[22-06-26 12:21:07] 1:    Radarr ID: 2     TMDB ID: 646       Dr. No (1962)                                                                               In Collection
Traceback (most recent call last):
  File "/app/rcm.py", line 496, in <module>
    else: tmdb_check(movie["tmdbId"]) 
  File "/app/rcm.py", line 254, in tmdb_check
    collection_check(col_id, tmdbId)
  File "/app/rcm.py", line 224, in collection_check
    if len(col_json['name']) < int(config[u'results'][u'column']): top_c = int(config[u'results'][u'column'])
TypeError: object of type 'NoneType' has no len()
Total Movies Found: 0


Thank You for using Radarr Collection and People Manager by u/RhinoRhys

UnicodeEncodeError: 'ascii' codec can't encode character

crashed on a movie with a Thai name

[21-08-12 19:35:24] >      อยากรัก ก็รักเลย (ID: 690680): 3 Movies in collection:

[21-08-12 19:35:24] >>    Radarr ID: 1551   TMDB ID: 64786     Yes or No (2010)                                                                                                                                In Database
[21-08-12 19:35:24] >>                      TMDB ID: 367805    Yes or No 2.5 (2015)                                                                                                                            Adding to Wanted
Traceback (most recent call last):
  File "rcm.py", line 517, in <module>
    else: tmdb_check(movie["tmdbId"])
  File "rcm.py", line 283, in tmdb_check
    collection_check(col_id, tmdbId)
  File "rcm.py", line 271, in collection_check
    for id_check in parts:  database_check(id_check, white_name, col_json, input_id)
  File "rcm.py", line 229, in database_check
    payload = words[u'text'][u'found'].format(name.encode(), white_name, post_data[u'tmdbId'], white_cid, post_data['title'], post_data['year'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)
Found 18 Movies

Thank You for using Radarr Collection and People Manager by u/RhinoRhys

Crash when movie is on Radarr's import-blacklist

Error description:
Whenever a movie is on Radarr's import-blacklist, this tool crashed instead of ignoring it.

Steps to repoduce:

  • add 2 movies belonging to the same collection
  • delete one of them and add them to the Radarr's blacklist (delete --> add list exclusion)
  • run the tool
  • as soon as it tries to add the missing movie for that incomplete collection, it will crash with this error:
Traceback (most recent call last):
  File "/app/rcm.py", line 496, in <module>
    else: tmdb_check(movie["tmdbId"])
  File "/app/rcm.py", line 254, in tmdb_check
    collection_check(col_id, tmdbId)
  File "/app/rcm.py", line 242, in collection_check
    for id_check in parts:  database_check(id_check, white_name, col_json, input_id)
  File "/app/rcm.py", line 165, in database_check
    elif excludeList and id_check in excludeList: log(words[u'text'][u'exclude'].format(*payload))
  File "/usr/local/lib/python3.9/configparser.py", line 1257, in __getitem__
    raise KeyError(key)
KeyError: 'exclude'
Total Movies Found: 0

Current workaround:
There are currently 3 ways to avoid the tool crashing in every run:

  • Manually delete the entire collection in Radarr instead of just one unwanted movie
  • Manually add the movie's TMDB-ID to a second, redundant blacklist in rcm.conf
  • Remove the unwanted movie from Radarr's blacklist and live with it

Expected behaviour:
Tool should honor Radarr's exclusion list. Whenever a movie is in there, this tool should not try to add it. Blacklist setting in rcm.conf should be removed as it is redundant to Radarr's own blacklist.

Failing while 'Adding to Wanted'

I'm getting the following when running -f scan. Running in docker pulled today. Any help appreciated.

[21-10-25 00:00:15] >>                     TMDB ID: 8077      Alien³ (1992)                                                                                                    > Rejected: Blacklisted
[21-10-25 00:00:15] >>                     TMDB ID: 8078      Alien Resurrection (1997)                                                                                        Adding to Wanted
Traceback (most recent call last):
  File "/app/rcm.py", line 522, in <module>
    else: tmdb_check(movie["tmdbId"]) 
  File "/app/rcm.py", line 288, in tmdb_check
    collection_check(col_id, tmdbId)
  File "/app/rcm.py", line 276, in collection_check
    for id_check in parts:  database_check(id_check, white_name, col_json, input_id)
  File "/app/rcm.py", line 199, in database_check
    path = "/".join(rootpath, folder)
TypeError: str.join() takes exactly one argument (2 given)
Found 0 Movies

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.