Skip to content

Commit

Permalink
add types for FFmpeg.record function, use pathlib to create main out dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Bleuzen committed Feb 17, 2021
1 parent beb53b1 commit f04747d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spotrec.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def main():
init_log()

# Create the output directory
os.makedirs(_output_directory, exist_ok=True)
Path(_output_directory).mkdir(
parents=True, exist_ok=True)

# Init Spotify DBus listener
global _spotify
Expand Down Expand Up @@ -434,7 +435,7 @@ def init_pa_stuff_if_needed(self):
class FFmpeg:
instances = []

def record(self, out_dir, file, metadata_for_file={}):
def record(self, out_dir: str, file: str, metadata_for_file={}):
self.out_dir = out_dir

self.pulse_input = _pa_recording_sink_name + ".monitor"
Expand Down

0 comments on commit f04747d

Please sign in to comment.