Esempio n. 1
0
 def __init__(self):
     self._songs = []
     self._playlist_name = ""
     self._songlist_code = ""
     self._playlist_code = ""
     self._output = ""
     self._config = get_config()
Esempio n. 2
0
 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 = []
Esempio n. 3
0
 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()
Esempio n. 4
0
 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
Esempio n. 5
0
    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)
Esempio n. 6
0
 def __init__(self):
     self._config = get_config()
     self._key = self._config["hosts"]["youtube"]["key"]
     self._icon = self._config["hosts"]["youtube"]["icon"]
Esempio n. 7
0
 def __init__(self):
     self._state = SeekState()
     self._config = get_config()
     self._score_calculator = ScoreCalculator()
Esempio n. 8
0
 def __init__(self):
     self._config = get_config()
     self._path = get_path()
     self._songs = []
     self._songs_json = {}
Esempio n. 9
0
 def __init__(self):
     self._result = {}
     self._config = get_config()
     self._path = get_path()