Merge pull request #5438 from thornbill/fix-undefined-now-playing
Fix playback errors
This commit is contained in:
@@ -628,7 +628,7 @@ function onPlaybackStart(e, state) {
|
||||
console.debug('nowplaying event: ' + e.type);
|
||||
const player = this;
|
||||
|
||||
isAudio = state.NowPlayingItem.Type === 'Audio';
|
||||
isAudio = state.NowPlayingItem?.Type === 'Audio';
|
||||
|
||||
onStateChanged.call(player, e, state);
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ const ItemsContainer: FC<ItemsContainerProps> = ({
|
||||
);
|
||||
|
||||
const onPlaybackStopped = useCallback(
|
||||
(_e: Event, apiClient, stopInfo) => {
|
||||
(_e: Event, stopInfo) => {
|
||||
const state = stopInfo.state;
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user