Skip to content
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

Merged
merged 5 commits into from
May 1, 2022
Merged

Absolute Episode Ordering #132

merged 5 commits into from
May 1, 2022

Conversation

Jaynator495
Copy link
Contributor

Patch to allow for absolute episode ordering between seasons, see #131

Patch to allow for absolute episode ordering between seasons, see RickDB#131
Copy link
Collaborator

@reconman reconman left a 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
@Jaynator495
Copy link
Contributor Author

Jaynator495 commented Apr 29, 2022

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.
@Jaynator495 Jaynator495 requested a review from reconman April 29, 2022 22:45
anilist.py Outdated Show resolved Hide resolved
@reconman
Copy link
Collaborator

reconman commented May 1, 2022

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 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.

Jaynator495 and others added 2 commits May 1, 2022 10:38
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
@Jaynator495 Jaynator495 requested a review from reconman May 1, 2022 18:11
@reconman reconman merged commit 603fab0 into RickDB:master May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants