-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Sync very slow with errors caused by dates older than the epoch year (1970) #725
Comments
Ok, I have found a fix that works well for now. Here's a minimum example to show the difference from before and after; Old and Busted
New Hotness
I updated utils.py with the relevant bits and copied it over to my Xbox and I was able to resume the sync successfully without errors. Now the only thing I have to remember is that the dates and times for media should always be stored in UTC, so they will be displayed correctly in the local time zone. I don't know how to turn this into a pull request yet, but I guess that's the next thing I'll figure out |
Logged in to let you know that I too believe I have this issue. Have an Xbox Kodi install that is stalling on sync when it hit Bewitched (obviously made before 1970). Would you be able to share the modified plugin so that I can test as well? |
For sure, I think I figured out how to add a pull request, so you can get the file from here: To install it for testing, I put the modified utils.py onto a USB stick and plugged it into the Xbox to copy it over the existing one in Kodi. |
That did it. I was sitting at overnight with a sync (and not finishing). Replaced the util.py file in the helpers folder, cleared my DB and tried again. Finished with a 15 minute sync. Wife is again happy. Thank you so much! |
With #775 #776 #780 and now finally #785, I'm not able to reproduce this issue in tests (py3 only), even tho the underlying timezone function is unchanged. The current test cases are as follows, and should cover most edge cases, including dates pre epoch: jellyfin-kodi/tests/test_helper_utils.py Lines 39 to 75 in e95e8d6
If you are still seeing this issue with the master branch, I would like more logs from both of you, at a minimum the following sections:
|
I have (I think) the same issue on xbox series x. Using new clean kodi install with no addons except jellyfin for kodi. Not sure if this link is relevant (its cpython) it seemed similar and affected windows only not linux python/cpython#94414 My kodi log right after a (long) sync with jellyfin:
The relevant error as far as I can see is the same as in previous posts
Full log is here up until the point kodi crashed at 80% sync https://paste.kodi.tv/eqoyevivuz I've applied the work around PatientLightening suggested above and it seems fix the scanning error. |
@staplebatteryhorse I pushed the release containing the mentioned fixes just as you where typing out this comment it seems, could you try again with the latest release (sorry, the release pipeline is just inconvenient enough that I end up putting it off 😅 ) PS: You seem to have swapped the username and password fields 😉 |
@oddstr13 thanks, I have just tried with master and 0.7.12 release, the same issue is still happening. log file here https://paste.kodi.tv/xogoreguco |
Thanks for the updated logs!
The dates in question; indicates trouble with negative (signed) unixtime values
|
This issue has now come back since the new update and the patched utils file only works on the previous build, had to revert again until fixed, please help. @PatientLightning if you have any idea how to make a new patch for the latest build please let me in on the secret as i am clueless |
Oh no, what is the new version you're using and what system? Still Xbox? I haven't turned mine on in a while, but I'll take a look when I can |
Ok, I updated the helpter/utils.py file with the same approach as last time. My secret is to avoid using the function date.astimezone because it still returns an error on windows platforms for dates before 1970. (https://bugs.python.org/issue31327#msg304159) You can grab a copy from my fork to test out. The real fix is to solve the problem upstream with date.astimezone in the python repo someday, but I hope this helps in the meantime. |
@PatientLightning youre a hero! I will give it a test later tonight, yes still xbox, i have about 6 of them laying around just for kodi in different rooms, i did try to incorporate your additions and make a file myself before messeging you but ended up messing it up 5x so gave up, im obviously not built for writing code🤣 i hope they add your fix into the main releases soon as i get a whole house yelling at me to fix it everytime it updates🤦♂️ |
Describe the bug
When syncing a tv show season or episode older than 1970, the sync process throws errors and slows to a crawl
To Reproduce
Expected behavior
The sync shouldn't have errors for shows older than 1970
Logs
Here's a relevant snippet from the log
System (please complete the following information):
Additional context
I think this is caused by the issue referenced here:
https://bugs.python.org/issue31327#msg304159
Where the localtime function returns an error on a windows platform if the date is prior to the epoch
Possibly similar to this other issue: #153
It looks like the sync doesn't hang forever, but it takes about 45 seconds to recover from the error before moving on to sync the next episode which would take hours to process.
The text was updated successfully, but these errors were encountered: