Skip to content

Commit

Permalink
fix "last_video_timestamp" repeatedly getting appended to
Browse files Browse the repository at this point in the history
i have no idea what i am doing.
  • Loading branch information
12beesinatrenchcoat committed Mar 28, 2021
1 parent a7d59ad commit 549cb4d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def get_playlist_items():
try:
with open('last_video_timestamp', 'r+') as f:
last_video_timestamp = float(f.read())
f.seek(0)
f.write(str(now))
f.truncate()

except FileNotFoundError:
with open('last_video_timestamp', 'w') as f:
Expand Down

0 comments on commit 549cb4d

Please sign in to comment.