Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
nathom 2021-07-01 16:45:40 -07:00
parent 81751cc2a1
commit 2fd59ac1ef
2 changed files with 5 additions and 2 deletions

View file

@ -86,6 +86,9 @@ class Config:
os.makedirs(CONFIG_DIR, exist_ok=True)
shutil.copy(self.default_config_path, self._path)
self.load()
self.file["downloads"]["folder"] = DOWNLOADS_DIR
self.save()
def load(self):
"""Load infomation from the config files, making a deepcopy."""

View file

@ -107,7 +107,7 @@ class Track:
logger.debug("Cover url: %s", u)
self.cover_url = u
def load_meta(self):
def load_meta(self, **kwargs):
"""Send a request to the client to get metadata for this Track.
Usually only called for single tracks and last.fm playlists.
@ -672,7 +672,7 @@ class Video:
self.explicit = kwargs.get("explicit", False)
self.tracknumber = kwargs.get("tracknumber", None)
def load_meta(self):
def load_meta(self, **kwargs):
"""Given an id at contruction, get the metadata of the video."""
resp = self.client.get(self.id, "video")
self.title = resp["title"]