fix jellyfin and add new endpoint
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { app, globalConfig } from "../index.js"
|
||||
import { queryLastfm } from "../liberals/libnowplaying.js"
|
||||
import { queryLastfm, queryJellyfin } from "../liberals/libnowplaying.js"
|
||||
|
||||
var timeSinceLastLastfmQuery = Date.now()-5000
|
||||
var cachedLastfmResult = {}
|
||||
@@ -23,4 +23,12 @@ app.get("/api/nowplaying", (rreq,rres) => {
|
||||
|
||||
})
|
||||
|
||||
app.get("/api/nowplayingbeta", (rreq,rres) => {
|
||||
|
||||
queryJellyfin().then(response => {
|
||||
rres.send(response[rreq.query.format] ?? response.json)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
export {app}
|
||||
Reference in New Issue
Block a user