[BUG] Force Trakt Sync not fully completing (?) - Apple TV
Closed this issue · 5 comments
Bug
Hi
Force Trakt Sync runs and gives a completed message but is leaving (most of) the shows as unwatched, the episodes look ok
Looks to be an Apple TV issue as I can't replicate elsewhere
Expected Result
Force Trakt Sync to run successfully
Steps To Reproduce
Force Trakt Sync
Refresh/Reboot Kodi
Progress Shows widget now showing majority of shows as unwatched although individual episodes are ok
Kodi Version, Type of Device, Logs, Screenshots, and Additional Info
20.1
Apple TV
See logs, can't start new thread
error, possibly similar to #347 (comment)
https://paste.kodi.tv/aduvoyanuf
Checklist
- I have included logs and the version of Kodi I am using..
- I have made a separate issue for each bug that I am reporting.
- I have verified this is not a setting.
Seems to be an issue with your setup. Unable to duplicate.
Thanks for taking a look, will investigate further when I get some time
Seems like an issue with threading in the Python version that's being used with kodi on appletv.
Put this bit of code in to investigate:
log_utils.log('Num threads to process: %s' % str(len(threads)), level=log_utils.LOGDEBUG)
#[i.start() for i in threads]
for i in threads:
waiting_for_threaded_resources = True
while waiting_for_threaded_resources:
try:
i.start()
waiting_for_threaded_resources = False
except threading.ThreadError:
log_utils.log('Exception: Num threads active: %s' % str(threading.activeCount()), level=log_utils.LOGDEBUG)
control.sleep(3000)
Force Trakt Sync:
[2024-06-28 09:25:10] [ plugin.video.umbrella: DEBUG ]: Num threads to process: 321
[2024-06-28 09:25:31] [ plugin.video.umbrella: DEBUG ]: Exception: Num threads active: 81
[2024-06-28 09:25:53] [ plugin.video.umbrella: DEBUG ]: Exception: Num threads active: 83
Scrape with all Providers:
[2024-06-28 09:07:06] [ plugin.video.umbrella: DEBUG ]: Num threads to process: 61
[2024-06-28 09:07:07] [ plugin.video.umbrella: DEBUG ]: Exception: Num threads active: 99
Seems to fail when > 80 active threads
Will look into capping number of threads.