Replace startScan (full library refresh) with refreshItem (individual item refresh) for jellyfin metadata editing

This commit is contained in:
ChrisScott9456
2026-06-28 20:19:12 -04:00
parent aa12585b20
commit 56f05ddafc
7 changed files with 32 additions and 29 deletions
@@ -1931,17 +1931,18 @@ export const JellyfinController: InternalControllerEndpoint = {
return null;
},
startScan: async (args) => {
const { apiClientProps } = args;
refreshItems: async (args) => {
const { apiClientProps, query } = args;
const res = await jfApiClient(apiClientProps).startScan({
body: null,
query: {},
});
if (res.status !== 204) {
throw new Error('Failed to start scan');
}
await Promise.all(
query.ids.map((id) =>
jfApiClient(apiClientProps).refreshItem({
body: null,
params: { id },
query: { MetadataRefreshMode: 'FullRefresh' },
}),
),
);
return null;
},