mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
refresh home page after video playback
This commit is contained in:
parent
18037a5943
commit
c651a45dea
3 changed files with 38 additions and 4 deletions
|
@ -249,15 +249,25 @@
|
|||
pageIdOn('pageshowready', "indexPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$(MediaController).on('playbackstop', onPlaybackStop);
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforehide', "indexPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$(MediaController).off('playbackstop', onPlaybackStop);
|
||||
});
|
||||
|
||||
function onPlaybackStop(e, state) {
|
||||
|
||||
if (state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
||||
var page = $($.mobile.activePage)[0];
|
||||
var pages = page.querySelector('neon-animated-pages');
|
||||
|
||||
$(pages).trigger('tabchange');
|
||||
}
|
||||
}
|
||||
|
||||
function getDisplayPreferences(key, userId) {
|
||||
|
||||
return ApiClient.getDisplayPreferences(key, userId, AppSettings.displayPreferencesKey()).done(function (result) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue