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

IV RSS Subscriptions: properly detect error channels #4407

Draft
wants to merge 19 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ea05792
detect error channels properly
ChunkyProgrammer Nov 30, 2023
bcebc5f
use get instead of head request
ChunkyProgrammer Nov 30, 2023
07d8ae0
remove 500 status check
ChunkyProgrammer Dec 1, 2023
a754fc2
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Dec 4, 2023
aff13ba
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Jan 2, 2024
38af621
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Jan 31, 2024
e1aa567
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Mar 8, 2024
cc33e38
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Mar 25, 2024
f3d8c12
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Apr 12, 2024
07b338b
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Apr 16, 2024
63c6fc3
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer May 18, 2024
e576183
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer May 30, 2024
fb78716
merge latest changes into branch
ChunkyProgrammer Jul 9, 2024
6f1706d
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Jul 29, 2024
6577391
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Aug 12, 2024
c70faf9
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Sep 9, 2024
6130d01
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Oct 1, 2024
2d96d50
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Oct 8, 2024
3642b08
Merge branch 'development' into iv-rss-detect-error-channels-properly
ChunkyProgrammer Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/renderer/components/subscriptions-live/subscriptions-live.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,18 @@ export default defineComponent({
try {
const response = await invidiousFetch(feedUrl)

if (response.status === 500 || response.status === 404) {
if (response.status === 404) {
// playlists don't exist if the channel was terminated but also if it doesn't have the tab,
// so we need to check the channel feed too before deciding it errored, as that only 404s if the channel was terminated

const response2 = await fetch(`${this.currentInvidiousInstance}/feed/channel/${channel.id}`, {
method: 'GET'
})

if (response2.status === 404) {
this.errorChannels.push(channel)
}

return {
videos: []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,18 @@ export default defineComponent({
try {
const response = await invidiousFetch(feedUrl)

if (response.status === 500 || response.status === 404) {
if (response.status === 404) {
// playlists don't exist if the channel was terminated but also if it doesn't have the tab,
// so we need to check the channel feed too before deciding it errored, as that only 404s if the channel was terminated

const response2 = await fetch(`${this.currentInvidiousInstance}/feed/channel/${channel.id}`, {
method: 'GET'
})

if (response2.status === 404) {
this.errorChannels.push(channel)
}

return {
videos: []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,18 @@ export default defineComponent({
try {
const response = await invidiousFetch(feedUrl)

if (response.status === 500 || response.status === 404) {
this.errorChannels.push(channel)
if (response.status === 404) {
// playlists don't exist if the channel was terminated but also if it doesn't have the tab,
// so we need to check the channel feed too before deciding it errored, as that only 404s if the channel was terminated

const response2 = await fetch(`${this.currentInvidiousInstance}/feed/channel/${channel.id}`, {
method: 'GET'
})

if (response2.status === 404) {
this.errorChannels.push(channel)
}

return {
videos: []
}
Expand Down