Skip to content

Commit

Permalink
Migrate reportDeviceCapabilities to jellyfin-sdk-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Nov 7, 2024
1 parent a5db014 commit 43ed14b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/components/maincontroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {
MediaStream,
MediaSourceInfo
} from '@jellyfin/sdk/lib/generated-client';
import { getSessionApi } from '@jellyfin/sdk/lib/utils/api';
import {
getCurrentPositionTicks,
getReportingParams,
Expand Down Expand Up @@ -268,19 +269,15 @@ export async function reportDeviceCapabilities(): Promise<void> {
enableHls: true
});

const capabilities = {
DeviceProfile: deviceProfile,
PlayableMediaTypes: ['Audio', 'Video'],
SupportsMediaControl: true,
SupportsPersistentIdentifier: false
};

hasReportedCapabilities = true;

return JellyfinApi.authAjax('Sessions/Capabilities/Full', {
contentType: 'application/json',
data: JSON.stringify(capabilities),
type: 'POST'
await getSessionApi(JellyfinApi.jellyfinApi).postFullCapabilities({
clientCapabilitiesDto: {
DeviceProfile: deviceProfile,
PlayableMediaTypes: ['Audio', 'Video'],
SupportsMediaControl: true,
SupportsPersistentIdentifier: false
}
});
}

Expand Down

0 comments on commit 43ed14b

Please sign in to comment.