@@ -29,7 +29,7 @@ function playerctl:cmd(cmd)
29
29
end
30
30
31
31
function playerctl :watch (timeout , callback , widget )
32
- local cmd = self :cmd (" -f '{{status}};{{xesam:artist}};{{xesam:title}};{{mpris:artUrl}};{{position}};{{mpris:length}};{{album}}' metadata" )
32
+ local cmd = self :cmd (" -f '{{status}};{{xesam:artist}};{{xesam:title}};{{mpris:artUrl}};{{position}};{{mpris:length}};{{album}};{{xesam:contentCreated}} ' metadata" )
33
33
34
34
self .watch_params = {timeout = timeout , callback = callback , widget = widget }
35
35
@@ -50,6 +50,7 @@ function playerctl:watch(timeout, callback, widget)
50
50
position = position ,
51
51
length = length ,
52
52
album = words [7 ],
53
+ year = string.sub (words [8 ], 0 , 4 ),
53
54
progress = progress ,
54
55
}
55
56
@@ -238,14 +239,13 @@ local function worker(user_args)
238
239
local metadata_widget = wibox .widget {
239
240
widget = wibox .widget .textbox ,
240
241
font = font ,
241
- forced_height = 100 ,
242
242
forced_width = popup_width ,
243
243
}
244
244
245
245
local update_metadata = function (meta )
246
246
artist_widget :set_text (meta .artist )
247
247
title_widget :set_text (meta .current_song )
248
- metadata_widget :set_text (string.format (' %s - %s (%s/%s)' , meta .album , meta .current_song , duration (meta .position ), duration (meta .length )))
248
+ metadata_widget :set_text (string.format (' %s (%s) \n %s (%s/%s)' , meta .album , meta . year , meta .current_song , duration (meta .position ), duration (meta .length )))
249
249
progress_widget .value = meta .progress
250
250
251
251
-- poor man's urldecode
0 commit comments