Use trakt.show_id for episodes#1120
Conversation
9f62806 to
0a00424
Compare
0a00424 to
05bcff4
Compare
|
There are more places where |
05bcff4 to
6efcba2
Compare
|
dependency of moogar0880/PyTrakt#208 has been solved in 68ced57 |
5cf224a to
655b5d4
Compare
|
And the show getter/setter added to Media class via #1119 is then also not needed. and once that is removed the media.mf becomes also unused |
|
Since lazyepisodes is gone, you probably need to add show_id to the block added in: |
|
perhaps something like diff --git a/trakt/tv.py b/trakt/tv.py
index e41bf4f..90c7c60 100644
--- a/trakt/tv.py
+++ b/trakt/tv.py
@@ -439,7 +439,7 @@ class TVShow(object):
# Prepare episodes
episodes = []
for ep in season.pop('episodes', []):
- episode = TVEpisode(show=self.title, **ep)
+ episode = TVEpisode(show=self.title, show_id=self.trakt, **ep)
episodes.append(episode)
season['episodes'] = episodes
|
| else: | ||
| # Retry using search for specific Plex Episode | ||
| logger.warning(f"Retry using search for specific Plex Episode {guid.guid}") | ||
| logger.debug(f"Retry using search for specific Plex Episode {guid.guid}") |
There was a problem hiding this comment.
remove this. if you want to mute the warning, use log filtering:
There was a problem hiding this comment.
Why does it warn the user about this retry ? What is he supposed to do with this info ?
There was a problem hiding this comment.
I don't recall anymore why it happened, because data in trakt.tv wrong? or wrong agent?
There was a problem hiding this comment.
I'm not asking why it happen. I'm asking why should we warn user about it.
It happen when show order is different between trakt and plex. But the script handles it perfectly now, so the warning has become useless IMHO.
There was a problem hiding this comment.
but i am asking why it happens. i recall it was just temporary workaround until real problem is solved.
this fallback is slow (when doing sync) and should be dropped eventually.
There was a problem hiding this comment.
and i think it's also unsafe, this code path gets hit when no match is found, but if trakt/plex have different ordering and match is found you would be recording "watched" state to wrong episode.
i don't remember all details anymore.
There was a problem hiding this comment.
if trakt/plex have different ordering and match is found you would be recording "watched" state to wrong episode
No, as I said, the script handles different ordering perfectly now, it cannot match a wrong episode anymore. So this warning is useless on user side, that's why i moved it to debug level.
There was a problem hiding this comment.
this fallback is slow (when doing sync) and should be dropped eventually.
It is needed sometimes. Eg. when a show is split in many shows in trakt.
|
the |
Can you show me where |
655b5d4 to
32c5077
Compare
I'm not going to answer this 3rd time. remove it and see yourself what breaks! |
ccfe73b to
9f2a4c6
Compare
|
Does this also improve performance? memory usage? overall runtime? api calls? |
requires :
[python-pytrakt] Add show_id attribute to TVEpisode found from search moogar0880/PyTrakt#208Uses the newly added
show_idattribute of trakt TVEpisode instead of TVShow id found from Plex show guid.Usefull when a Plex show is split in many Trakt shows.
closes #1111