Removing some unnecesary lines
This commit is contained in:
parent
324432bd12
commit
8dd1188bc8
|
@ -559,14 +559,10 @@ class MocPlayerSegment(PlayerSegment):
|
||||||
now_playing_str = run_cmd(pl, ['mocp', '-i'])
|
now_playing_str = run_cmd(pl, ['mocp', '-i'])
|
||||||
if not now_playing_str:
|
if not now_playing_str:
|
||||||
return
|
return
|
||||||
ignore_info = (
|
|
||||||
'File', 'TimeLeft', 'Title',
|
|
||||||
'Bitrate', 'AvgBitrate', 'Rate'
|
|
||||||
)
|
|
||||||
now_playing = dict((
|
now_playing = dict((
|
||||||
line.split(': ', 1)
|
line.split(': ', 1)
|
||||||
for line in now_playing_str.split('\n')[:-1]
|
for line in now_playing_str.split('\n')[:-1]
|
||||||
if line.split(': ', 1)[0] not in ignore_info
|
|
||||||
))
|
))
|
||||||
state = _convert_state(now_playing.get('State', 'stop'))
|
state = _convert_state(now_playing.get('State', 'stop'))
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue