diff --git a/src/renderer/components/subscriptions-live/subscriptions-live.js b/src/renderer/components/subscriptions-live/subscriptions-live.js index bc5f105fe..a4c221957 100644 --- a/src/renderer/components/subscriptions-live/subscriptions-live.js +++ b/src/renderer/components/subscriptions-live/subscriptions-live.js @@ -305,10 +305,26 @@ export default defineComponent({ try { const response = await fetch(feedUrl) + // remove once IV returns 404 for non-existent playlists if (response.status === 500) { return [] } + 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: 'HEAD' + }) + + if (response2.status === 404) { + this.errorChannels.push(channel) + } + + return [] + } + return await parseYouTubeRSSFeed(await response.text(), channel.id) } catch (error) { console.error(error) diff --git a/src/renderer/components/subscriptions-shorts/subscriptions-shorts.js b/src/renderer/components/subscriptions-shorts/subscriptions-shorts.js index 793734a9a..f2e39c508 100644 --- a/src/renderer/components/subscriptions-shorts/subscriptions-shorts.js +++ b/src/renderer/components/subscriptions-shorts/subscriptions-shorts.js @@ -199,10 +199,26 @@ export default defineComponent({ try { const response = await fetch(feedUrl) + // remove once IV returns 404 for non-existent playlists if (response.status === 500) { return [] } + 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: 'HEAD' + }) + + if (response2.status === 404) { + this.errorChannels.push(channel) + } + + return [] + } + return await parseYouTubeRSSFeed(await response.text(), channel.id) } catch (error) { console.error(error) diff --git a/src/renderer/components/subscriptions-videos/subscriptions-videos.js b/src/renderer/components/subscriptions-videos/subscriptions-videos.js index a535a30dc..c3a938a20 100644 --- a/src/renderer/components/subscriptions-videos/subscriptions-videos.js +++ b/src/renderer/components/subscriptions-videos/subscriptions-videos.js @@ -302,8 +302,23 @@ export default defineComponent({ try { const response = await fetch(feedUrl) + // remove once IV returns 404 for non-existent playlists if (response.status === 500) { - this.errorChannels.push(channel) + return [] + } + + 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: 'HEAD' + }) + + if (response2.status === 404) { + this.errorChannels.push(channel) + } + return [] }