1.0.6 - Discord integration, logging, bugfixes
This commit is contained in:
parent
863c1aff40
commit
83860ff052
23 changed files with 1648 additions and 129 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<v-list-item @click='click' v-if='!card' :class='{dense: tiny}'>
|
||||
<v-list-item @click='click' v-if='!card'>
|
||||
<v-list-item-avatar>
|
||||
<v-img :src='artist.picture.thumb'></v-img>
|
||||
</v-list-item-avatar>
|
||||
|
|
|
|||
|
|
@ -108,6 +108,17 @@ export default {
|
|||
dShow() {
|
||||
if (!this.dShow) this.$emit('close');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//Auto download
|
||||
if (!this.$root.settings.downloadDialog) {
|
||||
this.download();
|
||||
setInterval(() => {
|
||||
this.$emit('close');
|
||||
this.dShow = false;
|
||||
}, 50);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -74,10 +74,6 @@ export default {
|
|||
},
|
||||
//Play track
|
||||
async play(index) {
|
||||
if (this.tracks.length < this.count) {
|
||||
await this.loadAll();
|
||||
}
|
||||
|
||||
this.$root.queue.source = {
|
||||
text: 'Loved tracks',
|
||||
source: 'playlist',
|
||||
|
|
@ -85,6 +81,15 @@ export default {
|
|||
};
|
||||
this.$root.replaceQueue(this.tracks);
|
||||
this.$root.playIndex(index);
|
||||
|
||||
//Load all tracks
|
||||
if (this.tracks.length < this.count) {
|
||||
this.loadAll().then(() => {
|
||||
this.$root.replaceQueue(this.tracks);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
removedTrack(index) {
|
||||
this.tracks.splice(index, 1);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ export default {
|
|||
},
|
||||
//Scroll to currently playing lyric
|
||||
scrollLyric() {
|
||||
if (!this.lyrics) return;
|
||||
if (!this.lyrics || !this.lyrics.lyrics || this.lyrics.lyrics.length == 0) return;
|
||||
|
||||
//Prevent janky scrolling
|
||||
if (this.currentLyricIndex == this.currentLyric()) return;
|
||||
|
|
|
|||
|
|
@ -109,14 +109,12 @@ export default {
|
|||
methods: {
|
||||
async play() {
|
||||
let playlist = this.playlist;
|
||||
//Load playlist tracks
|
||||
if (playlist.tracks.length != playlist.trackCount) {
|
||||
let data = await this.$axios.get(`/playlist/${playlist.id}?full=iguess`);
|
||||
playlist = data.data;
|
||||
}
|
||||
//Error handling
|
||||
//Load if no tracks
|
||||
if (!playlist || playlist.tracks.length == 0)
|
||||
playlist = (await this.$axios.get(`/playlist/${playlist.id}?full=iguess`)).data;
|
||||
if (!playlist) return;
|
||||
|
||||
|
||||
//Play
|
||||
this.$root.queue.source = {
|
||||
text: playlist.title,
|
||||
source: 'playlist',
|
||||
|
|
@ -124,6 +122,12 @@ export default {
|
|||
};
|
||||
this.$root.replaceQueue(playlist.tracks);
|
||||
this.$root.playIndex(0);
|
||||
|
||||
//Load all tracks
|
||||
if (playlist.tracks.length != playlist.trackCount) {
|
||||
let data = await this.$axios.get(`/playlist/${playlist.id}?full=iguess`);
|
||||
playlist = data.data;
|
||||
}
|
||||
},
|
||||
//On click navigate to details
|
||||
click() {
|
||||
|
|
|
|||
|
|
@ -180,12 +180,14 @@ export default {
|
|||
this.$axios.put(`/library/tracks?id=${this.track.id}`);
|
||||
},
|
||||
goAlbum() {
|
||||
this.$emit('redirect')
|
||||
this.$router.push({
|
||||
path: '/album',
|
||||
query: {album: JSON.stringify(this.track.album)}
|
||||
});
|
||||
},
|
||||
goArtist(a) {
|
||||
this.$emit('redirect');
|
||||
this.$router.push({
|
||||
path: '/artist',
|
||||
query: {artist: JSON.stringify(a)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue