Skip to content

Commit ddc6271

Browse files
committed
- recording saved files will be initially saved under the data
directory when MKVToolNix is installed - on Windows, downloaded recording files in the data directory will be deleted at startup, when recording is not active - fixing players crash detection routines - install.py: will terminate if python non in PATH - fixing config players parsing - updating docs
1 parent 92d54bc commit ddc6271

File tree

10 files changed

+429
-118
lines changed

10 files changed

+429
-118
lines changed

pyradio/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ def read_config(self):
19391939
if st.lower() == 'false':
19401940
self.show_recording_start_message = False
19411941
elif sp[0] == 'player':
1942-
self.opts['player'][1] = sp[1].lower().strip()
1942+
self.opts['player'][1] = sp[1].lower().replace(' ', '')
19431943
# if sys.platform.startswith('win'):
19441944
# self.opts['player'][1] = self.opts['player'][1].replace('mpv,', '')
19451945
elif sp[0] == 'connection_timeout':

pyradio/install.py

+30
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,16 @@ def __init__(self,
848848
self.user = user
849849
self._github_long_description = github_long_description
850850
self._python_exec = PythonExecutable(python_version_to_use)
851+
if self._python_exec.python is None:
852+
print('''
853+
854+
Python was not found in your system.
855+
If you have already installed it, chances are you have not added it in your PATH.
856+
To verify that Python is in your PATH open a terminal/console and type "python".
857+
If you get en error, you have to add it to your PATH.
858+
''')
859+
sys.exit(1)
860+
851861
self.python2 = True if python_version_to_use == 2 else False
852862
self._pix_isolated = pix_isolated
853863

@@ -1250,6 +1260,16 @@ def __init__(self,
12501260
self._fromTUI = fromTUI
12511261
self._github_long_description = github_long_description
12521262
self._python_exec = PythonExecutable(python_version_to_use)
1263+
if self._python_exec.python is None:
1264+
print('''
1265+
1266+
Python was not found in your system.
1267+
If you have already installed it, chances are you have not added it in your PATH.
1268+
To verify that Python is in your PATH open a terminal/console and type "python".
1269+
If you get en error, you have to add it to your PATH.
1270+
''')
1271+
sys.exit(1)
1272+
12531273
self.python2 = True if python_version_to_use == 2 else False
12541274
self._pix_isolated = pix_isolated
12551275
self._get_cache = False
@@ -1447,6 +1467,16 @@ def _do_it(self, mode='update'):
14471467
python_version_to_use = 2 if args.python2 else 3
14481468
python_exec = PythonExecutable(python_version_to_use)
14491469

1470+
if python_exec.python is None:
1471+
print('''
1472+
1473+
Python was not found in your system.
1474+
If you have already installed it, chances are you have not added it in your PATH.
1475+
To verify that Python is in your PATH open a terminal/console and type "python".
1476+
If you get en error, you have to add it to your PATH.
1477+
''')
1478+
sys.exit(1)
1479+
14501480
if not python_exec.can_install:
14511481
print('Error: Python {} not found on your system...\n'.format('2' if python_exec.requested_python_version == 2 else '3'))
14521482
sys.exit(1)

pyradio/main.py

+4
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,10 @@ def shell():
770770
except:
771771
pass
772772

773+
if platform.startswith('win') and not args.record:
774+
from .win import find_and_remove_recording_data
775+
find_and_remove_recording_data(pyradio_config.data_dir)
776+
773777
''' curses wrapper '''
774778
curses.wrapper(pyradio.setup)
775779

pyradio/notification

100644100755
File mode changed.

0 commit comments

Comments
 (0)