Giter VIP home page Giter VIP logo

plex-auto-collections's People

Contributors

burkasaurusrex avatar dependabot[bot] avatar journeyover avatar meisnate12 avatar mza921 avatar vladimir-tutin 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

plex-auto-collections's Issues

Studio collections?!

Hello everyone, I've been trying to get studio collections working but I can't seem to figure them out! ๐Ÿ˜ฉ anyone else tried it and succeeded? Thank you very much!

Support Request -- Still Experiencing issues

I'm still experiencing issues and not sure what I'm doing wrong. Could someone assist please?

C:\Plex-Auto-Collections\app>python plex_auto_collections.py --config-path C:\Plex-Auto-Collections\config\config.yml

|===================================================================================================|
| ___ _ _ _ ___ _ _ _ _ |
| | _ | | ___ __ __ /\ _ _ | | ___ / | ___ | || | ___ __ | | () ___ _ _ ___ |
| | /| |/ -)\ \ / / _ | || || |/ _ \ | ( / _ | || |/ -)/ || || |/ _ | ' \ (-< |
| || ||
|/\ // ,| __|/ |/|||||| |||/||||/__/ |
| |
|===================================================================================================|
| Locating config...
| Using C:\Plex-Auto-Collections\config\config.yml as config
|===================================================================================================|
| Connecting to plex...
| plex connection scuccessful
|===================================================================================================|
| Connecting to tmdb...
| tmdb connection scuccessful
|===================================================================================================|
| Connecting to trakt...
| Config Error: trakt sub-attribute client_id is blank
| trakt connection failed
|===================================================================================================|
| Connecting to radarr...
| Config Error: radarr sub-attribute version not found using v2 as default
| Config Error: radarr sub-attribute token is blank
| radarr connection failed
|===================================================================================================|
| Locating image_server...
Traceback (most recent call last):
File "plex_auto_collections.py", line 471, in
config = Config(config_path)
File "C:\Plex-Auto-Collections\app\config_tools.py", line 85, in init
ImageServer(config_path)
File "C:\Plex-Auto-Collections\app\config_tools.py", line 242, in init
checkPath("poster_directory", self.poster, "image_directory")
File "C:\Plex-Auto-Collections\app\config_tools.py", line 239, in checkPath
v = os.path.abspath(value)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\ntpath.py", line 527, in abspath
return normpath(_getfullpathname(path))
TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not NoneType

C:\Plex-Auto-Collections\app>

To do: Sync with various lists instead of append-only

The script currently only allows for appending missing media to a collection. It would be cool to be able to sync -- append missing and remove extras. It could be accomplished today by deleting the collection and then running the current append-only script. Instead of destroying and recreate the collection everytime, it seems like it would be better to update the existing collection to maintain any collection-level settings that the user has set in Plex directly.

Support Request

Hello,
My apologies for posting here but could someone assist / point me in the right direction with the error I'm receiving while trying to run the collection tool.

Traceback (most recent call last):
File "plex_auto_collections.py", line 202, in
plex = Plex(config_path)
File "C:\Users\vitdom01\Plex\Plex-Auto-Collections-master\Plex-Auto-Collections-master\app\config_tools.py", line 53, in init
config = Config(config_path).plex
File "C:\Users\vitdom01\Plex\Plex-Auto-Collections-master\Plex-Auto-Collections-master\app\config_tools.py", line 25, in init
with open(self.config_path, 'rt', encoding='utf-8') as yml:
FileNotFoundError: [Errno 2] No such file or directory: 'config.yml'

Bug: broken pipe error in Linux

Going to be a tough one to debug ... looking into it. Are there any places where we are concatenating long strings before we print?

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1049, in _send_output
self.send(chunk)
File "/usr/local/lib/python3.8/http/client.py", line 971, in send
self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 410, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1049, in _send_output
self.send(chunk)
File "/usr/local/lib/python3.8/http/client.py", line 971, in send
self.sock.sendall(data)
urllib3.exceptions.ProtocolError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "plex_auto_collections.py", line 502, in
update_from_config(config_path, plex, True, args.no_meta, args.no_images)
File "plex_auto_collections.py", line 288, in update_from_config
else: plex_collection.uploadPoster(filepath=poster[1])
File "/usr/local/lib/python3.8/site-packages/plexapi/library.py", line 1287, in uploadPoster
self._server.query(key, method=self._server._session.post, data=data)
File "/usr/local/lib/python3.8/site-packages/plexapi/server.py", line 440, in query
response = method(url, headers=headers, timeout=timeout, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 578, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))

