Skip to content

Commit

Permalink
Upd: adapt to dialog api change
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Jun 16, 2024
1 parent 1f4c9f7 commit 3b70962
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ListenBrainz/ListenBrainzPlaylistImport.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- {"name": "ListenBrainzPlaylistImport", "file": "ListenBrainz/ListenBrainzPlaylistImport.lua", "version": 1, "desc": "Imports generated playlists from ListenBrainz.", "order":1, "arguments":[]}
-- {"name": "ListenBrainzPlaylistImport", "file": "ListenBrainz/ListenBrainzPlaylistImport.lua", "version": 2, "desc": "Imports generated playlists from ListenBrainz.", "order":1, "arguments":[]}

local extra_headers = "Authorization: Token " .. mympd_env.var_listenbrainz_token .. "\r\n"

Expand All @@ -14,14 +14,14 @@ local function fetch_playlists()
return "Failure decoding response from ListenBrainz"
end
local values = {}
local titles = {}
local displayValues = {}
for _, playlist in pairs(playlists.playlists) do
table.insert(values, playlist.playlist.identifier)
table.insert(titles, playlist.playlist.title)
table.insert(displayValues, { title = playlist.playlist.title })
end
local data = {
{ name = "Action", type = "hidden", value = "Import" },
{ name = "Playlists", type = "list", displayValue = titles, value = values, defaultValue = "" }
{ name = "Playlists", type = "list", displayValue = displayValues, value = values, defaultValue = "" }
}
return mympd.dialog("ListenBrainz Playlists", data, "ListenBrainzPlaylistImport")
end
Expand Down
2 changes: 1 addition & 1 deletion index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Albumart/Albumart.lua":{"name":"Albumart","desc":"Fetches albumart on demand.","version":1},"Albumart/AlbumartProviders.lua":{"name":"AlbumartProviders","desc":"Albumart providers for the Albumart script.","version":1},"BatteryIndicator/BatteryIndicator.lua":{"name":"BatteryIndicator","desc":"Displays the battery status from sys filesystem.","version":1},"Channel/ChannelReadMessages.lua":{"name":"ChannelReadMessages","desc":"Reads all message from a MPD channel.","version":1},"Channel/ChannelSendMessage.lua":{"name":"ChannelSendMessage","desc":"Sends a message to a MPD channel.","version":1},"Channel/ChannelSubscribe.lua":{"name":"ChannelSubscribe","desc":"Subscribes to a MPD channel.","version":1},"Covercache/CovercachePrepopulate.lua":{"name":"CovercachePrepopulate","desc":"Prepopulates the myMPD covercache.","version":1},"Jukebox/JukeboxBlissify.lua":{"name":"JukeboxBlissify","desc":"Uses blissify-rs to populate the jukebox queue.","version":2},"Jukebox/JukeboxRandomPlaylist.lua":{"name":"JukeboxRandomPlaylist","desc":"Populates the jukebox queue with random songs from a random playlist.","version":2},"ListenBrainz/ListenBrainzFeedback.lua":{"name":"ListenBrainzFeedback","desc":"Sends feedback to ListenBrainz.","version":1},"ListenBrainz/ListenBrainzPlaylistImport.lua":{"name":"ListenBrainzPlaylistImport","desc":"Imports generated playlists from ListenBrainz.","version":1},"ListenBrainz/ListenBrainzScrobbler.lua":{"name":"ListenBrainzScrobbler","desc":"Scrobbles songs to ListenBrainz.","version":1},"ListenBrainz/ListenBrainzSetPin.lua":{"name":"ListenBrainzSetPin","desc":"Sets or unsets the pin on ListenBrainz.","version":1},"Lyrics/Lyrics.lua":{"name":"Lyrics","desc":"Fetches lyrics on demand.","version":3},"Lyrics/LyricsProviders.lua":{"name":"LyricsProviders","desc":"Lyrics providers for the Lyrics script.","version":3},"Maloja/MalojaScrobbler.lua":{"name":"MalojaScrobbler","desc":"Scrobbles songs to your Maloja server.","version":1},"Misc/EnableJukebox.lua":{"name":"EnableJukebox","desc":"Enables the jukebox with specified options.","version":1},"Misc/PlayRandomPlaylist.lua":{"name":"PlayRandomPlaylist","desc":"Plays a random playlist.","version":1},"Radiobrowser/Radiobrowser.lua":{"name":"Radiobrowser","desc":"Radiobrowser interface.","version":3},"Tagart/Tagart.lua":{"name":"Tagart","desc":"Fetches tagart on demand.","version":1},"Tagart/TagartProviders.lua":{"name":"TagartProviders","desc":"Tagart providers for the Tagart script.","version":1},"last.fm/lastfmFeedback.lua":{"name":"lastfmFeedback","desc":"Sends feedback to last.fm.","version":1},"last.fm/lastfmGetSessionKey.lua":{"name":"lastfmGetSessionKey","desc":"Fetches the session key from last.fm and sets the myMPD variable.","version":1},"last.fm/lastfmLib.lua":{"name":"lastfmLib","desc":"Library requried by the other last.fm modules.","version":1},"last.fm/lastfmPlayer.lua":{"name":"lastfmPlayer","desc":"Sends the now playing info to last.fm.","version":1},"last.fm/lastfmScrobbler.lua":{"name":"lastfmScrobbler","desc":"Scrobbles songs to last.fm.","version":1}}
{"Albumart/Albumart.lua":{"name":"Albumart","desc":"Fetches albumart on demand.","version":1},"Albumart/AlbumartProviders.lua":{"name":"AlbumartProviders","desc":"Albumart providers for the Albumart script.","version":1},"BatteryIndicator/BatteryIndicator.lua":{"name":"BatteryIndicator","desc":"Displays the battery status from sys filesystem.","version":1},"Channel/ChannelReadMessages.lua":{"name":"ChannelReadMessages","desc":"Reads all message from a MPD channel.","version":1},"Channel/ChannelSendMessage.lua":{"name":"ChannelSendMessage","desc":"Sends a message to a MPD channel.","version":1},"Channel/ChannelSubscribe.lua":{"name":"ChannelSubscribe","desc":"Subscribes to a MPD channel.","version":1},"Covercache/CovercachePrepopulate.lua":{"name":"CovercachePrepopulate","desc":"Prepopulates the myMPD covercache.","version":1},"Jukebox/JukeboxBlissify.lua":{"name":"JukeboxBlissify","desc":"Uses blissify-rs to populate the jukebox queue.","version":2},"Jukebox/JukeboxRandomPlaylist.lua":{"name":"JukeboxRandomPlaylist","desc":"Populates the jukebox queue with random songs from a random playlist.","version":2},"ListenBrainz/ListenBrainzFeedback.lua":{"name":"ListenBrainzFeedback","desc":"Sends feedback to ListenBrainz.","version":1},"ListenBrainz/ListenBrainzPlaylistImport.lua":{"name":"ListenBrainzPlaylistImport","desc":"Imports generated playlists from ListenBrainz.","version":2},"ListenBrainz/ListenBrainzScrobbler.lua":{"name":"ListenBrainzScrobbler","desc":"Scrobbles songs to ListenBrainz.","version":1},"ListenBrainz/ListenBrainzSetPin.lua":{"name":"ListenBrainzSetPin","desc":"Sets or unsets the pin on ListenBrainz.","version":1},"Lyrics/Lyrics.lua":{"name":"Lyrics","desc":"Fetches lyrics on demand.","version":3},"Lyrics/LyricsProviders.lua":{"name":"LyricsProviders","desc":"Lyrics providers for the Lyrics script.","version":3},"Maloja/MalojaScrobbler.lua":{"name":"MalojaScrobbler","desc":"Scrobbles songs to your Maloja server.","version":1},"Misc/EnableJukebox.lua":{"name":"EnableJukebox","desc":"Enables the jukebox with specified options.","version":1},"Misc/PlayRandomPlaylist.lua":{"name":"PlayRandomPlaylist","desc":"Plays a random playlist.","version":1},"Radiobrowser/Radiobrowser.lua":{"name":"Radiobrowser","desc":"Radiobrowser interface.","version":3},"Tagart/Tagart.lua":{"name":"Tagart","desc":"Fetches tagart on demand.","version":1},"Tagart/TagartProviders.lua":{"name":"TagartProviders","desc":"Tagart providers for the Tagart script.","version":1},"last.fm/lastfmFeedback.lua":{"name":"lastfmFeedback","desc":"Sends feedback to last.fm.","version":1},"last.fm/lastfmGetSessionKey.lua":{"name":"lastfmGetSessionKey","desc":"Fetches the session key from last.fm and sets the myMPD variable.","version":1},"last.fm/lastfmLib.lua":{"name":"lastfmLib","desc":"Library requried by the other last.fm modules.","version":1},"last.fm/lastfmPlayer.lua":{"name":"lastfmPlayer","desc":"Sends the now playing info to last.fm.","version":1},"last.fm/lastfmScrobbler.lua":{"name":"lastfmScrobbler","desc":"Scrobbles songs to last.fm.","version":1}}

0 comments on commit 3b70962

Please sign in to comment.