mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-19 00:37:22 +01:00
Added Dynamic API loader framework for Emby/Jellyfin switching, Emby API is still WIP, DO NOT USE as per #133 Reworked ome pages for correct url mapping of emby external links Added IS_JELLYFIN flag to config endpoint to indicate if server is displaying Emby or Jellyfin Data Fix for #218 Require Login set to false still displays Login Page until reload New feat: Grouped Recently added Episodes under Seasons and Episode count on Home page. Toggle to revert back to ugrouped display will be added later Added middleware to infer param types in API to simplify value checks, eg bool or numeric parameters
14 lines
310 B
JavaScript
14 lines
310 B
JavaScript
const JellyfinAPI = require("./jellyfin-api");
|
|
const EmbyAPI = require("./emby-api");
|
|
|
|
function API() {
|
|
const USE_EMBY_API = (process.env.IS_EMBY_API || "false").toLowerCase() === "true";
|
|
if (USE_EMBY_API) {
|
|
return new EmbyAPI();
|
|
} else {
|
|
return new JellyfinAPI();
|
|
}
|
|
}
|
|
|
|
module.exports = API();
|