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

Ameba: Fix Lint/UselessAssign #4795

Merged
merged 1 commit into from
Aug 11, 2024
Merged

Conversation

syeopite
Copy link
Member

No description provided.

@syeopite syeopite marked this pull request as ready for review July 17, 2024 19:40
@syeopite syeopite requested a review from a team as a code owner July 17, 2024 19:40
@syeopite syeopite requested review from unixfox and removed request for a team July 17, 2024 19:40
@@ -232,7 +232,7 @@ def fetch_channel(ucid, pull_all_videos : Bool)
id: video_id,
title: title,
published: published,
updated: Time.utc,
updated: updated,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too sure if this should be using the current time Time.utc or the parsed updated time

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's supposed to report the time when the channel content was fetched by the background job. That's especially useful for channels that don't post often, when the last update is for a very old video.

Copy link
Member Author

@syeopite syeopite Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case should there be a new attribute that reports when the video was updated on YouTube's side? Or should we just remove the logic that parses the updated time?

updated = Time.parse_rfc3339(
entry.xpath_node("default:updated", namespaces).not_nil!.content
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, my bad. All that time I though we were talking about InvidiousChannel.updated while you want to change ChannelVideo.updated.

My previous message applies to the former, and your fix in indeed welcome in the latter case :)

@SamantazFox SamantazFox merged commit 5e38ef5 into iv-org:master Aug 11, 2024
7 of 8 checks passed
@SamantazFox
Copy link
Member

Thank you!

@syeopite syeopite deleted the Lint/UselessAssign branch August 11, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants