Skip to content

Commit d3f27cc

Browse files
committed
- installing png on MacOs
- fixing Windows uninstall (do not remove mpv if n pressed) - win10toast will be installed upon installation - updating docs
1 parent 8e13f66 commit d3f27cc

File tree

7 files changed

+28
-19
lines changed

7 files changed

+28
-19
lines changed

README.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,13 +1565,12 @@ <h2 id="desktop-notifications">Desktop Notifications <span style="padding-left:
15651565
<p><strong>PyRadio</strong> can provide Desktop Notifications when a notification daemon is already present (on Linux and BSD), or throught <strong>Windows Notification Service</strong> (<strong>WNS</strong>).</p>
15661566
<p>If enabled, <strong>PyRadio</strong> will display:</p>
15671567
<ol type="1">
1568-
<li>Song info (as provided by the radio station)<br />
1569-
That means that if the radio station does not provide any info, no notification will be issued.</li>
1568+
<li>The playlist name, when playback starts.</li>
1569+
<li>Song info (as provided by the radio station).</li>
15701570
<li>Connection failure messages.</li>
15711571
<li>Player crash messages.</li>
15721572
</ol>
15731573
<p>To find out more about configuring this feature, please refer to <a href="desktop-notification.html">Desktop Notification</a>.</p>
1574-
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> If Desktop Notification is enabled by default (in the case of a distro package) users can disable it by creating an empty <strong>~/.config/pyradio/notification</strong> file.</p>
15751574
<h2 id="session-locking">Session Locking <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
15761575
<p><strong>PyRadio</strong> uses session locking, which actually means that only the first instance executed within a given session will be able to write to the configuration file.</p>
15771576
<p>Subsequent instances will be “<em>locked</em>”. This means that the user can still play stations, load and edit playlists, load and test themes, but any changes will <strong>not</strong> be recorded in the configuration file.</p>

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,15 +1096,13 @@ To access supported services, just press "**O**" (capital "*o*") at the program'
10961096

10971097
If enabled, **PyRadio** will display:
10981098

1099-
1. Song info (as provided by the radio station) \
1100-
That means that if the radio station does not provide any info, no notification will be issued.
1101-
2. Connection failure messages.
1102-
3. Player crash messages.
1099+
1. The playlist name, when playback starts.
1100+
2. Song info (as provided by the radio station).
1101+
3. Connection failure messages.
1102+
4. Player crash messages.
11031103

11041104
To find out more about configuring this feature, please refer to [Desktop Notification](desktop-notification.md).
11051105

1106-
**Note:** If Desktop Notification is enabled by default (in the case of a distro package) users can disable it by creating an empty **~/.config/pyradio/notification** file.
1107-
11081106
## Session Locking
11091107

11101108
**PyRadio** uses session locking, which actually means that only the first instance executed within a given session will be able to write to the configuration file.

desktop-notification.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ The behavior and presentation of notifications greatly depends on the daemon/ser
2828
If enabled, **PyRadio** will display:
2929

3030
1. The playlist name, when playback starts.
31-
1. Song info (as provided by the radio station).
32-
2. Connection failure messages.
33-
3. Player crash messages.
31+
2. Song info (as provided by the radio station).
32+
3. Connection failure messages.
33+
4. Player crash messages.
3434

3535
Desktop Notifications are disabled by default.
3636

devel/build_install_pyradio

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,10 @@ then
479479
else
480480
./devel/fix_pyradio_desktop_file -i -t "${REQ_TERMINAL}"
481481
fi
482-
mkdir -p ~/.config/pyradio
483-
cp devel/pyradio.png ~/.config/pyradio
484482
fi
485483
fi
484+
mkdir -p ~/.config/pyradio
485+
cp devel/pyradio.png ~/.config/pyradio
486486
else
487487
do_exit
488488
exit 1

devel/build_install_pyradio.bat

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ REM echo(NO_DEV = %NO_DEV%
99
REM GOTO endnopause
1010

1111
CLS
12+
ECHO Installing / Updating wheel
13+
%PROGRAM% -m pip install --upgrade wheel 1>NUL 2>NUL
14+
IF %ERRORLEVEL% == 1 (
15+
SET ERRPKG=windows-curses
16+
GOTO piperror
17+
)
1218
ECHO Installing / Updating setuptools
1319
%PROGRAM% -m pip install --upgrade setuptools 1>NUL 2>NUL
1420
IF %ERRORLEVEL% == 1 (
@@ -28,6 +34,7 @@ echo dnspython >> requirements.txt
2834
echo psutil >> requirements.txt
2935
echo wheel >> requirements.txt
3036
echo pylnk >> requirements.txt
37+
echo win10toast >> requirements.txt
3138

3239
::Remove the elevation tag and SET the correct working directory
3340
IF '%1'=='ELEV' ( SHIFT /1 )
@@ -82,7 +89,8 @@ ECHO # This is probably because PyRadio is already #
8289
ECHO # running, so files cannot be overwritten. #
8390
ECHO # Please terminate PyRadio and try again. #
8491
ECHO ###############################################
85-
GOTO endofscript
92+
IF EXIST "DOPAUSE" ( GOTO endofscript )
93+
GOTO endnopause
8694

8795
:installhtml
8896
IF "%NO_DEV%"=="1" (
@@ -198,7 +206,10 @@ ECHO User files are under "%APPDATA%\pyradio"
198206
SET /p ANS="Do you want to remove them (y/n)?: "
199207
:: ECHO %ANS%
200208
IF "%ANS%" == "y" GOTO :addtobat
201-
IF "%ANS%" == "n" GOTO :addtobat
209+
IF "%ANS%" == "n" (
210+
IF EXIST "DOPAUSE" ( GOTO endofscript )
211+
GOTO endnopause
212+
)
202213
GOTO :readit
203214
:addtobat
204215

pyradio/install.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,13 @@ def update_or_uninstall_on_windows(self, mode='update', from_pyradio=False, firs
586586
with open(bat, "w") as b:
587587
b.write('@ECHO OFF\n')
588588
b.write('CLS\n')
589+
b.write('python -m pip install --upgrade wheel 1>NUL 2>NUL\n')
590+
b.write('if %ERRORLEVEL% == 1 GOTO downloaderror\n')
589591
b.write('python -m pip install --upgrade setuptools 1>NUL 2>NUL\n')
590592
b.write('if %ERRORLEVEL% == 1 GOTO downloaderror\n')
591593
b.write('python -m pip install --upgrade requests 1>NUL 2>NUL\n')
592594
b.write('if %ERRORLEVEL% == 1 GOTO downloaderror\n')
593-
b.write('python -m pip install --upgrade wheel 1>NUL 2>NUL\n')
595+
b.write('python -m pip install --upgrade win10toast 1>NUL 2>NUL\n')
594596
b.write('if %ERRORLEVEL% == 1 GOTO downloaderror\n')
595597
# b.write('PAUSE\n')
596598
if mode.startswith('update'):
@@ -1147,6 +1149,7 @@ def _do_it(self, mode='update'):
11471149
'patool',
11481150
'pyunpack',
11491151
'wheel',
1152+
'win10toast',
11501153
):
11511154
print('Checking module: ' + a_module + ' ...')
11521155
ret = subprocess.call('python -m pip install --upgrade ' + a_module,

pyradio/win.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,6 @@ def install_player(output_folder=None, package=0, do_not_exit=False):
392392

393393
print(msg.format(to_do[2]))
394394

395-
396-
397395
while x not in opts:
398396
print(prompt, end='', flush=True)
399397
x = getwch()

0 commit comments

Comments
 (0)