mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
fix playing from album bug when there's inconsistent discs
~ eg. when there's no disc 1, but there's disc 2, or 3
This commit is contained in:
committed by
Mungai Njoroge
parent
7f0fe88c43
commit
c52390117e
@@ -1,24 +0,0 @@
|
||||
<template>
|
||||
<div class="bottom-content">
|
||||
<FeaturedArtists :artists="artists" />
|
||||
|
||||
<AlbumBio
|
||||
:bio="bio"
|
||||
:images="{ album: image, artist: artists[0]?.image }"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Artist } from "@/interfaces";
|
||||
import FeaturedArtists from "@/components/PlaylistView/FeaturedArtists.vue";
|
||||
import AlbumBio from "@/components/AlbumView/AlbumBio.vue";
|
||||
|
||||
defineProps<{
|
||||
artists: Artist[];
|
||||
bio: string | null;
|
||||
image: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<style lang="scss"></style>
|
||||
@@ -11,9 +11,7 @@
|
||||
<component
|
||||
:is="item.component"
|
||||
v-bind="item.props"
|
||||
@playThis="
|
||||
playFromAlbum(item.props.track.index - item.props.track.disc)
|
||||
"
|
||||
@playThis="playFromAlbum(item.props.track.master_index)"
|
||||
/>
|
||||
</div>
|
||||
</RecycleScroller>
|
||||
@@ -122,7 +120,7 @@ const scrollerItems = computed(() => {
|
||||
|
||||
function playFromAlbum(index: number) {
|
||||
const { title, albumartists, albumhash } = album.info;
|
||||
queue.playFromAlbum(title, albumhash, album.allTracks);
|
||||
queue.playFromAlbum(title, albumhash, album.srcTracks);
|
||||
queue.play(index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user