mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 13:08:01 +02:00
Initial support for offline playback
This commit is contained in:
parent
1372d87beb
commit
4353cacead
9 changed files with 116 additions and 50 deletions
|
@ -34,6 +34,9 @@ const shuffleAdd = () => {
|
|||
url: i.url,
|
||||
title: i.title,
|
||||
thumbnails: [{ url: i.thumbnail }],
|
||||
thumbnail: i.thumbnail,
|
||||
offlineUri: i.offlineUri,
|
||||
duration: i.duration
|
||||
})),
|
||||
copy = [];
|
||||
|
||||
|
@ -56,9 +59,13 @@ const shuffleAdd = () => {
|
|||
url: i.url || '/watch?v=' + song.id,
|
||||
title: i.title,
|
||||
thumbnails: [{ url: i.thumbnail }],
|
||||
thumbnail: i.thumbnail,
|
||||
offlineUri: i.offlineUri,
|
||||
duration: i.duration
|
||||
}));
|
||||
|
||||
data.getSong(song.url || '/watch?v=' + song.id);
|
||||
song.url = song.url || '/watch?v=' + song.id;
|
||||
data.play(song);
|
||||
} else {
|
||||
emit('play-urls', [
|
||||
{
|
||||
|
@ -245,6 +252,9 @@ onDeactivated(() => {
|
|||
url: item.url,
|
||||
title: item.title,
|
||||
thumbnails: [{ url: item.thumbnail }],
|
||||
thumbnail: item.thumbnail,
|
||||
offlineUri: item.offlineUri,
|
||||
duration: item.duration
|
||||
})),
|
||||
)
|
||||
" />
|
||||
|
@ -313,9 +323,11 @@ onDeactivated(() => {
|
|||
:key="song.url || song.id"
|
||||
:index="index"
|
||||
:playlistId="song.playlistId"
|
||||
:author="song.uploaderName || song.subtitle"
|
||||
:author="song.uploaderName || song.artist || song.subtitle"
|
||||
:title="song.title || song.name"
|
||||
:channel="song.uploaderUrl || '/channel/' + song.subId"
|
||||
:channel="
|
||||
song.uploaderUrl || song.artistUrl || '/channel/' + song.subId
|
||||
"
|
||||
:play="song.url || '/watch?v=' + song.id"
|
||||
:art="
|
||||
song.thumbnail ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue