mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
dlna fixes
This commit is contained in:
parent
ec163807cf
commit
99aed936db
7 changed files with 113 additions and 57 deletions
|
@ -280,7 +280,11 @@
|
|||
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="posterItemOverlayTarget"></div>';
|
||||
html += '<div class="posterItemOverlayTarget">';
|
||||
|
||||
html += '<div class="sessionNowPlayingStreamInfo">' + DashboardPage.getSessionNowPlayingStreamInfo(connection) + '</div>';
|
||||
html += '<div class="sessionNowPlayingTime">' + DashboardPage.getSessionNowPlayingTime(connection) + '</div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
|
@ -291,6 +295,50 @@
|
|||
$('.deadSession', parentElement).remove();
|
||||
},
|
||||
|
||||
getSessionNowPlayingStreamInfo: function (session) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div>';
|
||||
|
||||
if (session.PlayState.PlayMethod == 'Transcode') {
|
||||
html += 'Transcoding';
|
||||
}
|
||||
else if (session.PlayState.PlayMethod == 'DirectStream') {
|
||||
html += 'Direct Streaming';
|
||||
}
|
||||
else if (session.PlayState.PlayMethod == 'DirectPlay') {
|
||||
html += 'Direct Playing';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getSessionNowPlayingTime: function (session) {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (session.PlayState.PositionTicks) {
|
||||
html += Dashboard.getDisplayTime(session.PlayState.PositionTicks);
|
||||
} else {
|
||||
html += '--:--:--';
|
||||
}
|
||||
|
||||
html += ' / ';
|
||||
|
||||
var nowPlayingItem = session.NowPlayingItem;
|
||||
|
||||
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
||||
html += Dashboard.getDisplayTime(nowPlayingItem.RunTimeTicks);
|
||||
} else {
|
||||
html += '--:--:--';
|
||||
}
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getAppSecondaryText: function (session) {
|
||||
|
||||
return session.ApplicationVersion;
|
||||
|
@ -405,6 +453,9 @@
|
|||
row.removeClass('playingSession');
|
||||
}
|
||||
|
||||
$('.sessionNowPlayingStreamInfo', row).html(DashboardPage.getSessionNowPlayingStreamInfo(session));
|
||||
$('.sessionNowPlayingTime', row).html(DashboardPage.getSessionNowPlayingTime(session));
|
||||
|
||||
$('.sessionUserName', row).html(DashboardPage.getUsersHtml(session));
|
||||
|
||||
$('.sessionAppSecondaryText', row).html(DashboardPage.getAppSecondaryText(session));
|
||||
|
@ -416,7 +467,7 @@
|
|||
nowPlayingInfoElem.html(nowPlayingName.html);
|
||||
nowPlayingInfoElem.attr('data-imgsrc', nowPlayingName.image || '');
|
||||
}
|
||||
|
||||
|
||||
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
||||
|
||||
var position = session.PlayState.PositionTicks || 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue