Skip to content

Commit

Permalink
Left-pad episode numbers with zeroes
Browse files Browse the repository at this point in the history
and give Michael a little bit of credit by
assuming 20 years existence of the show :)
  • Loading branch information
kissgyorgy committed Mar 15, 2018
1 parent 6fdcac9 commit 8344714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion talkpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, enclosure):
self.length = int(enclosure.get('length'))
self.number, original_filename = self.url.split('/')[-2:]
self.number = int(self.number)
self.filename = f'{self.number}-{original_filename}'
self.filename = f'{self.number:04}-{original_filename}'

def download(self, download_path: Path):
print(f'Getting episode {self.url}', flush=True)
Expand Down

0 comments on commit 8344714

Please sign in to comment.