Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: adding tvmaze for accurate release time detection #923
base: main
Are you sure you want to change the base?
feat: adding tvmaze for accurate release time detection #923
Changes from 12 commits
fa5173e
3c5fc47
896e316
f42dfdc
fbce61e
46f4e45
049ecdc
1ad3dc9
1cb35ca
ad058d8
a2b3290
d1e2a84
a1ef64c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
🛠️ Refactor suggestion
Reconsider early return in
store_state
to allow necessary state updatesThe early return in
store_state
whenself.last_state == States.Completed
prevents any further state updates. This might be problematic if you need to update the state after completion, such as in cases of reprocessing or error corrections.Consider adjusting the logic to allow state updates when appropriate.
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.
Properly handle naive
aired_at
datetime objects to ensure accurate timezone conversionsDirectly setting the timezone on a naive
datetime
object usingreplace(tzinfo=...)
assumes that the original datetime is in the local timezone, which may not be accurate. This can lead to incorrect release status determination.Apply this diff to correctly localize
aired_at
assuming it is in UTC:Alternatively, if
aired_at
is intended to be in the local timezone, consider using a method that properly localizes naive datetime objects without assuming they are in UTC.📝 Committable suggestion
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.
remove this, its not needed as item.log_string already does it for us