This commit is contained in:
ChunkyProgrammer 2024-11-21 09:00:40 +00:00 committed by GitHub
commit 89ffc1e56e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 36 additions and 4 deletions

View File

@ -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: []
}

View File

@ -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: []
}

View File

@ -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: []
}