To do: Create setting for collection-level sort titles

It would be helpful to be able to set sort titles for each collection. It's great to be able to promote certain collections to the top of the sort by having the start with * or to create multiple rows with *101 *102 etc.

Trakt API timeout errors

One of my servers is able to process lists just fine, while one gets ReadTimeoutErrors after hours of processing a trakt list. Can anyone who has everything working shed light on how long it should take to process a Trakt list (given a certain list size)?

Attempting to start image server IMAGE SERVER RUNNING ON http://127.0.0.1:12920/images/ Update Collections from Config? (y/n): y Updating collection: Kung Fu... Processing trakt-list: https://trakt.tv/users/bluedfb/lists/kung-fu-classics WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.trakt.tv', port=443): Read timed out. (read timeout=24)")': /search/tmdb/455610?type=movie WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.trakt.tv', port=443): Read timed out. (read timeout=24)")': /search/tmdb/455610?type=movie Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.7/http/client.py", line 1336, in getresponse response.begin() File "/usr/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status() File "/usr/lib/python3.7/http/client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) socket.timeout: timed out

Bug: certain IMDb searches fail

Looking into this now:

| Processing imdb_list: https://www.imdb.com/search/title/?groups=best_picture_winner&sort=year,desc&count=250
Traceback (most recent call last):
File "plex_auto_collections.py", line 502, in
update_from_config(config_path, plex, True, args.no_meta, args.no_images)
File "plex_auto_collections.py", line 77, in update_from_config
try: missing, map = add_to_collection(config_path, plex, m, v, c, map, subfilters)
File "/app/plex_tools.py", line 135, in add_to_collection
if method == "imdb_list": movies, missing = imdb_tools.imdb_get_movies(config_path, plex, value)
File "/app/imdb_tools.py", line 39, in imdb_get_movies
total = re.findall('(\\d+)', results.group(0))[2]
AttributeError: 'NoneType' object has no attribute 'group'

To do: Add README section detailing use of quotes

maybe we should have a section of the README dedicated to showing people examples of when to use or not to use quotes and let them know some of the common special characters that would require the use of quotes.

New in v2.0.0 - Incorrect TMDB info for people

Snippet from config, but it's not just Chappelle:

Actor Dave Chappelle:
    sort_title: -5 Actor Dave Chappelle
    actors: Dave Chappelle
    #tmdb_id: 4169
    tmdb_summary: 4169
    tmdb_poster: 4169
    collection_order: release

When running, the incorrect poster (for Chappelle) is loaded:
| Detail: poster updated to [url] https://image.tmdb.org/t/p/original/m2iVkJPxDrrink7NiE412nFBMQj.jpg

This is the incorrect poser, as shown.
Screen Shot 2020-10-25 at 9 09 56 PM

The URL to the proper poster (Chappelle) should be https://image.tmdb.org/t/p/original/qrJzigQLQ7FwrzYBLeDwvuPN63t.jpg

Also, not sure if it is known but tmbd_id still doesn't work :(

Script hangs on processing trakt-list

I have the script working on my home server but cannot get it to work on a remote server. I have tried nearly 10 different configurations and just cannot figure out what is wrong.

Here is my current config:

collections:
  Musicals:
    trakt-list: https://trakt.tv/users/asterlea/lists/top-musicals
    details:
      summary: blah blah blah
plex:
  library: MoviesTest
  library_type: movie
  token: ##############
  url: http://178.30.148.206:32400
radarr:
  url: http://127.0.0.1:12110/radarr/
  token: ##############
  quality_profile_id: 2
  root_folder_path: /home/username
  search: false
tmdb:
  apikey: ##############
  language: en
trakt:
  client_id: ##############
  client_secret: ##############
  # Below is filled in automatically when the script is run
  authorization:
    access_token: ##############
    token_type: Bearer
    expires_in: 7776000
    refresh_token: ##############
    scope: public
    created_at: 1592012620
image-server:
  host: 127.0.0.1
  port: 12920

My Plex server is showing the following on it's remote access page:

Private: http://178.30.148.206:32400
Public: http://178.30.148.206:32400

