check authentication for all servers on initialization and update permission roles

This commit is contained in:
jeffvli
2025-12-07 17:53:26 -08:00
parent 4ddada1fe3
commit c82762a3fc
10 changed files with 283 additions and 44 deletions
@@ -1127,6 +1127,25 @@ export const JellyfinController: InternalControllerEndpoint = {
totalRecordCount: res.body.TotalRecordCount,
};
},
getUserInfo: async (args) => {
const { apiClientProps, query } = args;
const res = await jfApiClient(apiClientProps).getUser({
params: {
id: query.id,
},
});
if (res.status !== 200) {
throw new Error('Failed to get user info');
}
return {
id: res.body.Id,
isAdmin: Boolean(res.body.Policy.IsAdministrator),
name: res.body.Name,
};
},
movePlaylistItem: async (args) => {
const { apiClientProps, query } = args;