Skip to content

Commit

Permalink
Merge pull request #356 from vicwomg/fix-windows-paths
Browse files Browse the repository at this point in the history
Fix windows path mangling
  • Loading branch information
vicwomg authored Jul 22, 2024
2 parents d9c8039 + 301a5b5 commit 0b89197
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,19 +652,19 @@ def expand_fs():

def get_default_youtube_dl_path(platform):
if platform == "windows":
return os.path.join(os.path.dirname(__file__), ".venv\Scripts\yt-dlp.exe")
return os.path.join(os.path.dirname(__file__), ".venv\\Scripts\\yt-dlp.exe")
return os.path.join(os.path.dirname(__file__), ".venv/bin/yt-dlp")


def get_default_dl_dir(platform):
if raspberry_pi:
return "~/pikaraoke-songs"
elif platform == "windows":
legacy_directory = os.path.expanduser("~\pikaraoke\songs")
legacy_directory = os.path.expanduser("~\\pikaraoke\\songs")
if os.path.exists(legacy_directory):
return legacy_directory
else:
return "~\pikaraoke-songs"
return "~\\pikaraoke-songs"
else:
legacy_directory = "~/pikaraoke/songs"
if os.path.exists(legacy_directory):
Expand Down

0 comments on commit 0b89197

Please sign in to comment.