You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
modularize playlist parser
This commit is contained in:
@@ -5,6 +5,8 @@ from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
import tinytag
|
||||
|
||||
_log_out: log95.TextIO
|
||||
|
||||
@dataclass
|
||||
class Track:
|
||||
path: Path
|
||||
@@ -164,4 +166,17 @@ class InterModuleCommunication:
|
||||
Sends the data to a named module, and return its response
|
||||
"""
|
||||
if not name in self.names_modules.keys(): raise ModuleNotFoundError("No such module")
|
||||
return self.names_modules[name].imc_data(source, next((k for k, v in self.names_modules.items() if v is source), None), data, False)
|
||||
return self.names_modules[name].imc_data(source, next((k for k, v in self.names_modules.items() if v is source), None), data, False)
|
||||
|
||||
class PlaylistParser:
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
def parse(self, playlist_path: Path) -> tuple[dict[str, str], list[tuple[list[str], dict[str, str]]]]:
|
||||
"""
|
||||
This should return the following information:
|
||||
global arguments,
|
||||
list of entries:
|
||||
a entry is just a tuple of a list of strings (file paths)
|
||||
and a dictionary of str:str consistent of the arguments which affect the files given
|
||||
"""
|
||||
return {}, []
|
||||
Reference in New Issue
Block a user