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

Support multiple duplicate anilist ids in custom mappings #167

Closed
wants to merge 9 commits into from
Closed

Support multiple duplicate anilist ids in custom mappings #167

wants to merge 9 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 21, 2022

Issue: 144

This allows the usage of multiple anilist-ids duplicates with multiple seasons. By allowing this, long series such as fairy tail can have a set of plex seasons match one anilist item and another set match another anilist item.

This configuration is now supported:

seasons:
      - season: 1
        anilist-id: 6702
      - season: 2
        anilist-id: 6702
      - season: 3
        anilist-id: 20626
      - season: 4
        anilist-id: 20626

Testing data:
imagem

Results in Anilist:
imagem

Issue: 144
This allows the usage of multiple anilist-ids duplicates with multiple
seasons. By allowing this, long series such as fairy tail can have a set
of plex seasons match one anilist item and another set match another
anilist item.

Configuration as such is now supported:
seasons:
      - season: 1
        anilist-id: 6702
      - season: 2
        anilist-id: 6702
      - season: 3
        anilist-id: 20626
      - season: 50
        anilist-id: 20626
@ghost ghost changed the title multiple duplicate anilist ids in custom mappings Support multiple duplicate anilist ids in custom mappings Dec 21, 2022
@ghost
Copy link
Author

ghost commented Dec 25, 2022

@reconman Not sure how the process is to get PRs approved to this repository.

Do you know if Rick does anything in this Repo. I'd like to at least updated the docker image since it's been stale for a while now. I'm guessing we would need help from @RickDB

@reconman
Copy link
Collaborator

I wanted to test it before merging but didn't have time yet because of Christmas.

@ghost
Copy link
Author

ghost commented Dec 25, 2022

All good.
Sorry for intruding on your Christmas.

Btw I think the duplicate variable might not be entirely necessary since I ended up adding the seasons with certain id to the same object, so could check the length of that list instead of the duplicate parameter

anilist.py Outdated Show resolved Hide resolved
anilist.py Show resolved Hide resolved
anilist.py Outdated Show resolved Hide resolved
anilist.py Outdated Show resolved Hide resolved
@ghost ghost requested a review from reconman December 26, 2022 00:31
@ghost
Copy link
Author

ghost commented Dec 26, 2022

Added support for start now and removed the first elif because it actually wasn't doing what we wanted.

If we had a season with 25 episodes and then one season with 50 mapped to the same id. If the second season had more than 25 episodes watched, then anilist would get only those 25+ and never add them together to have 50+ episodes updated for that season.

@nm-remarkable
Copy link

This is my account now. Makes it easier to only have one account

anilist.py Outdated Show resolved Hide resolved
anilist.py Outdated Show resolved Hide resolved
anilist.py Show resolved Hide resolved
@nm-remarkable
Copy link

I ask you once again, when you have the time to review these changes 🙏

anilist.py Outdated Show resolved Hide resolved
anilist.py Outdated Show resolved Hide resolved
@reconman
Copy link
Collaborator

Closing because I can't edit your PR branch, continuing in #174

@reconman reconman closed this Jan 30, 2023
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