Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatDamon committed Apr 3, 2024
1 parent 20474e6 commit 26986b2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions player.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import flet as ft
import platform, os
import platform, os, time

from lib import cfg
cfg.loadConfig()
Expand Down Expand Up @@ -169,7 +169,7 @@ def readSong(audioPathTemp):
audioInfoUpdate()
page.title = work.audioArtistText + " - " + audioTitleText + " | Simplay Player"
log_init.logging.info("Window title changed")
if platform_check.currentOS == 'windows':
if platform_check.currentOS == 'windows' and toastImportError == False:
windowsToastNotify()
log_init.logging.info("Load Windows toast")
else:
Expand All @@ -186,6 +186,7 @@ def readSong(audioPathTemp):
if cfg.cfgData["play"][0]["immediatelyPlay"] == True:
global audioLoaded
while(True):
time.sleep(1)
if audioLoaded == True:
playOrPauseMusic(0)
audioLoaded = False
Expand Down Expand Up @@ -911,7 +912,10 @@ def viewPop(e):
print(lang.infomation["cygwinWarning"])
log_init.logging.warning("Using Cygwin")
if platform_check.currentOS == "windows":
from windows_toasts import Toast, ToastDisplayImage, WindowsToaster
try:
from windows_toasts import Toast, ToastDisplayImage, WindowsToaster
except ImportError:
toastImportError = True
log_init.logging.info("Lib Windows-Toasts imported")
from sys import getwindowsversion
windowsBuild = getwindowsversion().build
Expand Down

0 comments on commit 26986b2

Please sign in to comment.