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

Filter out archived episodes #747

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Filter out archived episodes #747

merged 1 commit into from
Aug 8, 2023

Conversation

svevang
Copy link
Member

@svevang svevang commented Aug 7, 2023

It's not possible to update some attributes of the episode when it's in an archived state. So filter out archived episodes before entering into the publishing flow.

@@ -388,6 +388,10 @@ def drafting?
apple_json&.dig("attributes", "publishingState") == "DRAFTING"
end

def archived?
apple_json&.dig("attributes", "publishingState") == "ARCHIVED"
Copy link
Member

Choose a reason for hiding this comment

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

What does "archived" mean? Is that some action someone took manually in apple connect? Or an episode that fell out of the public RSS? Or something else?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a status within Apple's Podcasts Connect system. An episode can have DRAFT PUBLISHED or ARCHIVED status within that system. In this case, we can manipulate the delivery models (container, delivery, delivery files) but Apple will throw a 409 (or similar) when you try to update the Episode model.

If someone in Podcasts Connect marks an episode as having status of ARCHIVED then it is impossible to modify the episode in the course of setting up the new audio asset. That makes it impossible for the Apple::Publish finalize the link between the container and episode.

It's possible we could engineer a system that works around episode, e.g. prepping as much of the podcasts container/delivery etc as possible. That would bring the archived episode under the wing of the publishing here.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, okay. So this was some sort of manual user action, not something Apple inferred/interpreted from the RSS feed. Yeah, this makes sense to me then.

Copy link
Member

@cavis cavis left a comment

Choose a reason for hiding this comment

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

👍

@svevang svevang merged commit 0623f49 into main Aug 8, 2023
1 check passed
@farski farski deleted the filter-archived-episodes branch June 7, 2024 14:19
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