Skip to content

Commit

Permalink
Suppress individual no-non-null-assertions issues that have no simple…
Browse files Browse the repository at this point in the history
… fix
  • Loading branch information
3flex committed Oct 30, 2024
1 parent 17be9f6 commit 9ccd21a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/documentManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ export abstract class DocumentManager {
* @param item - source for the displayed name
*/
private static setDisplayName(item: BaseItemDto): void {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const name: string = item.EpisodeTitle ?? item.Name!;

let displayName: string = name;
Expand Down
1 change: 1 addition & 0 deletions src/components/maincontroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export function setSubtitleStreamIndex(

const mediaStreams = state.PlaybackMediaSource?.MediaStreams;

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const subtitleStream = getStreamByIndex(mediaStreams!, 'Subtitle', index);

if (!subtitleStream) {
Expand Down
2 changes: 2 additions & 0 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ export function createStreamInfo(
playerStartPositionTicks = startPosition ?? 0;
} else {
// TODO deal with !TranscodingUrl
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
mediaUrl = JellyfinApi.createUrl(mediaSource.TranscodingUrl!);

if (isHlsStream(mediaSource)) {
Expand Down Expand Up @@ -365,6 +366,7 @@ export function createStreamInfo(
contentType = `audio/${mediaSource.TranscodingContainer}`;

// TODO deal with !TranscodingUrl
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
mediaUrl = JellyfinApi.createUrl(mediaSource.TranscodingUrl!);
}
}
Expand Down

0 comments on commit 9ccd21a

Please sign in to comment.