mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Set correct data-monitor based on type
This commit is contained in:
parent
92e88e03e0
commit
064b85d0ee
1 changed files with 10 additions and 2 deletions
|
@ -372,12 +372,20 @@ import ServerConnections from '../ServerConnections';
|
|||
function loadResume(elem, apiClient, headerText, mediaType) {
|
||||
let html = '';
|
||||
|
||||
let dataMonitor = 'data-monitor="';
|
||||
if (mediaType == 'Video') {
|
||||
dataMonitor += 'videoplayback,'
|
||||
} else if (mediaType == 'Audio') {
|
||||
dataMonitor += 'audioplayback,'
|
||||
}
|
||||
dataMonitor += 'markplayed">';
|
||||
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate(headerText) + '</h2>';
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x" data-monitor="videoplayback,markplayed">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x" ' + dataMonitor;
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right vertical-wrap focuscontainer-x" data-monitor="videoplayback,markplayed">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right vertical-wrap focuscontainer-x" '+ dataMonitor;
|
||||
}
|
||||
|
||||
if (enableScrollX()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue