Skip to content

Commit

Permalink
fix(widget: music: spotify): date
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Sep 18, 2014
1 parent 7188769 commit a1e52fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actionless/string.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function string_helpers.max_length(unicode_string, max_length)
return unicode_string
end
local result = ''
local counter = 0
local counter = 1
for uchar in string.gmatch(unicode_string, '([%z\1-\127\194-\244][\128-\191]*)') do
result = result .. uchar
counter = counter + 1
Expand Down
2 changes: 2 additions & 0 deletions actionless/widgets/music/backends/spotify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local awful = require("awful")

local async = require("actionless.async")
local h_table = require("actionless.table")
local h_string = require("actionless.string")
local parse = require("actionless.parse")

-- @TODO: change to native dbus implementation instead of calling qdbus
Expand Down Expand Up @@ -66,6 +67,7 @@ function spotify.parse_metadata(result_string, parse_status_callback)
cover_url='artUrl'
}
)
player_status.date = h_string.max_length(player_status.date, 4)
player_status.file = 'spotify stream'
h_table.merge(spotify.player_status, player_status)
parse_status_callback(spotify.player_status)
Expand Down

0 comments on commit a1e52fd

Please sign in to comment.