This commit is contained in:
Shiny Nematoda 2022-06-15 16:49:37 +00:00
parent 1153f78546
commit 44ee558509
3 changed files with 74 additions and 34 deletions

View file

@ -82,8 +82,7 @@ watch(
Reset();
data.songs = {};
data.songs.items = i.items;
data.songs = i;
data.albumTitle = i.title;
},
);
@ -93,6 +92,8 @@ watch(
itms => {
Reset();
console.log(itms);
for (let i in itms) {
data[i] = {};
data[i].items = itms[i];
@ -133,11 +134,17 @@ watch(
<div class="grid">
<template v-for="song in data.songs.items">
<SongItem
:author="song.uploaderName || ''"
:author="song.uploaderName || song.subtitle"
:title="song.title || song.name"
:channel="song.uploaderUrl || ''"
:channel="song.uploaderUrl || song.subId"
:play="song.url || '/watch?v=' + song.id"
:art="'url(' + (song.thumbnail || song.thumbnails[1].url) + ')'"
:art="
'url(' +
(song.thumbnail ||
song.thumbnails[1]?.url ||
song.thumbnails[0]?.url) +
')'
"
@open-song="
$emit('play-urls', [
{

View file

@ -57,7 +57,7 @@ onMounted(() => {
<h4>{{ title }}</h4>
<a
:href="channel"
@click.prevent="$emit('get-artist', channel.split('/')[2])"
@click.prevent="$emit('get-artist', channel.replace('/channel', ''))"
class="ign">
<i class="ign">{{ author.replaceAll(' - Topic', '') }}</i>
</a>