mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #2914 from jellyfin/player-not-found
Show error if player not found
This commit is contained in:
commit
d2519ca5c6
2 changed files with 14 additions and 1 deletions
|
@ -2154,7 +2154,7 @@ class PlaybackManager {
|
||||||
}, onInterceptorRejection);
|
}, onInterceptorRejection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onInterceptorRejection() {
|
function cancelPlayback() {
|
||||||
const player = self._currentPlayer;
|
const player = self._currentPlayer;
|
||||||
|
|
||||||
if (player) {
|
if (player) {
|
||||||
|
@ -2163,7 +2163,10 @@ class PlaybackManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
Events.trigger(self, 'playbackcancelled');
|
Events.trigger(self, 'playbackcancelled');
|
||||||
|
}
|
||||||
|
|
||||||
|
function onInterceptorRejection() {
|
||||||
|
cancelPlayback();
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2239,6 +2242,15 @@ class PlaybackManager {
|
||||||
promise = Promise.resolve();
|
promise = Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!player) {
|
||||||
|
return promise.then(() => {
|
||||||
|
cancelPlayback();
|
||||||
|
loading.hide();
|
||||||
|
console.error(`No player found for the requested media: ${item.Url}`);
|
||||||
|
showPlaybackInfoErrorMessage(self, 'ErrorPlayerNotFound');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!isServerItem(item) || item.MediaType === 'Book') {
|
if (!isServerItem(item) || item.MediaType === 'Book') {
|
||||||
return promise.then(function () {
|
return promise.then(function () {
|
||||||
const streamInfo = createStreamInfoFromUrlItem(item);
|
const streamInfo = createStreamInfoFromUrlItem(item);
|
||||||
|
|
|
@ -243,6 +243,7 @@
|
||||||
"ErrorDefault": "There was an error processing the request. Please try again later.",
|
"ErrorDefault": "There was an error processing the request. Please try again later.",
|
||||||
"ErrorDeletingItem": "There was an error deleting the item from the server. Please check that Jellyfin has write access to the media folder and try again.",
|
"ErrorDeletingItem": "There was an error deleting the item from the server. Please check that Jellyfin has write access to the media folder and try again.",
|
||||||
"ErrorGettingTvLineups": "There was an error downloading TV lineups. Please ensure your information is correct and try again.",
|
"ErrorGettingTvLineups": "There was an error downloading TV lineups. Please ensure your information is correct and try again.",
|
||||||
|
"ErrorPlayerNotFound": "No player found for the requested media.",
|
||||||
"ErrorPleaseSelectLineup": "Please select a lineup and try again. If no lineups are available, then please check that your username, password, and postal code is correct.",
|
"ErrorPleaseSelectLineup": "Please select a lineup and try again. If no lineups are available, then please check that your username, password, and postal code is correct.",
|
||||||
"ErrorSavingTvProvider": "There was an error saving the TV provider. Please ensure it is accessible and try again.",
|
"ErrorSavingTvProvider": "There was an error saving the TV provider. Please ensure it is accessible and try again.",
|
||||||
"ErrorStartHourGreaterThanEnd": "End time must be greater than the start time.",
|
"ErrorStartHourGreaterThanEnd": "End time must be greater than the start time.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue