mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-02 21:43:39 +01:00
add Jellyfin integration
This commit is contained in:
parent
7647d8eb4e
commit
1141401e56
@ -7,6 +7,7 @@ import Nzbget from "./widgets/service/nzbget";
|
|||||||
import Docker from "./widgets/service/docker";
|
import Docker from "./widgets/service/docker";
|
||||||
import Pihole from "./widgets/service/pihole";
|
import Pihole from "./widgets/service/pihole";
|
||||||
import Rutorrent from "./widgets/service/rutorrent";
|
import Rutorrent from "./widgets/service/rutorrent";
|
||||||
|
import Jellyfin from "./widgets/service/jellyfin";
|
||||||
|
|
||||||
const widgetMappings = {
|
const widgetMappings = {
|
||||||
docker: Docker,
|
docker: Docker,
|
||||||
@ -15,6 +16,7 @@ const widgetMappings = {
|
|||||||
ombi: Ombi,
|
ombi: Ombi,
|
||||||
portainer: Portainer,
|
portainer: Portainer,
|
||||||
emby: Emby,
|
emby: Emby,
|
||||||
|
jellyfin: Jellyfin,
|
||||||
nzbget: Nzbget,
|
nzbget: Nzbget,
|
||||||
pihole: Pihole,
|
pihole: Pihole,
|
||||||
rutorrent: Rutorrent,
|
rutorrent: Rutorrent,
|
||||||
|
@ -3,7 +3,7 @@ import useSWR from "swr";
|
|||||||
import Widget from "../widget";
|
import Widget from "../widget";
|
||||||
import Block from "../block";
|
import Block from "../block";
|
||||||
|
|
||||||
export default function Emby({ service }) {
|
export default function Emby({ service, title = "Emby" }) {
|
||||||
const config = service.widget;
|
const config = service.widget;
|
||||||
|
|
||||||
function buildApiUrl(endpoint) {
|
function buildApiUrl(endpoint) {
|
||||||
@ -16,7 +16,7 @@ export default function Emby({ service }) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (sessionsError) {
|
if (sessionsError) {
|
||||||
return <Widget error="Emby API Error" />;
|
return <Widget error={`${title} API Error`} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sessionsData) {
|
if (!sessionsData) {
|
||||||
|
6
src/components/services/widgets/service/jellyfin.jsx
Normal file
6
src/components/services/widgets/service/jellyfin.jsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import Emby from "./emby";
|
||||||
|
|
||||||
|
// Jellyfin and Emby share the same API, so proxy the Emby widget to Jellyfin.
|
||||||
|
export default function Jellyfin({ service }) {
|
||||||
|
return <Emby service={service} title="Jellyfin" />;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user