mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-22 02:16:39 +02:00
Replace startScan (full library refresh) with refreshItem (individual item refresh) for jellyfin metadata editing
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user