Skip to content

Commit e88ec00

Browse files
committed
fixing player config restore on Windows
1 parent 4182cd9 commit e88ec00

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

pyradio/player.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -630,14 +630,13 @@ def _restore_win_player_config_file(self):
630630
if platform.startswith('win'):
631631
''' restore player config '''
632632
for k in ('mplayer', 'mpv'):
633-
cnf_file = self.all_config_files[k][0]
634-
if os.path.exists(cnf_file):
635-
bck_file = os.path.join(os.getenv('APPDATA'), "pyradio", k + "-active.conf")
636-
if os.path.exists(bck_file):
637-
try:
638-
shutil_copy_file(bck_file, cnf_file)
639-
except:
640-
pass
633+
bck_file = os.path.join(os.getenv('APPDATA'), "pyradio", k + "-active.conf")
634+
if os.path.exists(bck_file):
635+
cnf_file = self.all_config_files[k][0]
636+
try:
637+
shutil_copy_file(bck_file, cnf_file)
638+
except:
639+
pass
641640

642641
def _stop_delay_thread(self):
643642
if self.delay_thread is not None:

0 commit comments

Comments
 (0)