mirror of https://github.com/VueTubeApp/VueTube
channel link full url bugfix
This commit is contained in:
parent
c4bd494677
commit
9fa841b6e7
|
@ -20,9 +20,11 @@ export const actions = {
|
|||
fetchChannel({ state }, channelUrl) {
|
||||
Object.assign(state, getDefaultState());
|
||||
state.loading = true;
|
||||
const channelRequest = channelUrl.includes("/c/")
|
||||
? `https://youtube.com/${channelUrl}`
|
||||
: `https://youtube.com/channel/${channelUrl}`;
|
||||
console.log(channelUrl);
|
||||
const channelRequest =
|
||||
channelUrl.includes("/c/") || channelUrl.includes("/channel/")
|
||||
? `https://youtube.com/${channelUrl}`
|
||||
: `https://youtube.com/channel/${channelUrl}`;
|
||||
this.$youtube
|
||||
.getChannel(channelRequest)
|
||||
.then((channel) => {
|
||||
|
@ -51,12 +53,8 @@ export const actions = {
|
|||
?.items[0].gridChannelRenderer;
|
||||
}
|
||||
);
|
||||
console.log("CHANNEL INDEX");
|
||||
console.log(featuredSection);
|
||||
state.featuredChannels =
|
||||
featuredSection.shelfRenderer.content.horizontalListRenderer.items;
|
||||
console.log("ITEMS ITEMS");
|
||||
console.log(state.featuredChannels);
|
||||
})
|
||||
.catch((err) => {
|
||||
state.loading = false;
|
||||
|
|
Loading…
Reference in New Issue