^ They are the exact same and I'm wondering if that's causing an issue. That IP is made up.

Bug: New in v2.0.0, Shows no longer match, "unknown filter category"

Genre (genres) worked prior to v2.0.0.
Studio matching did not work prior to v2.0.0, and still does not but now errors with the same "unknown filter categroy"

Config:

  Quibi:
    studio: Quibi
    sort_title: -3 Quibi
    summary: A collection of TV Shows from the Quibi streaming service
    collection_order: alpha
  Anime:
    genres: Anime
    sort_title: -2 Anime
    summary: A collection of TV shows from the Anime genre
    collection_order: alpha
  Comedy:
    genres: Comedy
    sort_title: -2 Comedy
    summary: A collection of TV shows from the Comedy genre
    collection_order: alpha

Output:

|===================================================================================================|
|
| Updating collection: Quibi...
| Sync Mode: append
|
| Processing studio: Quibi
**Unknown filter category: studio**
|
| Processing collection_order: alpha
|
| Detail: sort_title updated to -3 Quibi
| Detail: summary updated to "A collection of TV Shows from the Quibi streaming service"
|
|===================================================================================================|
|
| Updating collection: Anime...
| Sync Mode: append
|
| Processing genre: Anime
**Unknown filter category: genres**
|
| Processing collection_order: alpha
|
| Detail: sort_title updated to -2 Anime
| Detail: summary updated to "A collection of TV shows from the Anime genre"
|
|===================================================================================================|
|
| Updating collection: Comedy...
| Sync Mode: append
|
| Processing genre: Comedy
**Unknown filter category: genres**
|
| Processing collection_order: alpha
|
| Detail: sort_title updated to -2 Comedy
| Detail: summary updated to "A collection of TV shows from the Comedy genre"
|
|===================================================================================================|

Docker image is out of date

I'm able to use the docker image to create collections based on PLEX atributes like genre, actors, or studio, but no collections that use lists are being created. This is all I see in the logs.

Updating collection: Jurassic Park...,
Processing tmdb_list: https://www.themoviedb.org/collection/328,
Updating collection: Alien (Past & Present)...,
Processing tmdb_list: https://www.themoviedb.org/collection/8091,
Processing tmdb_list: https://www.themoviedb.org/collection/135416,
Updating collection: James Bond...,
Processing tmdb_list: https://www.themoviedb.org/collection/645,
Updating collection: Star Wars...,
Processing tmdb_list: https://www.themoviedb.org/collection/10,
Updating collection: Star Trek (Alternate Reality)...,
Processing tmdb_list: https://www.themoviedb.org/collection/115575,
Updating collection: IMDb Top 250...,
Processing imdb_list: https://www.imdb.com/search/title/?groups=top_250&count=250,
Updating collection: Christmas...,
Processing trakt_list: https://trakt.tv/users/movistapp/lists/christmas-movies,
Processing trakt_list: https://trakt.tv/users/2borno2b/lists/christmas-movies-extravanganza,
Updating collection: Reddit Top 250 (2019)...,
Processing trakt_list: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition

Another thing to mention is that this works

  Dave Chappelle:
    actors: Dave Chappelle
#    tmdb_summary: 4169

and this fails with an exit code 1

  Dave Chappelle:
    actors: Dave Chappelle
    tmdb_summary: 4169

Issue syncing the default trakt "Watchlist" into collection

Not sure if I'm doing something wrong here but I just pulled the latest version today and setup. When I try to use the default trakt "watchlist" list, I get the error below. If I create a new private list, and add something to it, and update the list in the config, it works. Should this work with the "watchlist" list? Thanks in advance!

(I've changed the usernames below to placeholders)

| Sync Mode: sync
| 
| Processing trakt_list: https://trakt.tv/users/*username*/watchlist
Traceback (most recent call last):
  File "./plex_auto_collections.py", line 646, in <module>
    update_from_config(config_path, plex, True, args.no_meta, args.no_images)
  File "./plex_auto_collections.py", line 113, in update_from_config
    missing, map = add_to_collection(config_path, plex, m, v, c, map, subfilters)
  File "/Users/macuser/Downloads/Plex-Auto-Collections/app/plex_tools.py", line 143, in add_to_collection
    movies, missing = trakt_tools.trakt_get_movies(config_path, plex, value)
  File "/Users/macuser/Downloads/Plex-Auto-Collections/app/trakt_tools.py", line 13, in trakt_get_movies
    trakt_list_items = trakt.Trakt[trakt_list_path].items()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/trakt/interfaces/base/__init__.py", line 117, in __getattr__
    value = getattr(self.interface, name)
AttributeError: 'UsersWatchlistInterface' object has no attribute 'items'```

To do: refresh Trakt token on each run

Trakt provides the ability to refresh the Trakt token. Seems like the script should refresh the token on each run or on some interval (maybe set the interval in the yaml with a logical default) to avoid auth silently failing? I've come across the issue myself given that Trakt tokens expire every 3 months.

Looks like #14 and #48 are probably both caused by this.

IMDB List 100 movie limit.

An issue raised on vladmirs master was that an IMDB page maxes out at 100 movies and therefore so does the collection. A user there posted a fix for this in the IMDB tools by iterating over at least 10 pages. I upload the fix for that file here.

Its just a for loop combing over 10 pages instead of just the first one. Seems to work.

Read timeouts - able to modify?

I have a massive Plex library and I keep getting timeouts, so the script never really completes.
Is there anyway to modify the timeout limit?
Alternatively, is it possible to catch this error, pause for 10s or so, and continue instead of crashing out?

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.6/http/client.py", line 1373, in getresponse
    response.begin()
  File "/usr/lib/python3.6/http/client.py", line 311, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.6/http/client.py", line 272, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 727, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 410, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/packages/six.py", line 735, in reraise
    raise value
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 428, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/home/usr/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
    self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='plex.domain.com', port=443): Read timed out. (read timeout=30)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/scripts/Plex-Auto-Collections/app/plex_auto_collections.py", line 646, in <module>
    update_from_config(config_path, plex, True, args.no_meta, args.no_images)
  File "/opt/scripts/Plex-Auto-Collections/app/plex_auto_collections.py", line 113, in update_from_config
    missing, map = add_to_collection(config_path, plex, m, v, c, map, subfilters)
  File "/opt/scripts/Plex-Auto-Collections/app/plex_tools.py", line 179, in add_to_collection
    current_m = get_movie(plex, rk)
  File "/opt/scripts/Plex-Auto-Collections/app/plex_tools.py", line 18, in get_movie
    return plex.Server.fetchItem(data)
  File "/home/user/.local/lib/python3.6/site-packages/plexapi/base.py", line 139, in fetchItem
    for elem in self._server.query(ekey):
  File "/home/user/.local/lib/python3.6/site-packages/plexapi/server.py", line 440, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/home/user/.local/lib/python3.6/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/home/user/.local/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/user/.local/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/user/.local/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='plex.domain.com', port=443): Read timed out. (read timeout=30)

To do: Create setting for other collection-level metadata

It would be amazing if you could set the background image for collections in basically the exact same way you can for the poster images. maybe a different folder for local background assets vs posters or have the program match folder name inside the assets folder and the have a poster.* and/or background.* file in there that it picks up.

Edit: In addition to the background settings and sort title setting (which I saw you already had a ticket for) I think it would be beneficial to also add a setting for content rating, and if possible be able to specify in the YXML the collection mode and collection order that are under advance settings.

To do: Create setting for custom 'local poster' file names

Create a local-poster option in details for each collection to specify the exact name of the image. It would be helpful for:

  • Special characters. If you wanted to name a collection Airplane!, the script would trying and match to Airplane!.* (e.g. Airplane!.jpg) which is not possible on a lot of file systems. Being able to explicitly set that image to Airplane.png or whatnot would solve the issue.
  • Shared collection posters. If you wanted several collections to share the same image, you could have all of the collections point to the same image instead of maintaining several copies of the same image.

Support OMBI requests

Create collections based on a OMBI users' requests. Something like:

collections:
  mza's requests:
    ombi_movies: <ombi username>    (or ombi_tv)
ombi:
  url:
  apikey:

TMDB Directors?

I'm interested in syncing the movies a director has made to a collection and add missing movies to Radarr.
Any way to query TMDB directors, similar to tmdb_actor?

Script failing to find imdb_id

Hi all,

Trying this out for the first time, added a coulple of Trakt lists and kept the default Jurassic park TMDB list. I'm getting the below error that entries['imdb_id'] isn't found in movie details.

Removing the tmdb list and using trakt works however

 Plex Auto Collections by /u/iRawrz
==================================================================
Attempting to start image server
IMAGE SERVER NOT RUNNING
Update Collections from Config? (y/n): y
Updating collection: Jurassic Park...
Processing tmdb-list: https://www.themoviedb.org/collection/328
Traceback (most recent call last):
  File "plex_auto_collections.py", line 217, in <module>
    update_from_config(config_path, plex)
  File "C:\Users\Administrator\Downloads\Plex-Auto-Collections-master\config_tools.py", line 125, in update_from_config
    missing = add_to_collection(config_path, plex, m, v, c, subfilters)
  File "C:\Users\Administrator\Downloads\Plex-Auto-Collections-master\plex_tools.py", line 133, in add_to_collection
    movies, missing = imdb_tools.tmdb_get_movies(config_path, plex, value)
  File "C:\Users\Administrator\Downloads\Plex-Auto-Collections-master\imdb_tools.py", line 103, in tmdb_get_movies
    imdb_id = t_movie.details(mid).entries['imdb_id']
AttributeError: 'AsObj' object has no attribute 'entries'  

I'm not sure what's causing this, I've ensured the plexapi is installed along with all other requirements.
This is my config.yml (censored)

  Jurassic Park:
    tmdb-list: https://www.themoviedb.org/collection/328
    details:
      tmdb-summary: 328
      poster: https://i.imgur.com/QMjbyCX.png
  Marvel Cinematic Universe:
    trakt-list: https://trakt.tv/users/tetharion/lists/marvel-cinematic-universe
    details: 
        poster: https://i.imgur.com/S6Ohqaw.png
  Disney Animated:
    trakt-list: https://trakt.tv/users/kombat/lists/disney-animation
    details:
        poster: https://i.imgur.com/6tZJs1t.png
plex:
  library: Films
  library_type: 'movie'
  token: ################
  url: http://192.168.1.235:32400
radarr:
  url: http://192.168.1.235:7878/radarr/
  token: #################################
  quality_profile_id: 4
  root_folder_path: /CaveJ-Movies/
  search: false
tmdb:
  apikey: #################################
  language: en
trakt:
  client_id: #################################
  client_secret: #################################
  # Below is filled in automatically when the script is run
  authorization:
    access_token:
    token_type:
    expires_in:
    refresh_token:
    scope:
    created_at:
image-server:
  host: 0.0.0.0
  port: 5000

Poster no longer being uploaded / set unless using the image server.

Splitting #27 as requested.

It no longer seems to upload / set the poster when using the poster url config settings. Removing the poster url settings from the collections and instead use the image server method it sets the poster correctly.

old text
  1. Doesn't seem to download images anymore when setting a poster under the details section of a collection in the config file. Removing the poster and putting the image in the config/images location still seems to work, but it'd be great to get the other way to work as well..

To do: Update README

The README is getting a bit stale. Probably makes sense to have a subsection in the Configuration section for each grouping the yaml config, with detail for each option. Also need to add details around the docker image.

imdB list not matching to library

The titles on the list are 100% in the library, however it is not matching to any of the titles in my Plex library despite being able to connect. Is this due to the new Plex agent?

Feature Request/Bug: Add support for radarr v3

Currently, the script fails when attempting to add movies via the Radarr v3 API. From what I can tell, there are no major breaking changes to Aphrodite's API that would prevent the "Add Movie" Function from working. Would also appreciate any help if anyone's gotten it to work.

Summary no longer being set.

Script no longer sets the summary. I've tried both tmdb-summary with the correct collections page's ID and I've tried the normal summary with the summary text after, doing either sets the summary temporarily but upon doing anything in plex (going to a different movie or show or to the home page / clicking the edit button for the movie / etc) or exiting the script it removes the summary from the collection.

I am running plex version 1.20.0.3125 but this has been going on for several versions now.

Request: Limit scan scope?

You guys are doing awesome work and I'm genuinely thankful. I have setup and updated so many collections, but my libraries are so large it takes several hours to execute if I want to keep them updated. With +25K movies and +6.5K shows, running through creating Genre collections alone takes a couple hours.

Is it possible to limit the scope of the script, ideally utilizing the "date added" attribute in Plex (or maybe Tautulli)? I'm not a programmer, but I envision running the script with a date option (-d 2020-10-20) or similar, which limits the script to execute against movies/shows added after the date given.

Thoughts?

Run script in Docker image on a schedule

I have an enhancement request for the docker image, keep the container running, but run the script inside on a schedule defined by an environment variable. The environment variable could ether be in CRON format or like this

-e SCRIPTINTERVAL=1h #s or #m or #h or #d :: s = seconds, m = minutes, h = hours, d = days :: Amount of time between each script run

Trakt list suddenly broke, not iterable

I get the following error on a trakt list that used to work just fine previously:

Traceback (most recent call last): File "plex_auto_collections.py", line 217, in <module> update_from_config(config_path, plex) File "/home/Ex/mza921/Plex-Auto-Collections/config_tools.py", line 125, in update_from_config missing = add_to_collection(config_path, plex, m, v, c, subfilters) File "/home/Ex/mza921/Plex-Auto-Collections/plex_tools.py", line 135, in add_to_collection movies, missing = trakt_tools.trakt_get_movies(config_path, plex, value) File "/home/Ex/mza921/Plex-Auto-Collections/trakt_tools.py", line 14, in trakt_get_movies title_ids = [m.pk[1] for m in trakt_list_items if isinstance(m, trakt.objects.movie.Movie)] TypeError: 'NoneType' object is not iterable

Anyone else have their trakt lists just break?

Sonarr Support

Does this work with Sonarr? If so, what adjustments need to be made in the config?

Support Request

Getting the following when attempting to run the script using a trakt list:

Traceback (most recent call last): File "plex_auto_collections.py", line 378, in <module> update_from_config(config_path, plex, True) File "plex_auto_collections.py", line 54, in update_from_config missing = add_to_collection(config_path, plex, m, v, c, subfilters) File "/app/plex_tools.py", line 135, in add_to_collection movies, missing = trakt_tools.trakt_get_movies(config_path, plex, value) File "/app/trakt_tools.py", line 14, in trakt_get_movies title_ids = [m.pk[1] for m in trakt_list_items if isinstance(m, trakt.objects.movie.Movie)] TypeError: 'NoneType' object is not iterable

Docker: Log file and dry run

Hi, apologise for bugging you here. I just setup the container and working without any issues, but is it possible to pass an arguments in compose (container) to generate the log file.

  1. Is it possible to have an option to run script in dry run or not?

Thank you so much

Documentation: breaking changes

In the absence of some proper releases, we should probably include a section in the documentation of breaking changes to the YAML with associated dates.

Eventually it would great to get to proper versioning, tested releases, formal python module, etc ...

[REQUEST] Immutable Config

I have this script (in docker format) running in my kubernetes cluster and it works great! There is one downside, I have to store the config inside of RW volume, which makes updating it a pain in the ass! Ideally, I would use a configMap to allow me to keep the config inside of my git tree. Unfortunately, this requires the config to be immutable since the configMap mount is RO. This, then, breaks the Trakt integration since it stores the authorization inside of the config file.

Is there anyway to pull that part out of the config and store it in a separate file alongside of the config file? This would still live in my persistent volume claim as RW but the actual config would be static.

How would manual collection editing work along the external service sync?

Hi. I have a small family server, and want to figure out how to track things best, i.e. how to know if any of the users still want that movie/series, or I can delete it. I thought about the collections, this way the users see a collection with their nickname, and for any item they see if it belongs to the collection, and they see whether they're the only one left who needs the item. The only downside is that only I can edit collections, and I have to ask everyone about everything frequently. So I thought of looking for a bot for it, or at least an example of how to work with a collection through an api, but I couldn't find it. But instead I found this amazing tool, and plan to try it out soon. However, first I need to know how it could work with sync. I'm planning to make my users use IMDb or Trakt apps watchlists. For them to be able to edit the collections on Plex end, I suppose I need to use the sync, and not the append type.

  1. Would I be able to import a specific existing collection to the IMDb/Trakt watchlist beforehand, or is it one-way sync?
  2. If the user deletes something on their third-party side, and it was initially manually added on Plex side, will it be deleted on sync? Or does sync delete only items that were initially added by sync?
  3. Can you sync episodes via IMDb or Trakt? And is there any difference between the syncing capabilities of those two? I'm trying to choose one here.

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.