Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the pbp-meta-gen Windows compadible. #31

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pbp/meta_gen/gen_soundtrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Filename: meta_gen/gen_soundtrap.py
# Description: Captures SoundTrap metadata either from a local directory of S3 bucket
import urllib
import os
from typing import List

import boto3
Expand Down Expand Up @@ -80,7 +81,10 @@ def run(self):

if scheme == "file":
parsed_uri = urllib.parse.urlparse(self.audio_loc)
wav_path = Path(parsed_uri.path)
if os.name == "nt":
wav_path = Path(parsed_uri.path[3:])
else:
wav_path = Path(parsed_uri.path)
for filename in progressbar(
sorted(wav_path.rglob("*.wav")), prefix="Searching : "
):
Expand Down