Skip to content

Commit 1fbbe03

Browse files
committed
- version 0.9.3.11.5 - 0.9.3.12-beta5
- config.py: add playlist comments to save_playlist_file - all functions that create or alter a playlist station will comply to Station(IntEnum) length - fixing md to html links (when they contain a single quote)
1 parent edfe95e commit 1fbbe03

File tree

13 files changed

+43
-19
lines changed

13 files changed

+43
-19
lines changed

Changelog

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
2025-01-XX s-n-g
1+
2025-02-27 s-n-g
22
* version 0.9.3.11.5 - 0.9.3.12-beta5
3+
* fixing the installation script
4+
* playlist format change: adding profile, buffering, http, volume
5+
and referer fields (support for these fields not implemented yet)
6+
* referer files will be integrated to playlists
37
* config option added to invert the mouse wheel action (#272)
48
* fixing #276 : mouse support will always be on
59
- if disabled, mouse keys will be ignored
610
- toggling the config option does not require a program restart any more
7-
* removing ont working stations from stations.csv
11+
* fixing #277: installation fails when username contains a space character
12+
* removing not working stations from stations.csv
813
* updating docs
914

1015
2025-01-18 s-n-g

devel/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ for afile in index.md \
158158
client.md \
159159
rec-dir.md
160160
do
161+
sed -i -e "s/'s-/s-/g" -e "s/s'-/s-/g" "$afile"
162+
git add "$afile"
161163
echo -ne '.'
162164
#[ -z "$(git status | grep ${afile})" ] || {
163165
out=${afile/%.md/.html}
@@ -260,6 +262,9 @@ do
260262
sed -i -e '/img */s/750px/35%/' "$out"
261263
fi
262264
#
265+
# fix #links
266+
sed -i '/href="#/s/\'//g' "$out"
267+
#
263268
# convert images to links
264269
images_to_links "$out"
265270
if [ "$out" = "radio-browser.html" ];then

docs/client.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h3 id="command-line-parameters">Command line parameters</h3>
6464

6565
Server Parameters:
6666
-s SERVER_AND_PORT, --server_and_port SERVER_AND_PORT
67-
Set the servers&#39;s IP and PORT (format: IP:PORT)
67+
Set the server IP and PORT (format: IP:PORT)
6868
-r, --reverse-detection
6969
Reverse server detection (when no server IP and PORT
7070
specified); detect headless server last, instead of

docs/client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ General options:
3333
3434
Server Parameters:
3535
-s SERVER_AND_PORT, --server_and_port SERVER_AND_PORT
36-
Set the servers's IP and PORT (format: IP:PORT)
36+
Set the server IP and PORT (format: IP:PORT)
3737
-r, --reverse-detection
3838
Reverse server detection (when no server IP and PORT
3939
specified); detect headless server last, instead of

docs/index.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ <h2 id="table-of-contents">Table of Contents <span style="padding-left: 10px;"><
8181
<li><a href="#cjk-characters-support">CJK characters support</a></li>
8282
</ul></li>
8383
<li><a href="#moving-stations-around">Moving stations around</a></li>
84-
<li><a href="#specifying-stations&#39;-encoding">Specifying stations’ encoding</a>
84+
<li><a href="#specifying-stations-encoding">Specifying stations’ encoding</a>
8585
<ul>
8686
<li><a href="#station-by-station-encoding-declaration">Station by station encoding declaration</a></li>
8787
<li><a href="#global-encoding-declaration">Global encoding declaration</a></li>
8888
</ul></li>
8989
<li><a href="#player-detection-/-selection">Player detection / selection</a>
9090
<ul>
9191
<li><a href="#changing-player-mid-session">Changing player mid-session</a></li>
92-
<li><a href="#specifying-a-station&#39;s-referer-url">Specifying a station’s Referer URL</a>
92+
<li><a href="#specifying-a-stations-referer-url">Specifying a station’s Referer URL</a>
9393
<ul>
9494
<li><a href="#note-about-mplayer">Note about MPlayer</a></li>
9595
<li><a href="#referer-support-in-the-playlist">Referer support in the playlist</a></li>
@@ -191,13 +191,18 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
191191
<h2 id="changelog">Changelog <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
192192
<pre style="height: 200px;">
193193

194-
2025-01-XX s-n-g
194+
2025-02-27 s-n-g
195195
* version 0.9.3.11.5 - 0.9.3.12-beta5
196+
* fixing the installation script
197+
* playlist format change: adding profile, buffering, http, volume
198+
and referer fields (support for these fields not implemented yet)
199+
* referer files will be integrated to playlists
196200
* config option added to invert the mouse wheel action (#272)
197201
* fixing #276 : mouse support will always be on
198202
- if disabled, mouse keys will be ignored
199203
- toggling the config option does not require a program restart any more
200-
* removing ont working stations from stations.csv
204+
* fixing #277: installation fails when username contains a space character
205+
* removing not working stations from stations.csv
201206
* updating docs
202207

203208
2025-01-18 s-n-g
@@ -1647,7 +1652,7 @@ <h2 id="about-playlist-files">About Playlist files <span style="padding-left: 10
16471652
<li><p>The sixth column will determine whether <strong>Buffering</strong> will be used (more on this at <a href="#buffering">Buffering</a>).</p></li>
16481653
<li><p>The seventh column will determine whether the station will be forced to be using http instead of https (more on this at <a href="#player-connection-protocol">Player connection protocol</a>).</p></li>
16491654
<li><p>The eight column defines the volume value to be used.</p></li>
1650-
<li><p>The last column will define the referer to be used (more on this at <a href="##specifying-a-station&#39;s-referer-url">Specifying a station’s Referer URL</a>).</p></li>
1655+
<li><p>The last column will define the referer to be used (more on this at <a href="#specifying-a-stations-referer-url">Specifying a station’s Referer URL</a>).</p></li>
16511656
</ul>
16521657
<p>The following table presents the <strong>Station’s fields</strong> and the current level of support.</p>
16531658
<table>

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ Command line internet radio player.
3434
* [Line editor](#line-editor)
3535
* [CJK characters support](#cjk-characters-support)
3636
* [Moving stations around](#moving-stations-around)
37-
* [Specifying stations' encoding](#specifying-stations'-encoding)
37+
* [Specifying stations' encoding](#specifying-stations-encoding)
3838
* [Station by station encoding declaration](#station-by-station-encoding-declaration)
3939
* [Global encoding declaration](#global-encoding-declaration)
4040
* [Player detection / selection](#player-detection-/-selection)
4141
* [Changing player mid-session](#changing-player-mid-session)
42-
* [Specifying a station's Referer URL](#specifying-a-station's-referer-url)
42+
* [Specifying a station's Referer URL](#specifying-a-stations-referer-url)
4343
* [Note about MPlayer](#note-about-mplayer)
4444
* [Referer support in the playlist](#referer-support-in-the-playlist)
4545
* [Extra Player Parameters](#extra-player-parameters)
@@ -435,7 +435,7 @@ Optionally, a number of more columns can be used.
435435

436436
- The eight column defines the volume value to be used.
437437

438-
- The last column will define the referer to be used (more on this at [Specifying a station's Referer URL](##specifying-a-station's-referer-url)).
438+
- The last column will define the referer to be used (more on this at [Specifying a station's Referer URL](#specifying-a-stations-referer-url)).
439439

440440
The following table presents the **Station's fields** and the current level of support.
441441

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyradio"
3-
version = "0.9.3.11.4"
3+
version = "0.9.3.11.5"
44
authors = [
55
{ name="Ben Dowling", email="[email protected]" },
66
{ name="Spiros Georgaras", email="[email protected]" },

pyradio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
" pyradio -- Console radio player. "
33

4-
version_info = (0, 9, 3, 11, 4)
4+
version_info = (0, 9, 3, 11, 5)
55

66
# Set it to True if new stations have been
77
# added to the package's stations.csv

pyradio/browser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,9 @@ def stations(self, playlist_format=2):
464464
if use_fav.endswith('.jpg') or \
465465
use_fav.endswith('.png'):
466466
fav = use_fav
467-
# ret.append([n['name'], n['url'], enc, '', '', '', ''])
468-
ret.append([n['name'], n['url'], enc, {'image': fav}, '', '', ''])
467+
ret.append(
468+
[n['name'], n['url'], enc, {'image': fav}, '', '', '', '', '']
469+
)
469470
return ret
470471

471472
def save_config(self):

pyradio/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def client():
280280

281281
server_opts = parser.add_argument_group('• Server Parameters')
282282
server_opts.add_argument('-s', '--server_and_port', default='',
283-
help="Set the servers's IP and PORT (format: IP:PORT)")
283+
help="Set the server IP and PORT (format: IP:PORT)")
284284
server_opts.add_argument('-r', '--reverse-detection', action='store_true', default=False,
285285
help='Reverse server detection (when no server IP and PORT specified);'
286286
' detect headless server last, instead of headless server first')

pyradio/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,11 @@ def save_playlist_file(self, stationFile=''):
906906
try:
907907
with open(st_new_file, 'w', encoding='utf-8') as cfgfile:
908908
writter = csv.writer(cfgfile)
909+
writter.writerow(['# PyRadio Playlist File Format:'])
910+
writter.writerow(
911+
['# name', 'url', 'encoding', 'icon',
912+
'profile', 'buffering', 'force-http',
913+
'volume', 'referer'])
909914
for a_station in self.stations:
910915
writter.writerow(self._format_playlist_row(a_station))
911916
except:

pyradio/edit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from .xdg import CheckDir
2222
from .html_help import HtmlHelp
2323
from .keyboard import kbkey, kb2str, kb2chr, check_localized
24-
from .common import M_STRINGS
24+
from .common import M_STRINGS, Station
2525

2626
locale.setlocale(locale.LC_ALL, '') # set your locale
2727

@@ -688,6 +688,9 @@ def _return_station(self):
688688
self._encoding,
689689
{'image': self._line_editor[2].string.strip()}
690690
]
691+
max_value = max(station.value for station in Station)
692+
while len(self.new_station) <= max_value:
693+
self.new_station.append('')
691694
return ret
692695

693696
def _is_valid_url(self, a_url):

pyradio/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
''' This is PyRadio version this
1818
install.py was released for
1919
'''
20-
PyRadioInstallPyReleaseVersion = '0.9.3.11.4'
20+
PyRadioInstallPyReleaseVersion = '0.9.3.11.5'
2121

2222
locale.setlocale(locale.LC_ALL, "")
2323

0 commit comments

Comments
 (0)