Skip to content

Commit

Permalink
adjust temp_path
Browse files Browse the repository at this point in the history
  • Loading branch information
glomatico committed May 18, 2024
1 parent b866c78 commit f01a55c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions gytmdl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def main(
continue
video_id = ytmusic_watch_playlist["tracks"][0]["videoId"]
tags = downloader.get_tags(ytmusic_watch_playlist)
temp_path = downloader.get_temp_path(video_id)
temp_track_path = downloader.get_track_temp_path(video_id)
remuxed_path = downloader.get_remuxed_path(video_id)
final_path = downloader.get_final_path(tags)
cover_url = downloader.get_cover_url(ytmusic_watch_playlist)
Expand All @@ -308,10 +308,10 @@ def main(
f'({queue_progress}) Song already exists at "{final_path}", skipping'
)
else:
logger.debug(f'Downloading to "{temp_path}"')
downloader.download(video_id, temp_path)
logger.debug(f'Downloading to "{temp_track_path}"')
downloader.download(video_id, temp_track_path)
logger.debug(f'Remuxing to "{remuxed_path}"')
downloader.remux(temp_path, remuxed_path)
downloader.remux(temp_track_path, remuxed_path)
logger.debug("Applying tags")
downloader.apply_tags(remuxed_path, tags, cover_url)
logger.debug(f'Moving to "{final_path}"')
Expand Down
2 changes: 1 addition & 1 deletion gytmdl/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def get_sanitized_string(self, dirty_string: str, is_folder: bool) -> str:
dirty_string = dirty_string[: self.truncate - 4]
return dirty_string.strip()

def get_temp_path(self, video_id: str) -> Path:
def get_track_temp_path(self, video_id: str) -> Path:
return self.temp_path / f"{video_id}_temp.m4a"

def get_remuxed_path(self, video_id: str) -> Path:
Expand Down

0 comments on commit f01a55c

Please sign in to comment.