-
Notifications
You must be signed in to change notification settings - Fork 46
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
Absolute Episode Ordering #132
Conversation
Patch to allow for absolute episode ordering between seasons, see RickDB#131
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work if you use OnePace episodes or if you miss some seasons.
I think we need to extend the custom mappings file for this.
For example, an option to set absolute: true
for a series so PlexAniSync only looks at the highest watched episode number and uses that for updating.
Also the python linter doesn't like some parts about your code, see the build logs unter the "Checks" tab.
Been a while since I worked with python so I didn't have my environment set up
I'm not sure I'm a fan of using the mapping file for this, as if someone just copy+pastes from the community mappings or uses the remote, but doesn't use absolute episode ordering (IE, TVDB's one piece order) it would be incorrectly handled. I didn't think about seasons missing though, you're right about that, so what I propose is instead of checking if it's 1 episode difference between the last season and the next season, instead I should change it to be 1 episode or more of difference between seasons when mapped to the same season, that should work for both cases I believe. I'll make a commit for what I mean. Also sorry for the styling problem - been a while since I worked with python so my environment wasn't properly setup. |
Should account for gaps between episode counts or for shortened/missing seasons.
I was worried about your logic being applied when it's not intended, but I think your code combined with my suggestion should be pretty safe. |
I knew it could be written better, but in the moment I had the biggest brainfart and could not think of it. Thanks for fixing that Co-authored-by: reconman <[email protected]>
Should have been an and here, otherwise everything above index 0 would evaluate to true
Patch to allow for absolute episode ordering between seasons, see #131