mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 05:08:00 +02:00
Play next (closes #109)
This commit is contained in:
parent
0a791244b5
commit
fdd376a071
6 changed files with 305 additions and 283 deletions
|
@ -40,9 +40,7 @@ const openSong = el => {
|
|||
thumbnails: [{ url: props.art }],
|
||||
});
|
||||
|
||||
const index = data.state.urls.map(s => s.url).indexOf(data.state.url);
|
||||
|
||||
console.log(data.state.urls);
|
||||
const index = data.state.urls.findIndex(s => s.url == data.state.url);
|
||||
|
||||
if (
|
||||
(index == data.state.urls.length - 1 && player.state.time > 98) ||
|
||||
|
@ -50,6 +48,15 @@ const openSong = el => {
|
|||
)
|
||||
emit('open-song', props.play);
|
||||
},
|
||||
appendSong = () => {
|
||||
const index = data.state.urls.findIndex(s => s.url == data.state.url);
|
||||
|
||||
data.state.urls.splice(index + 1, 0, {
|
||||
url: props.play,
|
||||
title: props.title,
|
||||
thumbnails: [{ url: props.art }],
|
||||
});
|
||||
},
|
||||
Remove = () => {
|
||||
const auth = useStore().getItem('auth'),
|
||||
isRemote = results.items?.songs?.title?.startsWith('Playlist - ');
|
||||
|
@ -131,7 +138,12 @@ onMounted(() => {
|
|||
v-if="playlistId"
|
||||
class="bi bi-dash-lg clickable ign"
|
||||
@click="Remove"></span>
|
||||
<span class="bi bi-broadcast ign" @click="$emit('nxt-song')"></span>
|
||||
<span
|
||||
class="bi bi-chevron-bar-right clickable ign"
|
||||
@click="appendSong"></span>
|
||||
<span
|
||||
class="bi bi-broadcast clickable ign"
|
||||
@click="$emit('nxt-song')"></span>
|
||||
<span class="bi bi-plus-lg clickable ign" @click="addSong"></span>
|
||||
<span class="bi bi-share clickable ign" @click="Share"></span>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue