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

Sync command doesn't respect timezone anymore

foux 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

Since last version, sync command doesn't respect timezone setting anymore.
WHen using the sync command, timestamp sent to trakt is the UTC time instead of local time

Error trace / logs

No response

Expected behavior

Time and date on Trakt should be on the same timezone than locak docker

Steps to reproduce the behavior

  1. Create a docker container with a TZ env different than UTC
  2. Watch a content
  3. Use sync command on the docker container
  4. Watch time on trakt will be wrong, and will be UTC time instead of local time

Inspect of problematic items

No response

Workarounds

No response

Install method

docker-compose

Config file contents

# Config File: /app/config/config.yml                                                                                                                                                                                                                                                                                                                              [5/34939]
cache:
  path: /app/config/trakt_cache
excluded-libraries:
- Tests audios
- Enregistement séries
- Enregistrements Film
config:
  dotenv_override: true
plex:
  timeout: 30
logging:
  append: true
  console_time: true
  debug: false
  filename: plextraktsync.log
  filter_loggers: null
  filter: null
sync:
  plex_to_trakt:
    collection: false
    clear_collected: false
    ratings: true
    watched_status: true
    watchlist: false
  trakt_to_plex:
    liked_lists: false
    ratings: true
    watched_status: true
    watchlist: false
    watchlist_as_playlist: false
  rating_priority: plex
watch:
  add_collection: false
  remove_collection: false
  scrobble_threshold: 80
  username_filter: true
  media_progressbar: false
xbmc-providers:
  movies: imdb
  shows: tvdb

Version

0.27.7

Python Version

3.11.5 (docker container)

Operating System and Version

Docker on unraid

Sync command doesn't respect timezone anymore on Docker

anymore ? Any change from your setup ?

Expected behavior is wrong.
Time and date on trakt are supposed to be on the same timezone than Plex host. 😉

Step 1 : show us the command line.
Step 2 : you don't say where you watch a content. On Plex ?

Well it's supposed to be the timezone environment of the docker container. But either way, they are both the same on my end.

Yes, I did watch the content on plex, but synced (downloaded) on a device, so the Watch command doesn't see it.

For the command line, here is the relevant part of my docker compose :

plextraktsync_foux:
    image: ghcr.io/taxel/plextraktsync
    restart: on-failure:10
    environment:
      - TZ=Europe/Paris
      - PUID=1000
      - PGID=200
    volumes:
      - ./plextraktsync/foux:/app/config
    command: watch
    depends_on:
      plex:
        condition: service_healthy

ANd the command I run when I watched something downloaded onto my iPad (watch obviously doens't send synced content) :
docker-compose exec -e "TZ=Europe/Paris" plextraktsync_foux plextraktsync sync

Thanks

Well it's supposed to be the timezone environment of the docker container.

Define "it" please.
Also define "the docker container". Is it Plex ? Is it Plextraktsync ?
If Plex is in a container, show the command line.
Edit your previous posts to be more accurate please.

Does this timezone issue appear only when your watch on Plex on iPad ?
Did you try to watch content on a desktop Plex WebApp ?

Since last version, sync command doesn't respect timezone setting anymore.

Can you confirm you tried to downgrade to previous version and timezone is correct with Plextraktsync 0.27.6 ?

Well it's supposed to be the timezone environment of the docker container.

Define "it" please.

The time sent to Trakt

Also define "the docker container". Is it Plex ? Is it Plextraktsync ? If Plex is in a container, show the command line. Edit your previous posts to be more accurate please.
Both containers have the same TZ environment

Does this timezone issue appear only when your watch on Plex on iPad ? Did you try to watch content on a desktop Plex WebApp ?

No, the issue isn't appearing with the watch command, so when watching directly from Plex, if the watch command is running, there isn't the issue. But if you're not running the watch command, the sync command will have the same issue, regardless of how you watch the content.

Since last version, sync command doesn't respect timezone setting anymore.

Can you confirm you tried to downgrade to previous version and timezone is correct with Plextraktsync 0.27.6 ?

Sorry, my "last version" wasn't accurate. The issue isn't present in v0.26.11, it started in v0.27.0 (I checked all of the v0.27 series to be sure it was present in each)

I think the problem comes from plexapi 4.15.1 with pkkid/python-plexapi#1203

Well spoted !

Fix in plexapi 4.15.4 (pkkid/python-plexapi#1262)

and in Plextraktsync 0.27.8