add scan listener and query invalidation on tag editor save

This commit is contained in:
jeffvli
2026-07-19 21:03:13 -07:00
parent e62242824d
commit 173efa9bfd
17 changed files with 326 additions and 5 deletions
@@ -1355,6 +1355,22 @@ export const SubsonicController: InternalControllerEndpoint = {
final.splice(0, 0, { label: 'all artists', value: '' });
return final;
},
getScanStatus: async (args) => {
const { apiClientProps } = args;
const res = await ssApiClient(apiClientProps).getScanStatus({ query: {} });
if (res.status !== 200) {
throw new Error('Failed to get scan status');
}
return {
count: res.body.scanStatus.count,
folderCount: res.body.scanStatus.folderCount,
lastScan: res.body.scanStatus.lastScan,
scanning: res.body.scanStatus.scanning,
};
},
getServerInfo: async (args) => {
const { apiClientProps } = args;