mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-04 14:32:15 +08:00
add Jellyfin integration
This commit is contained in:
@@ -3,7 +3,7 @@ import useSWR from "swr";
|
||||
import Widget from "../widget";
|
||||
import Block from "../block";
|
||||
|
||||
export default function Emby({ service }) {
|
||||
export default function Emby({ service, title = "Emby" }) {
|
||||
const config = service.widget;
|
||||
|
||||
function buildApiUrl(endpoint) {
|
||||
@@ -16,7 +16,7 @@ export default function Emby({ service }) {
|
||||
});
|
||||
|
||||
if (sessionsError) {
|
||||
return <Widget error="Emby API Error" />;
|
||||
return <Widget error={`${title} API Error`} />;
|
||||
}
|
||||
|
||||
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" />;
|
||||
}
|
||||
Reference in New Issue
Block a user