Skip to content

Commit 2b92c98

Browse files
authored
✨ Add Tdarr integration and widget (#1882)
1 parent 39f416c commit 2b92c98

File tree

17 files changed

+1219
-4
lines changed

17 files changed

+1219
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"descriptor": {
3+
"name": "Media Transcoding",
4+
"description": "Displays information about media transcoding",
5+
"settings": {
6+
"title": "Media Transcoding Settings",
7+
"appId": {
8+
"label": "Select an app"
9+
},
10+
"defaultView": {
11+
"label": "Default view",
12+
"data": {
13+
"workers": "Workers",
14+
"queue": "Queue",
15+
"statistics": "Statistics"
16+
}
17+
},
18+
"showHealthCheck": {
19+
"label": "Show Health Check indicator"
20+
},
21+
"showHealthChecksInQueue": {
22+
"label": "Show Health Checks in queue"
23+
},
24+
"queuePageSize": {
25+
"label": "Queue: Items per page"
26+
},
27+
"showAppIcon": {
28+
"label": "Show app icon in the bottom right corner"
29+
}
30+
}
31+
},
32+
"noAppSelected": "Please select an app in the widget settings",
33+
"views": {
34+
"workers": {
35+
"table": {
36+
"header": {
37+
"name": "File",
38+
"eta": "ETA",
39+
"progress": "Progress"
40+
},
41+
"empty": "Empty",
42+
"tooltip": {
43+
"transcode": "Transcode",
44+
"healthCheck": "Health Check"
45+
}
46+
}
47+
},
48+
"queue": {
49+
"table": {
50+
"header": {
51+
"name": "File",
52+
"size": "Size"
53+
},
54+
"footer": {
55+
"currentIndex": "{{start}}-{{end}} of {{total}}"
56+
},
57+
"empty": "Empty",
58+
"tooltip": {
59+
"transcode": "Transcode",
60+
"healthCheck": "Health Check"
61+
}
62+
}
63+
},
64+
"statistics": {
65+
"empty": "Empty",
66+
"box": {
67+
"transcodes": "Transcodes: {{value}}",
68+
"healthChecks": "Health Checks: {{value}}",
69+
"files": "Files: {{value}}",
70+
"spaceSaved": "Saved: {{value}}"
71+
},
72+
"pies": {
73+
"transcodes": "Transcodes",
74+
"healthChecks": "Health Checks",
75+
"videoCodecs": "Codecs",
76+
"videoContainers": "Containers",
77+
"videoResolutions": "Resolutions"
78+
}
79+
}
80+
},
81+
"error": {
82+
"title": "Error",
83+
"message": "An error occurred while fetching data from Tdarr."
84+
},
85+
"tabs": {
86+
"workers": "Workers",
87+
"queue": "Queue",
88+
"statistics": "Statistics"
89+
},
90+
"healthCheckStatus": {
91+
"title": "Health Check",
92+
"queued": "Queued",
93+
"healthy": "Healthy",
94+
"unhealthy": "Unhealthy"
95+
}
96+
}

src/components/Board/Customize/Appearance/AppearanceCustomization.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ import { useTranslation } from 'next-i18next';
1616
import { highlight, languages } from 'prismjs';
1717
import Editor from 'react-simple-code-editor';
1818
import { useColorTheme } from '~/tools/color';
19-
import { BackgroundImageAttachment, BackgroundImageRepeat, BackgroundImageSize } from '~/types/settings';
19+
import {
20+
BackgroundImageAttachment,
21+
BackgroundImageRepeat,
22+
BackgroundImageSize,
23+
} from '~/types/settings';
2024

2125
import { useBoardCustomizationFormContext } from '../form';
2226

src/components/Dashboard/Modals/EditAppModal/Tabs/IntegrationTab/Components/InputElements/IntegrationSelector.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,10 @@ export const availableIntegrations = [
202202
value: 'proxmox',
203203
image: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/proxmox.png',
204204
label: 'Proxmox',
205+
},
206+
{
207+
value: 'tdarr',
208+
image: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/tdarr.png',
209+
label: 'Tdarr',
205210
}
206211
] as const satisfies Readonly<SelectItem[]>;

src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const WidgetsEditModal = ({
8585

8686
return (
8787
<Stack>
88-
{items.map(([key, _], index) => {
88+
{items.map(([key], index) => {
8989
const option = (currentWidgetDefinition as any).options[key] as IWidgetOptionValue;
9090
const value = moduleProperties[key] ?? option.defaultValue;
9191

@@ -395,6 +395,7 @@ const WidgetOptionTypeSwitch: FC<{
395395
</Flex>
396396
</Stack>
397397
);
398+
398399
/* eslint-enable no-case-declarations */
399400
default:
400401
return null;

src/components/Dashboard/Tiles/Widgets/WidgetsMenu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => {
6363
const handleEditClick = () => {
6464
openContextModalGeneric<WidgetEditModalInnerProps>({
6565
modal: 'integrationOptions',
66-
title: <Title order={4}>{t('descriptor.settings.title')}</Title>,
66+
title: t('descriptor.settings.title'),
6767
innerProps: {
6868
widgetId: widget.id,
6969
widgetType: integration,

src/server/api/root.ts

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { smartHomeEntityStateRouter } from './routers/smart-home/entity-state';
2222
import { usenetRouter } from './routers/usenet/router';
2323
import { userRouter } from './routers/user';
2424
import { weatherRouter } from './routers/weather';
25+
import { tdarrRouter } from '~/server/api/routers/tdarr';
2526

2627
/**
2728
* This is the primary router for your server.
@@ -51,6 +52,7 @@ export const rootRouter = createTRPCRouter({
5152
notebook: notebookRouter,
5253
smartHomeEntityState: smartHomeEntityStateRouter,
5354
healthMonitoring: healthMonitoringRouter,
55+
tdarr: tdarrRouter,
5456
});
5557

5658
// export type definition of API

0 commit comments

Comments
 (0)