mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
Add queue endpoint.
This commit is contained in:
parent
067669d62b
commit
a23319bf00
@ -7,6 +7,7 @@ require 'cgi'
|
|||||||
|
|
||||||
require './models/album'
|
require './models/album'
|
||||||
require './models/artist'
|
require './models/artist'
|
||||||
|
require './models/song'
|
||||||
|
|
||||||
class MPDClient < Sinatra::Base
|
class MPDClient < Sinatra::Base
|
||||||
register Sinatra::Namespace
|
register Sinatra::Namespace
|
||||||
@ -33,6 +34,10 @@ class MPDClient < Sinatra::Base
|
|||||||
JSON Artist.all.map(&:to_h)
|
JSON Artist.all.map(&:to_h)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get '/queue' do
|
||||||
|
JSON Song.queue.map(&:to_h)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user