Use gunicorn instead of Werkzeug and 32 more very minor changes (#35)

This commit is contained in:
Mungai Geoffrey
2022-04-21 03:29:42 +03:00
committed by GitHub
parent 68b474bbba
commit ef68cae625
33 changed files with 751 additions and 227 deletions
+1 -1
View File
@@ -21,9 +21,9 @@ export default defineStore("album", {
this.tracks = tracks.tracks;
this.info = tracks.info;
this.artists = artists;
this.bio = null;
},
fetchBio(title: string, albumartist: string) {
this.bio = null;
getAlbumBio(title, albumartist).then((bio) => {
this.bio = bio;
});
+26
View File
@@ -0,0 +1,26 @@
import { defineStore } from "pinia";
export default defineStore("Loader", {
state: () => ({
loading: false,
duration: 0,
}),
actions: {
startLoading() {
this.loading = true;
this.duration = new Date().getTime();
},
stopLoading() {
const diff = new Date().getTime() - this.duration;
console.log(diff);
if (diff <= 250) {
setTimeout(() => {
this.loading = false;
}, 250 - diff);
} else {
this.loading = false;
}
},
},
});
+15 -1
View File
@@ -1,6 +1,12 @@
import { defineStore } from "pinia";
import state from "../composables/state";
import { Track, fromFolder, fromAlbum, fromPlaylist } from "../interfaces";
import {
Track,
fromFolder,
fromAlbum,
fromPlaylist,
fromSearch,
} from "../interfaces";
import notif from "../composables/mediaNotification";
import { FromOptions } from "../composables/enums";
@@ -181,6 +187,14 @@ export default defineStore("Queue", {
playlistid: pid,
};
this.setNewQueue(tracks);
},
playFromSearch(query: string, tracks: Track[]) {
this.from = <fromSearch>{
type: FromOptions.search,
query: query,
};
this.setNewQueue(tracks);
},
},
+1 -1
View File
@@ -13,7 +13,7 @@ export default defineStore("tabs", {
current: tablist.home,
}),
actions: {
changeTab(tab) {
changeTab(tab: string) {
if (tab === this.tabs.queue) {
setTimeout(() => {
perks.focusCurrent();