mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-11 03:59:34 +01:00
Fix empty channels showing up as errored with RSS (#3824)
This commit is contained in:
parent
e0fceedefd
commit
b48d04700f
@ -216,6 +216,17 @@ export default defineComponent({
|
||||
const response = await fetch(feedUrl)
|
||||
|
||||
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(`https://www.youtube.com/feeds/videos.xml?channel_id=${channel.id}`, {
|
||||
method: 'HEAD'
|
||||
})
|
||||
|
||||
if (response2.status === 404) {
|
||||
this.errorChannels.push(channel)
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
|
@ -157,6 +157,17 @@ export default defineComponent({
|
||||
const response = await fetch(feedUrl)
|
||||
|
||||
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(`https://www.youtube.com/feeds/videos.xml?channel_id=${channel.id}`, {
|
||||
method: 'HEAD'
|
||||
})
|
||||
|
||||
if (response2.status === 404) {
|
||||
this.errorChannels.push(channel)
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
|
@ -14,10 +14,6 @@
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.channelBubble {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 350px) {
|
||||
.floatingTopButton {
|
||||
position: absolute
|
||||
|
@ -14,7 +14,6 @@
|
||||
:channel-name="channel.name"
|
||||
:channel-id="channel.id"
|
||||
:channel-thumbnail="channel.thumbnail"
|
||||
class="channelBubble"
|
||||
@click="goToChannel(channel.id)"
|
||||
/>
|
||||
</div>
|
||||
|
@ -216,7 +216,17 @@ export default defineComponent({
|
||||
const response = await fetch(feedUrl)
|
||||
|
||||
if (response.status === 404) {
|
||||
this.errorChannels.push(channel)
|
||||
// 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(`https://www.youtube.com/feeds/videos.xml?channel_id=${channel.id}`, {
|
||||
method: 'HEAD'
|
||||
})
|
||||
|
||||
if (response2.status === 404) {
|
||||
this.errorChannels.push(channel)
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user