mirror of
https://github.com/janishutz/MusicPlayer.git
synced 2026-09-10 14:25:24 +02:00
feat: loading local songs, basic association
association used to load existing playlists with local files
This commit is contained in:
@@ -26,6 +26,9 @@ import type {
|
||||
import type {
|
||||
Song
|
||||
} from '../dtype/playlist';
|
||||
import {
|
||||
load
|
||||
} from './playlists/loader';
|
||||
import {
|
||||
playIndex
|
||||
} from './playlists';
|
||||
@@ -137,7 +140,6 @@ const addSongFromSource = async ( source: string ): Promise<boolean> => {
|
||||
if ( sources[source]!.authorized.value ) {
|
||||
sources[source]!.addSongsFromThisSource( addToSongList );
|
||||
} else {
|
||||
// TODO: Make this interact with user
|
||||
sources[source]!.login!();
|
||||
|
||||
return false;
|
||||
@@ -146,6 +148,7 @@ const addSongFromSource = async ( source: string ): Promise<boolean> => {
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
export default {
|
||||
play,
|
||||
pause,
|
||||
@@ -167,5 +170,6 @@ export default {
|
||||
playbackPercentage,
|
||||
repeat,
|
||||
shuffle,
|
||||
isPlaying
|
||||
isPlaying,
|
||||
'loadPlaylist': load
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user