Skip to content

Commit 0fb95a8

Browse files
committed
- version 0.9.2.24 (BUG FIX)
- fixing mpv title parsing (once again) - fixing "Genre" field wrapping on Starion Info window
1 parent 99f49e7 commit 0fb95a8

File tree

6 files changed

+43
-8
lines changed

6 files changed

+43
-8
lines changed

Changelog

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
2024-01-12 s-n-g
2+
* version 0.9.2.24 (BUG FIX)
3+
* fixing mpv title parsing (once again)
4+
* fixing "Genre" field wrapping on Starion Info window
5+
16
2024-01-11 s-n-g
2-
* version 0.9.2.23
7+
* version 0.9.2.23 (BUG FIX)
38
* fixing issue #224 - crash when "artist", "album", "year"
49
string in received data
510

611
2024-01-05 s-n-g
7-
* version 0.9.2.22
12+
* version 0.9.2.22 (BUG FIX)
813
* fixing bug #222 - Appending a radio station with A in a playlist
914
leads to a crash (when number stations is less than window height)
1015
* fixing a crash that would occur when pressing ENTER on the Cancel

docs/index.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,18 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
176176
<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>
177177
<pre style="height: 200px;">
178178

179+
2024-01-12 s-n-g
180+
* version 0.9.2.24 (BUG FIX)
181+
* fixing mpv title parsing (once again)
182+
* fixing "Genre" field wrapping on Starion Info window
183+
179184
2024-01-11 s-n-g
180-
* version 0.9.2.23
185+
* version 0.9.2.23 (BUG FIX)
181186
* fixing issue #224 - crash when "artist", "album", "year"
182187
string in received data
183188

184189
2024-01-05 s-n-g
185-
* version 0.9.2.22
190+
* version 0.9.2.22 (BUG FIX)
186191
* fixing bug #222 - Appending a radio station with A in a playlist
187192
leads to a crash (when number stations is less than window height)
188193
* fixing a crash that would occur when pressing ENTER on the Cancel

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyradio"
3-
version = "0.9.2.23"
3+
version = "0.9.2.24"
44
authors = [
55
{ name="Ben Dowling", email="[email protected]" },
66
{ name="Spiros Georgaras", email="[email protected]" },

pyradio/__init__.py

+1-1
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, 2, 23)
4+
version_info = (0, 9, 2, 24)
55

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

pyradio/install.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
''' This is PyRadio version this
1616
install.py was released for
1717
'''
18-
PyRadioInstallPyReleaseVersion = '0.9.2.23'
18+
PyRadioInstallPyReleaseVersion = '0.9.2.24'
1919

2020
import locale
2121
locale.setlocale(locale.LC_ALL, "")

pyradio/player.py

+26-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def info_dict_to_list(info, fix_highlight, max_width):
178178
# logger.error('DE a_list\n\n{}\n\n'.format(a_list))
179179

180180
''' make sure title is not alone in line '''
181-
for a_title in ('URL:', 'site:'):
181+
for a_title in ('URL:', 'site:', 'Genre:'):
182182
for n, an_item in enumerate(a_list):
183183
if an_item.endswith(a_title):
184184
url = a_list[n+1].split('_|')[1]
@@ -1654,6 +1654,10 @@ def _get_mpv_metadata(self, *args):
16541654
enable_crash_detection_function = args[2]
16551655
if b'"icy-title":"' in a_data or \
16561656
b'"title":"' in a_data:
1657+
# if not self.playback_is_on:
1658+
# if stop():
1659+
# return False
1660+
# self._set_mpv_playback_is_on(stop, enable_crash_detection_function)
16571661
if version_info > (3, 0):
16581662
if b'"icy-title":"' in a_data:
16591663
title = a_data.split(b'"icy-title":"')[1].split(b'"}')[0]
@@ -1701,6 +1705,27 @@ def _get_mpv_metadata(self, *args):
17011705
self.oldUserInput['Title'] += ' [' + album.decode('utf-8', 'replace') + ']'
17021706
except IndexError:
17031707
pass
1708+
string_to_show = self.title_prefix + self.oldUserInput['Title']
1709+
#logger.critical(string_to_show)
1710+
if stop():
1711+
return False
1712+
self.outputStream.write(msg=string_to_show, counter='')
1713+
if not self.playback_is_on:
1714+
if stop():
1715+
return False
1716+
return self._set_mpv_playback_is_on(stop, enable_crash_detection_function)
1717+
else:
1718+
if (logger.isEnabledFor(logging.INFO)):
1719+
logger.info('Icy-Title is NOT valid')
1720+
self.buffering = False
1721+
with self.buffering_lock:
1722+
self.buffering_change_function()
1723+
title = 'Playing: ' + self.name
1724+
string_to_show = self.title_prefix + title
1725+
if stop():
1726+
return False
1727+
self.outputStream.write(msg=string_to_show, counter='')
1728+
self.oldUserInput['Title'] = title
17041729

17051730
# logger.info('DE a_data {}'.format(a_data))
17061731
if b'icy-br' in a_data:

0 commit comments

Comments
 (0)