def __init__(self): self._songs = [] self._playlist_name = "" self._songlist_code = "" self._playlist_code = "" self._output = "" self._config = get_config()
def __init__(self): self._config = get_config() self._path = get_path() self._song_file = join(self._path["data_path"], self._path["song_file"]) self._song_dict = {} self._dir_list = [] self._dir_file_list = []
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._crawler = Crawler() self._producer = Producer() self._config = get_config() self._path = get_path() self._selected_playlist_index = 0 self._crawl_button = QLabel(self) self._playlist_combo = QComboBox(self) self._build_gui()
def get_songs_in_path(self, path: Path) -> List[Song]: """ Reads path and returns a list of URL's of songs within """ assert path.host == "local" config = get_config() output = [] local_icon = config["hosts"]["local"]["icon"] all_files_in_path = [ f for f in listdir(path.url) if isfile(join(path.url, f)) ] for candidate in all_files_in_path: file_split = splitext(candidate) extension = file_split[1].replace(".", "") if extension in config["hosts"]["local"]["extensions"]: full_path = join(path.url, candidate) song = Song(file_split[0], full_path, local_icon) output.append(song) return output
def __init__(self): self._config = get_config() self._path = get_path() cache_path = os.path.join( self._path["data_path"], self._config["hosts"]["spotify"]["cache_file"]) self._icon = self._config["hosts"]["spotify"]["icon"] oauth = SpotifyOAuth( client_id=self._config["hosts"]["spotify"]["client_id"], client_secret=self._config["hosts"]["spotify"]["client_secret"], redirect_uri=self._config["hosts"]["spotify"]["redirect_uri"], show_dialog=True, cache_path=cache_path, scope="playlist-read-collaborative") self._spotipy = spotipy.Spotify(auth_manager=oauth)
def __init__(self): self._config = get_config() self._key = self._config["hosts"]["youtube"]["key"] self._icon = self._config["hosts"]["youtube"]["icon"]
def __init__(self): self._state = SeekState() self._config = get_config() self._score_calculator = ScoreCalculator()
def __init__(self): self._config = get_config() self._path = get_path() self._songs = [] self._songs_json = {}
def __init__(self): self._result = {} self._config = get_config() self._path = get_path()