Skip to content

Commit

Permalink
Upd: use all tag values
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Sep 9, 2024
1 parent 91f113b commit f9b5a7c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Playcounts/TagPlaycounts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ then
end

for tag in string.gmatch(mympd_arguments.tags, "[^,]+") do
if mympd_state.current_song[tag] and mympd_state.current_song[tag][1]
if mympd_state.current_song[tag]
then
mympd.api("MYMPD_API_STICKER_INC", {
uri = mympd_state.current_song[tag][1],
type = tag,
name = "playCount"
})
for _, v in pairs(mympd_state.current_song[tag]) do
mympd.api("MYMPD_API_STICKER_INC", {
uri = v,
type = tag,
name = "playCount"
})
end
end
end

0 comments on commit f9b5a7c

Please sign in to comment.