1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

rework EnableMediaPlayback

This commit is contained in:
Luke Pulverenti 2014-02-21 00:35:56 -05:00
parent 22f629080c
commit b16f98ce9f
3 changed files with 5 additions and 5 deletions

View file

@ -54,7 +54,7 @@
$('#playExternalButtonContainer', page).hide(); $('#playExternalButtonContainer', page).hide();
} }
if (item.LocalTrailerCount && item.LocationType !== "Offline" && user.Configuration.EnableMediaPlayback) { if (item.LocalTrailerCount && item.LocationType !== "Offline" && item.PlayAccess == 'Full') {
$('#trailerButtonContainer', page).show(); $('#trailerButtonContainer', page).show();
} else { } else {
$('#trailerButtonContainer', page).hide(); $('#trailerButtonContainer', page).hide();
@ -823,7 +823,7 @@
var chapter = chapters[i]; var chapter = chapters[i];
var chapterName = chapter.Name || "Chapter " + i; var chapterName = chapter.Name || "Chapter " + i;
var onclick = user.Configuration.EnableMediaPlayback ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : ''; var onclick = item.PlayAccess == 'Full' ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : '';
html += '<a class="posterItem smallBackdropPosterItem" href="#play-Chapter-' + i + '"' + onclick + '>'; html += '<a class="posterItem smallBackdropPosterItem" href="#play-Chapter-' + i + '"' + onclick + '>';
@ -952,7 +952,7 @@
var href = "itemdetails.html?id=" + item.Id; var href = "itemdetails.html?id=" + item.Id;
var onclick = user.Configuration.EnableMediaPlayback ? ' onclick="MediaPlayer.playById(\'' + item.Id + '\'); return false;"' : ""; var onclick = item.PlayAccess == 'Full' ? ' onclick="MediaPlayer.playById(\'' + item.Id + '\'); return false;"' : "";
html += '<a class="' + cssClass + '" href="' + href + '"' + onclick + '>'; html += '<a class="' + cssClass + '" href="' + href + '"' + onclick + '>';

View file

@ -2561,7 +2561,7 @@
} }
} }
if (item.LocalTrailerCount && currentUser.Configuration.EnableMediaPlayback) { if (item.LocalTrailerCount && item.PlayAccess == 'Full') {
html += '<button type="button" data-mini="true" data-inline="true" data-icon="video" data-iconpos="notext" class="btnPlayTrailer" data-itemid="' + item.Id + '" title="Play Trailer" style="' + buttonMargin + '">Play Trailer</button>'; html += '<button type="button" data-mini="true" data-inline="true" data-icon="video" data-iconpos="notext" class="btnPlayTrailer" data-itemid="' + item.Id + '" title="Play Trailer" style="' + buttonMargin + '">Play Trailer</button>';
buttonCount++; buttonCount++;
} }

View file

@ -1009,7 +1009,7 @@
self.canPlay = function (item, user) { self.canPlay = function (item, user) {
if (!user.Configuration.EnableMediaPlayback) { if (item.PlayAccess != 'Full') {
return false; return false;
} }