Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repeatedly Downloading Trakt List, Nothing Else Happens

mocharilla opened this issue · comments

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if identical issue already exists
  • I have tried downgrading to find version that can be used as a workaround

The problem

Sync was working perfectly fine until I updated in the last few days. Now, instead of updating anything, it just keeps repeatedly saying "INFO Downloaded Trakt list" with a set of playlists that repeat over and over. I tried unliking those playlists to see if they specifically were the problem, but it just gave me the errors with different playlists. At no point does it ever do anything else until it eventually gives a completed sync message. It does not give an error at any point.

Screenshot 2024-02-04 at 8 53 31 PM Screenshot 2024-02-04 at 8 56 22 PM

Steps to reproduce the behavior

  1. plextraktsync sync
    This persists despite computer restarts, reinstalls of plextraktsync, and downgrading to the last working version.

Error trace / logs

No response

Expected behavior

Syncing of the watched status between Trakt and Plex. I added new files since the last sync which are marked as watched in Trakt and properly formatted on the server. This behavior has worked perfectly fine before I updated most recently.

Inspect of problematic items

No response

Workarounds

I tried downgrading, but it did not fix the issue. The version that was working was 27.10 before updating, but the issue persists when downgrading back to that.

Install method

pipx

Config file contents

cache:
  path: $PTS_CACHE_DIR/trakt_cache

excluded-libraries:
  - Disney
  - Broadway

config:
  dotenv_override: true

plex:
  timeout: 30

logging:
  append: true
  # Whether to show timestamps in console messages
  console_time: false
  debug: false
  filename: plextraktsync.log
  # Additional logger names to apply filtering
  filter_loggers:
#    - plexapi
#    - requests_cache.backends
#    - requests_cache.backends.base
#    - requests_cache.backends.sqlite
#    - requests_cache.policy.actions
#    - requests_cache.session
#    - trakt.core
#    - urllib3.connectionpool
  filter:
#    # Filter out all messages with level WARNING
#    - level: WARNING
#    # Filter out message with level WARNING and containing a text
#    - level: WARNING
#      message: "not found on Trakt"
#    - message: "because provider local has no external Id"
#    - message: "because provider none has no external Id"
#    - message: "Retry using search for specific Plex Episode"
#    # Filter out messages by requests_cache
#    - name: requests_cache.backends
#    - name: requests_cache.backends.base
#    - name: requests_cache.backends.sqlite
#    - name: requests_cache.policy.actions
#    - name: requests_cache.session

# settings for 'sync' command (default)
sync:
  plex_to_trakt:
    collection: false
    # Clear collected state of items not present in Plex
    clear_collected: true
    ratings: false
    watched_status: false
    # If plex_to_trakt watchlist=false and trakt_to_plex watchlist=true
    # the Plex watchlist will be overwritten by Trakt watchlist
    watchlist: false
  trakt_to_plex:
    liked_lists: true
    ratings: true
    watched_status: true
    # If trakt_to_plex watchlist=false and plex_to_trakt watchlist=true
    # the Trakt watchlist will be overwritten by Plex watchlist
    watchlist: true
    # If you prefer to fetch trakt watchlist as a playlist instead of
    # plex watchlist, toggle this to true (is read only if watchlist=true)
    watchlist_as_playlist: true
  # Setting for whether ratings from one platform should have priority.
  # Valid values are trakt, plex or none. (default: plex)
  # none - No rating priority. Existing ratings are not overwritten.
  # trakt - Trakt ratings have priority. Existing Plex ratings are overwritten.
  # plex - Plex ratings have priority. Existing Trakt ratings are overwritten.
  rating_priority: trakt

# settings for 'watch' command
watch:
  add_collection: false
  remove_collection: false
  # what video watched percentage (0 to 100) triggers the watched status
  scrobble_threshold: 90
  # true to scrobble only what's watched by you, false for all your PMS users
  username_filter: true
  # Show the progress bar of played media in terminal
  media_progressbar: true

xbmc-providers:
  movies: imdb
  shows: tvdb

##### Advanced settings below this line, don't edit unless you know what you're doing #####
#http_cache:
  # https://requests-cache.readthedocs.io/en/main/user_guide/expiration.html#url-patterns
  # https://requests-cache.readthedocs.io/en/main/user_guide/expiration.html#expiration-values
  #
  # The value is seconds to cache.
  # Or one of the following special values:
  # - DO_NOT_CACHE: Skip both reading from and writing to the cache
  # - EXPIRE_IMMEDIATELY: Consider the response already expired, but potentially usable
  # - NEVER_EXPIRE: Store responses indefinitely
  #
  # The value can be also suffixed with a time unit:
  # - 5m, 1h, 3d
  # See full documentation at:
  # - https://github.com/wroberts/pytimeparse#pytimeparse-time-expression-parser
  #
  # NOTE: If there is more than one match, the first match will be used in the order they are defined
#  policy:
#    "*.trakt.tv/users/me": 1d
#    "*.trakt.tv/users/likes/lists": DO_NOT_CACHE

# vim:ts=2:sw=2:et

Version

0.28.15

Python Version

3.12.1

Plex Server Version

1.40.0.7775-456fbaf97

Operating System and Version

macOS Sonoma 14.1

there's no such version as 27.10.

as a workaround try to find the last version that still works and first version where it's broken.

you can enable debug log and see what requests it makes to trakt api regarding those lists from log file

and as a workaround you can disable liked lists syncing

  trakt_to_plex:
    liked_lists: true

post those lists urls as text.

to me seems those lists are somewhy empty, so it tries to load them again.

Fix trying to load them endlessly:

but that doesn't solve the original problem, why are the lists empty

post those lists urls as text.

to me seems those lists are somewhy empty, so it tries to load them again.

Here's one https://trakt.tv/lists/2143363
They're not empty, none of the liked lists are, so not sure why it would be pulling like they are

there's no such version as 27.10.

as a workaround try to find the last version that still works and first version where it's broken.

Weird, because my terminal showed it as 0.27.10 before I upgraded, and then it let me reinstall it via the terminal as 0.27.10, but just still gave the same issue. I will mess around with that, but I'm guessing reinstalling every single possible release and retrying is going to take me a few hours, so I'll get back to you if something works.

and as a workaround you can disable liked lists syncing

  trakt_to_plex:
    liked_lists: true

Unfortunately, liked lists syncing in particular was the reason I was using it, lol

you can enable debug log and see what requests it makes to trakt api regarding those lists from log file

I'm sure this sounds silly, but I changed the setting like the readme said to do and then ran it again... but where does the debug log go?

I'm finding it works on 0.28.5... mostly. It's now syncing most of the lists and watched status instead of just stalling out, but it's not syncing the lists it was repeatedly showing when stalling.

It says there's 0 items in those lists, but there are items on each list that are present in my library. It does sync the watched status of those items between trakt and Plex and syncs them onto the other lists they're present on, so the issue seems to be probably with those specific lists instead of with the matching of those items. I tried unliking those lists previously with 0.28.15, but it just did the same thing with other lists that are now syncing. The URLs that persistently won't sync are
https://trakt.tv/lists/2143363
https://trakt.tv/lists/2748259
https://trakt.tv/lists/23982854
https://trakt.tv/lists/4834057

However, it goes back to the previously observed behavior of stalling on those lists and doing nothing else when updating to 0.28.6.

Trying to figure out what those lists have in common now that it's consistently the same lists, and they're the only lists in my liked lists that have only TV shows. Everything else is either a mix of TV and movies, or movies only. I don't know if that could be having an effect?

need to see your debug log and use trakt-api.sh wrapper (from repo) to download their content, or if they are cached cache subcommand also displays.

and if your run says list contains 0 items, share the run output too! and if you upgraded, or used my merge request fix, mention that too!

closing. user has disapeared