Skip to content

Commit 54595a7

Browse files
committed
Fixing vlc returned volume parsing (due to locales decimal separator)
1 parent 24964ce commit 54595a7

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Changelog

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2019-11-10
2+
* Fixing vlc returned volume parsing (due to locales decimal separator)
3+
14
2019-10-29 s-n-g
25
* FIX: Playlists flagged as changed when adding a station
36
* Handling CJK presentation on station and playlist view

pyradio.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" Copyright (C) 2011 Ben Dowling <http://www.coderholic.com/pyradio>
22
.\" This manual is freely distributable under the terms of the GPL.
33
.\"
4-
.TH PYRADIO 1 "October 2019"
4+
.TH PYRADIO 1 "November 2019"
55

66
.SH NAME
77
.PP

pyradio/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" pyradio -- Console radio player. "
22

3-
version_info = (0, 8, 3)
3+
version_info = (0, 8, 4)
44

55
__version__ = version = '.'.join(map(str, version_info))
66
__project__ = __name__

pyradio/player.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,8 @@ def _volume_down(self):
762762

763763
def _format_volume_string(self, volume_string):
764764
""" format vlc's volume """
765-
self.actual_volume = int(volume_string.split(self.volume_string)[1].split(',')[0].split()[0])
765+
dec_sep = '.' if '.' in volume_string else ','
766+
self.actual_volume = int(volume_string.split(self.volume_string)[1].split(dec_sep)[0].split()[0])
766767
return '[Vol: {}%] '.format(int(100 * self.actual_volume / self.max_volume))
767768

768769
def _format_title_string(self, title_string):

0 commit comments

Comments
 (0)