Make playing sound dependencies only used if wanted

This commit is contained in:
benjamin melançon 2022-12-21 08:27:59 -05:00
parent bebbd96294
commit 1d0c87e2ab

View file

@ -7,7 +7,6 @@ import time
from datetime import datetime, timedelta from datetime import datetime, timedelta
from pathlib import Path from pathlib import Path
from pytz import timezone from pytz import timezone
from playsound import playsound
import pytz import pytz
@ -120,6 +119,7 @@ def main():
print('Working on: ' + whatnext) print('Working on: ' + whatnext)
countdown_to(end) countdown_to(end)
if not QUIET: if not QUIET:
from playsound import playsound
playsound('res/timesup.aac') playsound('res/timesup.aac')
whatdid = pomodoro_prompt_report(whatnext) whatdid = pomodoro_prompt_report(whatnext)
record_task(whatnext, whatdid, start) record_task(whatnext, whatdid, start)