configure watchdog to accept a list of dirs to watch

- fix PlayingFrom component not working with album
- fix types issues on PlayingFrom component
This commit is contained in:
geoffrey45
2022-07-15 15:40:11 +03:00
parent 97b61970c5
commit 3882317cb6
11 changed files with 73 additions and 41 deletions
+10 -2
View File
@@ -46,6 +46,8 @@ const defaultTrack = <Track>{
image: "",
};
type From = fromFolder | fromAlbum | fromPlaylist | fromSearch;
export default defineStore("Queue", {
state: () => ({
progressElem: HTMLElement,
@@ -59,7 +61,7 @@ export default defineStore("Queue", {
prev: 0,
currentid: "",
playing: false,
from: <fromFolder>{} || <fromAlbum>{} || <fromPlaylist>{},
from: <From>{},
tracks: <Track[]>[defaultTrack],
}),
actions: {
@@ -178,10 +180,16 @@ export default defineStore("Queue", {
};
this.setNewQueue(tracks);
},
playFromAlbum(aname: string, albumartist: string, tracks: Track[]) {
playFromAlbum(
aname: string,
albumartist: string,
albumhash: string,
tracks: Track[]
) {
this.from = <fromAlbum>{
type: FromOptions.album,
name: aname,
hash: albumhash,
albumartist: albumartist,
};