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

Refactor: Add IdsMixin to replace extract_ids() utility method #14

Merged
merged 15 commits into from
Dec 11, 2022

Conversation

glensc
Copy link
Owner

@glensc glensc commented Dec 11, 2022

Carry moogar0880#186


Extracting the "ids" on each response is tedious, and such duplication results users being confused:

Also, the existing extraction is inconsistent (Not applied for TVShow and Movie in this example):

This will make the ids extraction automatic, and prevent updating the attributes directly.

Additionally it came out that properties like tmdb_id, imdb_id, trakt_id are unused. they are initialized as None in the constructor but never any other value. these are commented with @deprecated and are to be removed in 4.x.

  • Person
  • Movie
  • Calendar
  • SearchResult
  • TVShow
  • TVEpisode
  • TVSeason
  • UserList

TODO:

@glensc glensc changed the title Move extract_ids(media_item) to be able to make atomic commits Refactor: Add IdsMixin to replace extract_ids() utility method Dec 11, 2022
@glensc
Copy link
Owner Author

glensc commented Dec 11, 2022

LGTM. Tested:

@glensc glensc merged commit e6df575 into main Dec 11, 2022
@glensc glensc deleted the merge-remove_extract_ids branch December 11, 2022 15:20
glensc added a commit that referenced this pull request Dec 11, 2022
This reverts commit 1165cd0 from #13

They are needed after introducing IdsMixin from #14
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.

1 participant