mirror of
https://github.com/powerline/powerline.git
synced 2025-07-26 23:35:04 +02:00
Fixing some metadata and time calculation for mocp player
This commit is contained in:
parent
8a5310806f
commit
b82769ad4b
@ -559,7 +559,7 @@ class MocPlayerSegment(PlayerSegment):
|
|||||||
if not now_playing_str:
|
if not now_playing_str:
|
||||||
return
|
return
|
||||||
ignore_info = (
|
ignore_info = (
|
||||||
'File', 'TimeLeft', 'TotalSec', 'Title',
|
'File', 'TimeLeft', 'Title',
|
||||||
'Bitrate', 'AvgBitrate', 'Rate'
|
'Bitrate', 'AvgBitrate', 'Rate'
|
||||||
)
|
)
|
||||||
now_playing = dict(
|
now_playing = dict(
|
||||||
@ -572,9 +572,9 @@ class MocPlayerSegment(PlayerSegment):
|
|||||||
'state': state,
|
'state': state,
|
||||||
'album': now_playing.get('Album'),
|
'album': now_playing.get('Album'),
|
||||||
'artist': now_playing.get('Artist'),
|
'artist': now_playing.get('Artist'),
|
||||||
'title': now_playing.get('Title'),
|
'title': now_playing.get('SongTitle'),
|
||||||
'elapsed': _convert_seconds(now_playing.get('CurrentTime', 0)),
|
'elapsed': _convert_seconds(now_playing.get('CurrentSec', 0)),
|
||||||
'total': _convert_seconds(now_playing.get('TotalTime', 0)),
|
'total': _convert_seconds(now_playing.get('TotalSec', 0)),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user