Add internet radio (#1384)

This commit is contained in:
Jeff
2025-12-13 21:26:33 -08:00
committed by GitHub
parent f61d34c340
commit 7ed847fecb
46 changed files with 2229 additions and 118 deletions
@@ -0,0 +1,20 @@
import { queryOptions } from '@tanstack/react-query';
import { api } from '/@/renderer/api';
import { queryKeys } from '/@/renderer/api/query-keys';
import { QueryHookArgs } from '/@/renderer/lib/react-query';
export const radioQueries = {
list: (args: QueryHookArgs<void>) => {
return queryOptions({
gcTime: 1000 * 60 * 60,
queryFn: ({ signal }) => {
return api.controller.getInternetRadioStations({
apiClientProps: { serverId: args.serverId, signal },
});
},
queryKey: queryKeys.radio.list(args.serverId || ''),
...args.options,
});
},
};