-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trakt collection for TV shows got almost entirely cleared, not getting readded #622
Comments
The same thing has happened to me. I've checked the plugin logs and it is full of the following message: "Invalid value provided for DateTimeField: 0123456789 (expected datetime instance)" - the number is a varaible, so it is different on each line. I'm speculating, but maybe the new PMS version that I installed this week (1.26.0.5715 ) has changed the database slightly? |
The same thing has happened to me but for both movies and tv shows |
Same issue here, just after upgrading to 1.26.0.5715. Did anyone try to rollback to previous version (1.25.9.5721) ? |
Plex changed field type on metadata_items, from datetime to timestamp. the correct way to fix it would probably require update of pewee and some big changes. quick and dirty workaround, just convert it again.. on Trakttv.bundle/Contents/Libraries/Shared/plex_database/library.py (above the errored line).
|
Noticed the same issue. Both TvShows and Movies were missing from my trakt collection. jahmad's workaround did not work for me. |
I also rolled back to 1.25.9.5721 and everything went back to normal after a full sync. |
The patch worked for me - all synced again. |
Patch worked for me too - thank you |
I think I did it the patch by @jahmad right but I'm still getting this error: Here is the section of the library.py:
|
Did you restart the plugin after you made the change?
…On Mon, 25 Apr 2022 at 19:34, Jamie Bode ***@***.***> wrote:
I think I did it the patch by @jahmad <https://github.com/jahmad> right
but I'm still getting this error:
2022-04-25 19:29:08,980 - plex_database.library (14640be48b38) : DEBUG
(plex_database.library:187) - Invalid value provided for DateTimeField:
1650456824 (expected datetime instance)
Here is the section of the library.py:
if type(field) is DateTimeField:
if not value:
return None
if isinstance(value, int):
value = datetime.fromtimestamp(value)
return value
if not isinstance(value, datetime):
log.debug('Invalid value provided for DateTimeField: %r (expected datetime instance)', value)
return None
—
Reply to this email directly, view it on GitHub
<#622 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKV55ZCECATDAKANFQGORTVG3QSLANCNFSM5SQTKM7Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, just restarted the docker container so it all reloaded. |
I rebooted and it seems to be working, is this error going to be normal now?
|
I get that error too, but I haven’t seen any negative impact yet.
…On Mon, 25 Apr 2022 at 20:19, Jamie Bode ***@***.***> wrote:
I rebooted and it seems to be working, is this error going to be normal
now?
TypeError: can't compare offset-naive and offset-aware datetimes
2022-04-25 20:12:54,820 - plugin.sync.modes.core.base.mode (14fce77eeb38) : WARNING (plugin.sync.modes.core.base.mode:190) - Exception raised in handlers[1].run(8, ...): can't compare offset-naive and offset-aware datetimes
Traceback (most recent call last):
File "/config/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/sync/modes/core/base/mode.py", line 188, in execute_handlers
self.handlers[d].run(m, mode, *args, **kwargs)
File "/config/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/sync/handlers/core/base/mode.py", line 42, in run
module.run(media, mode, *args, **kwargs)
File "/config/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/sync/handlers/core/base/data.py", line 45, in run
module.run(mode, *args, **kwargs)
File "/config/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/sync/handlers/core/base/media.py", line 95, in run
return self.push(*args, **kwargs)
File "/config/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/sync/handlers/core/base/push.py", line 37, in push
action = self.get_action(p_value, t_value)
File "/config/Plex Media Server/Plug-ins/Trakttv.bundle/Contents/Libraries/Shared/plugin/sync/handlers/core/base/push.py", line 23, in get_action
if p_value != t_value:
—
Reply to this email directly, view it on GitHub
<#622 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKV554HWT6ATZVNZTLF4Y3VG3V4PANCNFSM5SQTKM7Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@MarioMan632 @STJBaxter an unfortunate useless line got pasted, sorry.. remove the "return value" line, so it could keep processed by the tz lines below. |
@jahmad I'll try it later to see if that helps but at the moment it works just with the errors stated before. |
Forgive me, but where exactly do I put this in library.py? I just looked through that file and couldn't find any references. Also in my case I don't see any errors jumping out at me, but it seems for the last month or so Plex has been syncing plays to Trakt, but not collections/items collected. |
Hey! You can open a text editor and go at line 183. Around there you can identify the 2 "if" statements "if not value" and "if not isinstance" and add the extra if statement between them. Don't forget to restart the service/container for the change to take effect. |
StroescuTheo -- Thanks, that was the bit I was missing in what to do. Lines added, and it appears to be syncing collections again. Strange though when I used Kitana to restart the plugin I got a bunch of errors/figured I had a syntax error but couldn't see anything. Restarted the entire plex process, used Kitana to do a full sync, and now all appears to be working. |
I had the same issue and @jahmad solution worked! |
the patch by jahmad should be modified as below to allow timestamps to be compared. This is important for the differential push/pull (quick sync rather than scrobble) tasks, namely to pull stuff you watch on Trakt into Plex. if isinstance(value, int):
value = datetime.fromtimestamp(value)
return TZ_LOCAL.localize(value).astimezone(pytz.utc) I am thinking to maybe figure out a way to host these patches in a separate fork so people can easily pull the latest code. But I haven't done some patches mentioned in various issues here because my current build works fine. I am worried those patches might break other things that are currently functional, so never added them. EDIT: patched version here: https://github.com/rg9400/Plex-Trakt-Scrobbler |
Thanks for that. It would be really helpful to have an up to date and 100%
working fork.
…On 18 August 2022 04:22:53 rg9400 ***@***.***> wrote:
the patch by jahmad should be modified as below to allow timestamps to be
compared. This is important for the differential push/pull (quick sync
rather than scrobble) tasks, namely to pull stuff you watch on Trakt into Plex.
if isinstance(value, int):
value = datetime.fromtimestamp(value)
return TZ_LOCAL.localize(value).astimezone(pytz.utc)
I am thinking to maybe figure out a way to host these patches in a separate
fork so people can easily pull the latest code. But I haven't done some
patches mentioned in various issues here because my current build works
fine. I am worried those patches might break other things that are
currently functional, so never added them.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
Thank you! Confirm this 3 edited files fix the Collection issue. |
Hello, i have the same problem since the plex server update it doesn't sync anymore with trakt.tv at all. Tried the updated version but without success. Any help would be really appreciated it. |
Recently my library in Trakt got almost entirely cleared. I am using the clean collection setting, but nothing on my PMS was deleted so I have no idea why id did remove almost all my shows from Trakt now randomly. They are also not added back even after estarting everything, so now my Trakt library is just not syncing at all anymore. Movies seem unaffected.
The text was updated successfully, but these errors were encountered: