-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor media session to playback subscriber #6271
Refactor media session to playback subscriber #6271
Conversation
Quality Gate passedIssues Measures |
Cloudflare Pages deployment
|
const album = item.Album || undefined; | ||
const names = nowplayinghelper.getNowPlayingNames(item); | ||
const artist = names[names.length - 1].text; | ||
const title = names.length === 1 ? undefined : names[0].text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition is unnecessary? If you use nullish coalescing, text will be undefined if the index doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call... I tend to forget about using nullish coalescing when accessing by index. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also see that you guys don't have https://www.typescriptlang.org/tsconfig/#noUncheckedIndexedAccess enabled, which in these cases it's a life saver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice! I will enable that in a separate PR because it introduced 70 errors. 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lucky you, I had a bunch of errors in Vue when I enabled it!
|
||
return ServerConnections.getApiClient(item.ServerId).getScaledImageUrl(item.SeriesId, options); | ||
} | ||
if (item.ParentThumbItemId && item.ParentThumbImageTag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank link between these two if blocks. All other conditionals have a blank line between blocks.
Quality Gate passedIssues Measures |
Changes
Issues
N/A