mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support resume in hover menus
This commit is contained in:
parent
b1cba70ffd
commit
35e37c8027
2 changed files with 8 additions and 3 deletions
|
@ -2547,7 +2547,11 @@
|
||||||
var buttonCount = 0;
|
var buttonCount = 0;
|
||||||
|
|
||||||
if (MediaPlayer.canPlay(item)) {
|
if (MediaPlayer.canPlay(item)) {
|
||||||
html += '<button type="button" data-mini="true" data-inline="true" data-icon="play" data-iconpos="notext" title="Play" onclick="MediaPlayer.playById(\'' + item.Id + '\');return false;" style="' + buttonMargin + '">Play</button>';
|
|
||||||
|
var resumePosition = (item.UserData || {}).PlaybackPositionTicks || 0;
|
||||||
|
var onPlayClick = 'LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'' + item.Type + '\', \'' + item.MediaType + '\', ' + resumePosition + ');return false;';
|
||||||
|
|
||||||
|
html += '<button type="button" data-mini="true" data-inline="true" data-icon="play" data-iconpos="notext" title="Play" onclick="' + onPlayClick + '" style="' + buttonMargin + '">Play</button>';
|
||||||
buttonCount++;
|
buttonCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
|
|
||||||
var service = liveTvInfo.Services.filter(function (s) {
|
var service = liveTvInfo.Services.filter(function (s) {
|
||||||
return s.Name == liveTvInfo.ActiveServiceName;
|
return s.Name == liveTvInfo.ActiveServiceName;
|
||||||
})[0];
|
|
||||||
|
})[0] || {};
|
||||||
|
|
||||||
if (service.HomePageUrl) {
|
if (service.HomePageUrl) {
|
||||||
$('#activeServiceName', page).html('<a href="' + service.HomePageUrl + '" target="_blank">' + liveTvInfo.ActiveServiceName + '</a>').trigger('create');
|
$('#activeServiceName', page).html('<a href="' + service.HomePageUrl + '" target="_blank">' + liveTvInfo.ActiveServiceName + '</a>').trigger('create');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue