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

add basic open subtitle configuration

This commit is contained in:
Luke Pulverenti 2014-05-07 14:38:50 -04:00
parent 3b5259ce8e
commit 746a467d6a
20 changed files with 420 additions and 241 deletions

View file

@ -8,9 +8,10 @@
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<p> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a data-role="button" data-icon="arrow-l" data-inline="true" data-mini="true" data-theme="b" href="plugincatalog.html">Plugin Catalog</a> <a href="plugins.html" data-role="button">${TabMyPlugins}</a>
</p> <a href="plugincatalog.html" data-role="button" class="ui-btn-active">${TabCatalog}</a>
</div>
<form class="addPluginForm"> <form class="addPluginForm">
<p id="tagline" style="font-style: italic;"></p> <p id="tagline" style="font-style: italic;"></p>
<p id="pPreviewImage" style="text-align: center; margin: 2em 0;"></p> <p id="pPreviewImage" style="text-align: center; margin: 2em 0;"></p>

View file

@ -28,7 +28,7 @@
.listHeader { .listHeader {
margin-top: .5em; margin-top: .5em;
margin-bottom: .2em; margin-bottom: .2em;
padding-left: 7px; padding-left: 4px;
} }
.ehsContent { .ehsContent {
@ -1070,3 +1070,85 @@ a.itemTag:hover {
width: 300px; width: 300px;
} }
} }
.spotlight {
position: absolute;
left: -220px;
right: 0;
background-size: cover;
background-position: center 25%;
background-repeat: no-repeat;
}
.spotlight, .spotlightPlaceHolder {
height: 340px;
}
.spotlightContainer {
min-height: 340px;
}
.spotlightPlaceHolder {
margin-bottom: 3em;
}
.spotlightTitle {
margin: 1em 0 .3em;
}
.spotlightContent {
position: absolute;
top: 60px;
bottom: 55px;
left: 210px;
width: 600px;
background: rgba(0,0,0,.6);
border-radius: 5px;
}
.rightSpotlightContent {
left: initial;
width: 400px;
right: 100px;
}
.spotlightPoster {
height: 100%;
background-size: 150px 100%;
background-position: left center;
background-repeat: no-repeat;
overflow: hidden;
}
.rightSpotlightContent .spotlightPoster {
background-size: 100% 180px;
background-position: center top;
}
.spotlightContentInner {
padding: 1em 1em 1em 170px;
}
.spotlightContentInner p {
max-height: 130px;
overflow: hidden;
text-overflow: ellipsis;
}
.rightSpotlightContent .spotlightContentInner {
padding: 195px 1em 1em 1em;
}
@media all and (max-height: 1079px) and (max-width: 1400px) {
.spotlight, .spotlightPlaceHolder, .spotlightTitle {
display: none;
}
}
@media all and (min-height: 1079px) and (min-width: 1400px) {
.type-home {
overflow-x: visible!important;
}
}

View file

@ -1,24 +1,20 @@
.libraryPage { .libraryPage {
padding-top: 54px !important; padding-top: 53px !important;
} }
.libraryPage:not(.metadataEditorPage):not(.noSecondaryNavPage) { .libraryPage:not(.metadataEditorPage):not(.noSecondaryNavPage) {
padding-top: 97px !important; padding-top: 102px !important;
} }
.desktopLibraryMenu { .desktopLibraryMenu {
position: fixed; position: fixed;
left: 0; left: 0;
z-index: 1001; z-index: 1001;
top: 54px; top: 53px;
background-color: #181818; width: 200px;
width: 180px;
min-height: 100px; min-height: 100px;
border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;
padding-bottom: 10px; padding-bottom: 10px;
}
.itemDetailPage .desktopLibraryMenu {
background-color: rgba(0,0,0,.6); background-color: rgba(0,0,0,.6);
} }
@ -42,6 +38,9 @@
background: #000; background: #000;
padding: 3px .25em 3px 1em; padding: 3px .25em 3px 1em;
border-bottom: 1px solid #101010; border-bottom: 1px solid #101010;
border-top: 0;
border-left: 0;
border-right: 0;
} }
.viewMenuLink { .viewMenuLink {
@ -165,15 +164,15 @@
} }
.libraryViewNav { .libraryViewNav {
height: 42px; height: 48px;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #333; border-bottom: 1px solid #222;
position: fixed; position: fixed;
right: 0; right: 0;
left: 0; left: 0;
top: 54px; top: 53px;
z-index: 1000; z-index: 1000;
background-color: #252525; background-color: #181818;
} }
.libraryViewNavInner { .libraryViewNavInner {
@ -182,7 +181,7 @@
white-space: nowrap; white-space: nowrap;
padding: 0 0 0; padding: 0 0 0;
overflow-x: auto; overflow-x: auto;
height: 55px; height: 61px;
} }
.libraryViewNav .ui-btn-active .libraryViewNavLinkContent { .libraryViewNav .ui-btn-active .libraryViewNavLinkContent {
@ -207,7 +206,7 @@
.libraryViewNavLinkContent { .libraryViewNavLinkContent {
border-bottom: 5px solid transparent; border-bottom: 5px solid transparent;
display: inline-block; display: inline-block;
padding: 0 1em 7px; padding: 2px 1em 11px;
color: #ddd; color: #ddd;
} }
@ -229,7 +228,7 @@
} }
.libraryPage:not(.itemDetailPage):not(.metadataEditorPage) { .libraryPage:not(.itemDetailPage):not(.metadataEditorPage) {
left: 195px !important; left: 215px !important;
width: auto !important; width: auto !important;
right: 0 !important; right: 0 !important;
} }

View file

@ -119,6 +119,11 @@ pre, textarea.pre {
color: #1B58B8; color: #1B58B8;
} }
/* Bring these jqm font sizes down a little bit */
.ui-controlgroup-controls label {
font-size: 14px;
}
.hide { .hide {
display: none; display: none;
} }

View file

@ -46,7 +46,7 @@
<input type="number" id="txtDownMixAudioBoost" pattern="[0-9]*" required="required" min=".5" max="3" step=".1" data-mini="true" /> <input type="number" id="txtDownMixAudioBoost" pattern="[0-9]*" required="required" min=".5" max="3" step=".1" data-mini="true" />
<div class="fieldDescription">${LabelDownMixAudioScaleHelp}</div> <div class="fieldDescription">${LabelDownMixAudioScaleHelp}</div>
</li> </li>
<li> <li style="display:none;">
<input type="checkbox" id="chkAllowUpscaling" name="chkAllowUpscaling" data-mini="true" /> <input type="checkbox" id="chkAllowUpscaling" name="chkAllowUpscaling" data-mini="true" />
<label for="chkAllowUpscaling">${OptionUpscaling}</label> <label for="chkAllowUpscaling">${OptionUpscaling}</label>
<div class="fieldDescription">${OptionUpscalingHelp}</div> <div class="fieldDescription">${OptionUpscalingHelp}</div>

View file

@ -21,6 +21,8 @@
<div id="recentlyAddedItems"> <div id="recentlyAddedItems">
</div> </div>
<div class="spotlightContainer"></div>
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -4,7 +4,7 @@
<title>${TitleMetadata}</title> <title>${TitleMetadata}</title>
</head> </head>
<body> <body>
<div id="metadataConfigurationPage" data-role="page" class="page type-interior"> <div id="metadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage">
<div data-role="content"> <div data-role="content">
@ -16,6 +16,7 @@
<a href="metadataimages.html?type=games" data-role="button">${TabGames}</a> <a href="metadataimages.html?type=games" data-role="button">${TabGames}</a>
<a href="metadataimages.html?type=music" data-role="button">${TabMusic}</a> <a href="metadataimages.html?type=music" data-role="button">${TabMusic}</a>
<a href="metadataimages.html?type=others" data-role="button">${TabOthers}</a> <a href="metadataimages.html?type=others" data-role="button">${TabOthers}</a>
<a href="metadatasubtitles.html" data-role="button">${TabSubtitles}</a>
<a href="metadataadvanced.html" data-role="button">${TabAdvanced}</a> <a href="metadataadvanced.html" data-role="button">${TabAdvanced}</a>
</div> </div>

View file

@ -4,7 +4,7 @@
<title>${TitleMetadata}</title> <title>${TitleMetadata}</title>
</head> </head>
<body> <body>
<div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior"> <div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage">
<div data-role="content"> <div data-role="content">
@ -16,6 +16,7 @@
<a href="metadataimages.html?type=games" data-role="button">${TabGames}</a> <a href="metadataimages.html?type=games" data-role="button">${TabGames}</a>
<a href="metadataimages.html?type=music" data-role="button">${TabMusic}</a> <a href="metadataimages.html?type=music" data-role="button">${TabMusic}</a>
<a href="metadataimages.html?type=others" data-role="button">${TabOthers}</a> <a href="metadataimages.html?type=others" data-role="button">${TabOthers}</a>
<a href="metadatasubtitles.html" data-role="button">${TabSubtitles}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabAdvanced}</a> <a href="#" data-role="button" class="ui-btn-active">${TabAdvanced}</a>
</div> </div>
@ -24,41 +25,37 @@
<li> <li>
<label>${HeaderExtractChapterImagesFor}</label> <label>${HeaderExtractChapterImagesFor}</label>
<div data-role="controlgroup"> <div data-role="controlgroup">
<input type="checkbox" data-mini="true" id="chkMovies" name="chkMovies" /> <input type="checkbox" data-mini="true" id="chkChaptersMovies" />
<label for="chkMovies">${OptionMovies}</label> <label for="chkChaptersMovies">${OptionMovies}</label>
<input type="checkbox" data-mini="true" id="chkEpisodes" name="chkEpisodes" /> <input type="checkbox" data-mini="true" id="chkChaptersEpisodes" />
<label for="chkEpisodes">${OptionEpisodes}</label> <label for="chkChaptersEpisodes">${OptionEpisodes}</label>
<input type="checkbox" data-mini="true" id="chkOtherVideos" name="chkOtherVideos" /> <input type="checkbox" data-mini="true" id="chkChaptersOtherVideos" />
<label for="chkOtherVideos">${OptionOtherVideos}</label> <label for="chkChaptersOtherVideos">${OptionOtherVideos}</label>
<div class="fieldDescription">${ExtractChapterImagesHelp}</div> <div class="fieldDescription">${ExtractChapterImagesHelp}</div>
</div> </div>
</li> </li>
</ul> </ul>
<div data-role="collapsible">
<h2>${HeaderAutomaticUpdates}</h2> <h2>${HeaderAutomaticUpdates}</h2>
<div>
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<input type="checkbox" id="chkEnableFanartUpdates" name="chkEnableFanartUpdates" data-mini="true" /> <input type="checkbox" id="chkEnableFanartUpdates" data-mini="true" />
<label for="chkEnableFanartUpdates">${LabelAutomaticUpdatesFanart}</label> <label for="chkEnableFanartUpdates">${LabelAutomaticUpdatesFanart}</label>
<div class="fieldDescription">${LabelAutomaticUpdatesFanartHelp}</div> <div class="fieldDescription">${LabelAutomaticUpdatesFanartHelp}</div>
</li> </li>
<li> <li>
<input type="checkbox" id="chkEnableTmdbPersonUpdates" name="chkEnableTmdbPersonUpdates" data-mini="true" /> <input type="checkbox" id="chkEnableTmdbPersonUpdates" data-mini="true" />
<label for="chkEnableTmdbPersonUpdates">${LabelAutomaticUpdatesTmdb}</label> <label for="chkEnableTmdbPersonUpdates">${LabelAutomaticUpdatesTmdb}</label>
<div class="fieldDescription">${LabelAutomaticUpdatesTmdbHelp}</div> <div class="fieldDescription">${LabelAutomaticUpdatesTmdbHelp}</div>
</li> </li>
<li> <li>
<input type="checkbox" id="chkEnableTvdbUpdates" name="chkEnableTvdbUpdates" data-mini="true" /> <input type="checkbox" id="chkEnableTvdbUpdates" data-mini="true" />
<label for="chkEnableTvdbUpdates">${LabelAutomaticUpdatesTvdb}</label> <label for="chkEnableTvdbUpdates">${LabelAutomaticUpdatesTvdb}</label>
<div class="fieldDescription">${LabelAutomaticUpdatesTvdbHelp}</div> <div class="fieldDescription">${LabelAutomaticUpdatesTvdbHelp}</div>
</li> </li>
</ul> </ul>
</div>
</div>
<br /> <br />
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>

View file

@ -4,7 +4,7 @@
<title>${TitleMetadata}</title> <title>${TitleMetadata}</title>
</head> </head>
<body> <body>
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior"> <div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage">
<div data-role="content"> <div data-role="content">
@ -16,6 +16,7 @@
<a href="metadataimages.html?type=games" data-role="button" class="categoryTab gamesTab">${TabGames}</a> <a href="metadataimages.html?type=games" data-role="button" class="categoryTab gamesTab">${TabGames}</a>
<a href="metadataimages.html?type=music" data-role="button" class="categoryTab musicTab">${TabMusic}</a> <a href="metadataimages.html?type=music" data-role="button" class="categoryTab musicTab">${TabMusic}</a>
<a href="metadataimages.html?type=others" data-role="button" class="categoryTab othersTab">${TabOthers}</a> <a href="metadataimages.html?type=others" data-role="button" class="categoryTab othersTab">${TabOthers}</a>
<a href="metadatasubtitles.html" data-role="button">${TabSubtitles}</a>
<a href="metadataadvanced.html" data-role="button">${TabAdvanced}</a> <a href="metadataadvanced.html" data-role="button">${TabAdvanced}</a>
</div> </div>

View file

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<title>${TitleMetadata}</title>
</head>
<body>
<div id="metadataSubtitlesPage" data-role="page" class="page type-interior metadataConfigurationPage">
<div data-role="content">
<div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="metadata.html" data-role="button">${TabBasics}</a>
<a href="metadataimages.html?type=movies" data-role="button">${TabMovies}</a>
<a href="metadataimages.html?type=tv" data-role="button">${TabTV}</a>
<a href="metadataimages.html?type=games" data-role="button">${TabGames}</a>
<a href="metadataimages.html?type=music" data-role="button">${TabMusic}</a>
<a href="metadataimages.html?type=others" data-role="button">${TabOthers}</a>
<a href="#" class="ui-btn-active" data-role="button">${TabSubtitles}</a>
<a href="metadataadvanced.html" data-role="button">${TabAdvanced}</a>
</div>
<form class="metadataSubtitlesForm">
<p>${HeaderSubtitleDownloadingHelp}</p>
<fieldset data-role="controlgroup">
<legend>${HeaderDownloadSubtitlesFor}</legend>
<input type="checkbox" data-mini="true" id="chkSubtitlesMovies" />
<label for="chkSubtitlesMovies">${OptionMovies}</label>
<input type="checkbox" data-mini="true" id="chkSubtitlesEpisodes" />
<label for="chkSubtitlesEpisodes">${OptionEpisodes}</label>
</fieldset>
<br />
<ul data-role="listview" class="ulForm">
<li>
<input type="checkbox" id="chkRequireExternalSubtitles" data-mini="true" />
<label for="chkRequireExternalSubtitles">${LabelRequireExternalSubtitles}</label>
<div class="fieldDescription">${LabelRequireExternalSubtitlesHelp}</div>
</li>
<li>
<label for="txtOpenSubtitleUsername">${LabelOpenSubtitlesUsername}</label>
<input type="text" id="txtOpenSubtitleUsername" data-mini="true" required="required" />
</li>
<li>
<label for="txtOpenSubtitlePassword">${LabelOpenSubtitlesPassword}</label>
<input type="password" id="txtOpenSubtitlePassword" data-mini="true" />
</li>
</ul>
<br />
<ul data-role="listview" class="ulForm">
<li>
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
${ButtonSave}
</button>
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete" data-mini="true">
${ButtonCancel}
</button>
</li>
</ul>
</form>
</div>
</div>
<script type="text/javascript">
$('.metadataSubtitlesForm').off('submit', MetadataSubtitlesPage.onSubmit).on('submit', MetadataSubtitlesPage.onSubmit);
</script>
</div>
</body>
</html>

View file

@ -9,8 +9,7 @@
<div class="content-primary"> <div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" data-mini="true">
<a href="plugins.html" data-role="button">${TabMyPlugins}</a> <a href="plugins.html" data-role="button">${TabMyPlugins}</a>
<a href="plugincatalog.html" data-role="button" class="ui-btn-active">${TabCatalog}</a> <a href="#" data-role="button" class="ui-btn-active">${TabCatalog}</a>
<a href="pluginupdates.html" data-role="button">${TabUpdates}</a>
</div> </div>
<p style="margin: 2em 0;"> <p style="margin: 2em 0;">
Types: <a data-rel="popup" data-position-to="origin" href="#freePlugins">Free</a>, Types: <a data-rel="popup" data-position-to="origin" href="#freePlugins">Free</a>,

View file

@ -9,9 +9,8 @@
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="plugins.html" data-role="button" class="ui-btn-active">${TabMyPlugins}</a> <a href="#" data-role="button" class="ui-btn-active">${TabMyPlugins}</a>
<a href="plugincatalog.html" data-role="button">${TabCatalog}</a> <a href="plugincatalog.html" data-role="button">${TabCatalog}</a>
<a href="pluginupdates.html" data-role="button">${TabUpdates}</a>
</div> </div>
<div class="readOnlyContent"> <div class="readOnlyContent">

View file

@ -1,42 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>${PluginsTitle}</title>
</head>
<body>
<div id="pluginUpdatesPage" data-role="page" class="page type-interior pluginConfigurationPage">
<div data-role="content">
<div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="plugins.html" data-role="button">${TabMyPlugins}</a>
<a href="plugincatalog.html" data-role="button">${TabCatalog}</a>
<a href="pluginupdates.html" data-role="button" class="ui-btn-active">${TabUpdates}</a>
</div>
<form id="pluginUpdatesForm">
<table id="tblPluginUpdates" class="ui-responsive table-stroke" data-role="table">
<thead>
<tr>
<th></th>
<th data-priority="2">${HeaderAutomaticUpdates}</th>
<th data-priority="3">${HeaderUpdateLevel}</th>
</tr>
</thead>
<tbody id="tbodyPluginUpdates"></tbody>
</table>
<br />
<br />
<div class="fieldDescription warningFieldDescription">
${DevBuildWarning}
</div>
</form>
</div>
</div>
</div>
</body>
</html>

View file

@ -1,11 +1,118 @@
(function ($, document, apiClient) { (function ($, document, apiClient) {
function fillSeriesSpotlight(elem, item, nextUp) {
var html = '<h1 class="spotlightTitle">' + item.Name + '</h1>';
var imgUrl = ApiClient.getImageUrl(item.Id, {
type: "Backdrop",
tag: item.BackdropImageTags[0]
});
html += '<div class="spotlight" style="background-image:url(\'' + imgUrl + '\');">';
imgUrl = ApiClient.getImageUrl(item.Id, {
type: "Primary",
tag: item.ImageTags.Primary,
EnableImageEnhancers: false
});
html += '<div class="spotlightContent">';
html += '<div class="spotlightPoster" style="background-image:url(\'' + imgUrl + '\');">';
html += '<div class="spotlightContentInner">';
html += '<p>' + LibraryBrowser.getMiscInfoHtml(item) + '</p>';
html += '<p>' + (item.Overview || '') + '</p>';
html += '</div>';
html += '</div>';
html += '</div>';
if (nextUp && nextUp.ImageTags && nextUp.ImageTags.Primary) {
html += '<div class="spotlightContent rightSpotlightContent">';
imgUrl = ApiClient.getImageUrl(nextUp.Id, {
type: "Primary",
tag: nextUp.ImageTags.Primary,
EnableImageEnhancers: false
});
html += '<div class="spotlightPoster" style="background-image:url(\'' + imgUrl + '\');">';
html += '<div class="spotlightContentInner">';
html += LibraryBrowser.getPosterViewDisplayName(nextUp);
html += '</div>';
html += '</div>';
html += '</div>';
}
html += '</div>';
html += '<div class="spotlightPlaceHolder"></div>';
$(elem).html(html);
}
function reloadSpotlight(page, allPromise) {
var options = {
SortBy: "Random",
SortOrder: "Descending",
Limit: 1,
Recursive: true,
IncludeItemTypes: "Series",
ImageTypes: "Backdrop,Primary",
Fields: "Overview"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
allPromise.done(function () {
var index = 0;
$('.spotlightContainer', page).each(function () {
var elem = this;
var item = result.Items[index];
index++;
if (item && item.Type == 'Series') {
options = {
Limit: 1,
UserId: Dashboard.getCurrentUserId(),
SeriesId: item.Id
};
ApiClient.getNextUpEpisodes(options).done(function (nextUpResult) {
fillSeriesSpotlight(elem, item, nextUpResult.Items[0]);
});
} else {
$(this).hide();
}
});
});
});
}
$(document).on('pagebeforeshow', "#indexPage", function () { $(document).on('pagebeforeshow', "#indexPage", function () {
var screenWidth = $(window).width(); var screenWidth = $(window).width();
var page = this; var page = this;
$('.spotlightContainer', page).empty();
var options = { var options = {
SortBy: "DatePlayed", SortBy: "DatePlayed",
@ -19,7 +126,7 @@
ExcludeLocationTypes: "Virtual" ExcludeLocationTypes: "Virtual"
}; };
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) { var promise1 = ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
if (result.Items.length) { if (result.Items.length) {
$('#resumableSection', page).show(); $('#resumableSection', page).show();
@ -43,7 +150,7 @@
SortBy: "DateCreated", SortBy: "DateCreated",
SortOrder: "Descending", SortOrder: "Descending",
Limit: screenWidth >= 1920 ? 20 : (screenWidth >= 1440 ? 16 : (screenWidth >= 800 ? 12 : 8)), Limit: screenWidth >= 2400 ? 21 : (screenWidth >= 1920 ? 15 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 12 : 8))),
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio", Fields: "PrimaryImageAspectRatio",
Filters: "IsUnplayed,IsNotFolder", Filters: "IsUnplayed,IsNotFolder",
@ -51,7 +158,7 @@
ExcludeLocationTypes: "Virtual,Remote" ExcludeLocationTypes: "Virtual,Remote"
}; };
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) { var promise2 = ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({ $('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
@ -63,6 +170,9 @@
})).createPosterItemMenus(); })).createPosterItemMenus();
}); });
//var allPromise = $.when(promise1, promise2);
//reloadSpotlight(page, allPromise);
}); });
})(jQuery, document, ApiClient); })(jQuery, document, ApiClient);

View file

@ -60,7 +60,7 @@
self.nextTrack(); self.nextTrack();
}; };
self.startProgressInterval = function (itemId, mediaSourceId) { self.startProgressInterval = function () {
clearProgressInterval(); clearProgressInterval();
@ -69,7 +69,7 @@
currentProgressInterval = setInterval(function () { currentProgressInterval = setInterval(function () {
if (currentMediaElement) { if (currentMediaElement) {
sendProgressUpdate(itemId, mediaSourceId); sendProgressUpdate();
} }
}, intervalTime); }, intervalTime);
@ -162,8 +162,8 @@
$(this).on('ended.playbackstopped', self.onPlaybackStopped).on('ended.playnext', self.playNextAfterEnded); $(this).on('ended.playbackstopped', self.onPlaybackStopped).on('ended.playnext', self.playNextAfterEnded);
self.startProgressInterval(currentItem.Id, currentMediaSource.Id); self.startProgressInterval();
sendProgressUpdate(currentItem.Id, currentMediaSource.Id); sendProgressUpdate();
}); });
@ -1064,7 +1064,7 @@
$(self).trigger('playbackstart', [state]); $(self).trigger('playbackstart', [state]);
self.startProgressInterval(item.Id, mediaSource.Id); self.startProgressInterval();
}; };
self.onVolumeChanged = function (playerElement) { self.onVolumeChanged = function (playerElement) {
@ -1118,18 +1118,19 @@
} }
}); });
function sendProgressUpdate(itemId, mediaSourceId) { function sendProgressUpdate() {
ApiClient.reportPlaybackProgress({ var state = self.getPlayerStateInternal(currentMediaElement, currentItem, currentMediaSource);
itemId: itemId,
MediaSourceId: mediaSourceId,
IsPaused: currentMediaElement.paused,
IsMuted: currentMediaElement.volume == 0,
VolumeLevel: currentMediaElement.volume * 100,
PositionTicks: self.getCurrentTicks(),
CanSeek: currentMediaSource.RunTimeTicks && currentMediaSource.RunTimeTicks > 0 var info = {
}); QueueableMediaTypes: state.NowPlayingItem.MediaType,
ItemId: state.NowPlayingItem.Id,
NowPlayingItem: state.NowPlayingItem
};
info = $.extend(info, state.PlayState);
ApiClient.reportPlaybackProgress(info);
} }
function clearProgressInterval() { function clearProgressInterval() {

View file

@ -15,9 +15,9 @@
load: function (page, config) { load: function (page, config) {
$('#chkMovies', page).checked(config.EnableMovieChapterImageExtraction).checkboxradio("refresh"); $('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction).checkboxradio("refresh");
$('#chkEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction).checkboxradio("refresh"); $('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction).checkboxradio("refresh");
$('#chkOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction).checkboxradio("refresh"); $('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction).checkboxradio("refresh");
$('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh"); $('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh");
$('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh"); $('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
@ -53,9 +53,9 @@
ApiClient.getServerConfiguration().done(function (config) { ApiClient.getServerConfiguration().done(function (config) {
config.EnableMovieChapterImageExtraction = $('#chkMovies', form).checked(); config.EnableMovieChapterImageExtraction = $('#chkChaptersMovies', form).checked();
config.EnableEpisodeChapterImageExtraction = $('#chkEpisodes', form).checked(); config.EnableEpisodeChapterImageExtraction = $('#chkChaptersEpisodes', form).checked();
config.EnableOtherVideoChapterImageExtraction = $('#chkOtherVideos', form).checked(); config.EnableOtherVideoChapterImageExtraction = $('#chkChaptersOtherVideos', form).checked();
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked(); config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
config.EnableTmdbUpdates = $('#chkEnableTmdbPersonUpdates', form).checked(); config.EnableTmdbUpdates = $('#chkEnableTmdbPersonUpdates', form).checked();

View file

@ -0,0 +1,68 @@
(function ($, document, window) {
function loadPage(page, config, systemInfo) {
$('#chkSubtitlesMovies', page).checked(config.SubtitleOptions.DownloadMovieSubtitles).checkboxradio("refresh");
$('#chkSubtitlesEpisodes', page).checked(config.SubtitleOptions.DownloadEpisodeSubtitles).checkboxradio("refresh");
$('#chkRequireExternalSubtitles', page).checked(config.SubtitleOptions.RequireExternalSubtitles).checkboxradio("refresh");
$('#txtOpenSubtitleUsername', page).val(config.SubtitleOptions.OpenSubtitlesUsername);
$('#txtOpenSubtitlePassword', page).val('');
Dashboard.hideLoadingMsg();
}
$(document).on('pageshow', "#metadataSubtitlesPage", function () {
Dashboard.showLoadingMsg();
var page = this;
var promise1 = ApiClient.getServerConfiguration();
var promise2 = ApiClient.getSystemInfo();
$.when(promise1, promise2).done(function (response1, response2) {
loadPage(page, response1[0], response2[0]);
});
}).on('pageinit', "#metadataSubtitlesPage", function () {
var page = this;
});
function metadataSubtitlesPage() {
var self = this;
self.onSubmit = function () {
Dashboard.showLoadingMsg();
var form = this;
ApiClient.getServerConfiguration().done(function (config) {
config.SubtitleOptions.DownloadMovieSubtitles = $('#chkSubtitlesMovies', form).checked();
config.SubtitleOptions.DownloadEpisodeSubtitles = $('#chkSubtitlesEpisodes', form).checked();
config.SubtitleOptions.RequireExternalSubtitles = $('#chkRequireExternalSubtitles', form).checked();
config.SubtitleOptions.OpenSubtitlesUsername = $('#txtOpenSubtitleUsername', form).val();
config.SubtitleOptions.OpenSubtitlesPasswordHash = $('#txtOpenSubtitlePassword', form).val();
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
});
// Disable default form submission
return false;
};
}
window.MetadataSubtitlesPage = new metadataSubtitlesPage();
})(jQuery, document, window);

View file

@ -1,115 +0,0 @@
var PluginUpdatesPage = {
onPageShow: function () {
Dashboard.showLoadingMsg();
$('.liPluginUpdate', this).remove();
ApiClient.getInstalledPlugins().done(PluginUpdatesPage.loadPlugins);
},
loadPlugins: function (plugins) {
var elem = $('#tbodyPluginUpdates', $.mobile.activePage).html('');
for (var i = 0, length = plugins.length; i < length; i++) {
PluginUpdatesPage.addPlugin(plugins[i], i, elem);
}
Dashboard.hideLoadingMsg();
},
addPlugin: function (plugin, fieldIndex, elem) {
var html = "";
html += "<tr>";
html += "<td><h3>" + plugin.Name + "</h3></td>";
var fieldId = "liPluginUpdateFielda" + fieldIndex;
var enabledOptions = [
{ name: Globalize.translate('OptionOff'), value: 'Off' },
{ name: Globalize.translate('OptionOn'), value: 'On' }
];
var options = PluginUpdatesPage.getHtmlOptions(enabledOptions, (plugin.EnableAutoUpdate ? "On" : "Off"));
html += "<td style='vertical-align:middle;text-align:left;'>";
html += "<select data-mini='true' data-id='" + plugin.Id + "' onchange='PluginUpdatesPage.setAutoUpdate(this);' data-role='slider' id='" + fieldId + "' name='" + fieldId + "'>" + options + "</select>";
html += "</td>";
fieldId = "liPluginUpdateFieldb" + fieldIndex;
var updateOptions = [
{ name: Globalize.translate('OptionRelease'), value: 'Release' },
{ name: Globalize.translate('OptionBeta'), value: 'Beta' },
{ name: Globalize.translate('OptionDev'), value: 'Dev' }
];
options = PluginUpdatesPage.getHtmlOptions(updateOptions, plugin.UpdateClass);
html += "<td style='vertical-align:middle;text-align:left;'>";
html += "<select data-mini='true' data-id='" + plugin.Id + "' onchange='PluginUpdatesPage.setUpdateClass(this);' data-inline='true' id='" + fieldId + "' name='" + fieldId + "'>" + options + "</select>";
html += "</td>";
html += "</tr>";
elem.append(html).trigger('create');
},
getHtmlOptions: function (options, selectedValue) {
var html = "";
for (var i = 0, length = options.length; i < length; i++) {
var option = options[i];
var name = option.name;
var value = option.value;
if (value == selectedValue) {
html += '<option value="' + value + '" selected="selected">' + name + '</option>';
} else {
html += '<option value="' + value + '">' + name + '</option>';
}
}
return html;
},
setAutoUpdate: function (select) {
var id = $(select).attr('data-id');
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(id).done(function (config) {
config.EnableAutoUpdate = select.selectedIndex === 1;
ApiClient.updatePluginConfiguration(id, config).done(Dashboard.hideLoadingMsg);
});
},
setUpdateClass: function (select) {
var id = $(select).attr('data-id');
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(id).done(function (config) {
config.UpdateClass = select.value;
ApiClient.updatePluginConfiguration(id, config).done(Dashboard.hideLoadingMsg);
});
}
};
$(document).on('pageshow', "#pluginUpdatesPage", PluginUpdatesPage.onPageShow);

View file

@ -745,7 +745,7 @@ var Dashboard = {
}, { }, {
name: "Metadata", name: "Metadata",
href: "metadata.html", href: "metadata.html",
selected: pageElem.id == "metadataConfigurationPage" || pageElem.id == "advancedMetadataConfigurationPage" || pageElem.id == "metadataImagesConfigurationPage" selected: page.hasClass('metadataConfigurationPage')
}, { }, {
name: "Auto-Organize", name: "Auto-Organize",
href: "autoorganizelog.html", href: "autoorganizelog.html",

View file

@ -36,6 +36,7 @@
<li> <li>
<label for="selectAudioLanguage">${LabelAudioLanguagePreference}</label> <label for="selectAudioLanguage">${LabelAudioLanguagePreference}</label>
<select id="selectAudioLanguage" data-mini="true"></select> <select id="selectAudioLanguage" data-mini="true"></select>
<div class="fieldDescription">${LabelAudioLanguagePreferenceHelp}</div>
</li> </li>
<li> <li>
<label for="selectSubtitleLanguage">${LabelSubtitleLanguagePreference}</label> <label for="selectSubtitleLanguage">${LabelSubtitleLanguagePreference}</label>