mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update configuration for virtual episodes
This commit is contained in:
parent
d2bbd5b4ad
commit
cd21add046
11 changed files with 23 additions and 119 deletions
|
@ -11,7 +11,6 @@
|
||||||
<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="metadata.html" data-role="button">Basics</a>
|
<a href="metadata.html" data-role="button">Basics</a>
|
||||||
<a href="metadatatv.html" data-role="button">TV Settings</a>
|
|
||||||
<a href="metadataimages.html" data-role="button">Images</a>
|
<a href="metadataimages.html" data-role="button">Images</a>
|
||||||
<a href="advancedmetadata.html" data-role="button" class="ui-btn-active">Advanced</a>
|
<a href="advancedmetadata.html" data-role="button" class="ui-btn-active">Advanced</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<div class="libraryViewNav">
|
<div class="libraryViewNav">
|
||||||
<a href="tvrecommended.html">Suggested</a>
|
<a href="tvrecommended.html">Suggested</a>
|
||||||
<a href="tvnextup.html">Next up</a>
|
<a href="tvnextup.html">Next up</a>
|
||||||
|
<a href="tvupcoming.html">Upcoming</a>
|
||||||
<a href="tvshows.html">Shows</a>
|
<a href="tvshows.html">Shows</a>
|
||||||
<a href="episodes.html" class="ui-btn-active">Episodes</a>
|
<a href="episodes.html" class="ui-btn-active">Episodes</a>
|
||||||
<a href="tvgenres.html">Genres</a>
|
<a href="tvgenres.html">Genres</a>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<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="metadata.html" data-role="button" class="ui-btn-active">Basics</a>
|
<a href="metadata.html" data-role="button" class="ui-btn-active">Basics</a>
|
||||||
<a href="metadatatv.html" data-role="button">TV Settings</a>
|
|
||||||
<a href="metadataimages.html" data-role="button">Images</a>
|
<a href="metadataimages.html" data-role="button">Images</a>
|
||||||
<a href="advancedmetadata.html" data-role="button">Advanced</a>
|
<a href="advancedmetadata.html" data-role="button">Advanced</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,6 +38,11 @@
|
||||||
<label for="chkEnableTmdbPersonUpdates">Enable automatic tmdb updates</label>
|
<label for="chkEnableTmdbPersonUpdates">Enable automatic tmdb updates</label>
|
||||||
<div class="fieldDescription">If enabled, movies and people will be updated automatically as they are updated on the themoviedb.org.</div>
|
<div class="fieldDescription">If enabled, movies and people will be updated automatically as they are updated on the themoviedb.org.</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<input type="checkbox" id="chkEnableTvdbUpdates" name="chkEnableTvdbUpdates" />
|
||||||
|
<label for="chkEnableTvdbUpdates">Enable automatic tvdb updates</label>
|
||||||
|
<div class="fieldDescription">If enabled, tv series and episodes will be updated automatically as they are updated on the tvdb.com.</div>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button type="submit" data-theme="b" data-icon="ok">
|
<button type="submit" data-theme="b" data-icon="ok">
|
||||||
Save
|
Save
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<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="metadata.html" data-role="button">Basics</a>
|
<a href="metadata.html" data-role="button">Basics</a>
|
||||||
<a href="metadatatv.html" data-role="button">TV Settings</a>
|
|
||||||
<a href="metadataimages.html" data-role="button" class="ui-btn-active">Images</a>
|
<a href="metadataimages.html" data-role="button" class="ui-btn-active">Images</a>
|
||||||
<a href="advancedmetadata.html" data-role="button">Advanced</a>
|
<a href="advancedmetadata.html" data-role="button">Advanced</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Metadata</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="metadataTvPage" data-role="page" class="page type-interior">
|
|
||||||
|
|
||||||
<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">Basics</a>
|
|
||||||
<a href="metadatatv.html" data-role="button" class="ui-btn-active">TV Settings</a>
|
|
||||||
<a href="metadataimages.html" data-role="button">Images</a>
|
|
||||||
<a href="advancedmetadata.html" data-role="button">Advanced</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form id="metadataTvForm">
|
|
||||||
<ul data-role="listview" class="ulForm">
|
|
||||||
<li>
|
|
||||||
<input type="checkbox" id="chkEnableTvdbUpdates" name="chkEnableTvdbUpdates" />
|
|
||||||
<label for="chkEnableTvdbUpdates">Enable automatic tvdb updates</label>
|
|
||||||
<div class="fieldDescription">If enabled, tv series and episodes will be updated automatically as they are updated on the tvdb.com.</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<input type="checkbox" id="chkCreateMissingEpisodes" name="chkCreateMissingEpisodes" />
|
|
||||||
<label for="chkCreateMissingEpisodes">Import missing episodes</label>
|
|
||||||
<div class="fieldDescription">Display missing episodes as part of your library.</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<input type="checkbox" id="chkCreateFutureEpisodes" name="chkCreateFutureEpisodes" />
|
|
||||||
<label for="chkCreateFutureEpisodes">Import future episodes</label>
|
|
||||||
<div class="fieldDescription">Display future episodes as part of your library. Automatic Tvdb updates are highly recommended to stay up to date with new metadata.</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button type="submit" data-theme="b" data-icon="ok">
|
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete">
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$('#metadataTvForm').on('submit', MetadataTVPage.onSubmit);
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
if (item.LocationType == "Virtual" && item.Type == "Episode") {
|
if (item.LocationType == "Virtual" && item.Type == "Episode") {
|
||||||
try {
|
try {
|
||||||
if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate).getTime())) {
|
if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate, { toLocal: true }).getTime())) {
|
||||||
isMissingEpisode = true;
|
isMissingEpisode = true;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -610,7 +610,7 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var date = parseISO8601Date(review.Date, true).toLocaleDateString();
|
var date = parseISO8601Date(review.Date, { toLocal: true }).toLocaleDateString();
|
||||||
|
|
||||||
html += '<span class="reviewDate">' + date + '</span>';
|
html += '<span class="reviewDate">' + date + '</span>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
if (item.Type == "Episode" && item.LocationType == "Virtual") {
|
if (item.Type == "Episode" && item.LocationType == "Virtual") {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate).getTime())) {
|
if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate, { toLocal: true }).getTime())) {
|
||||||
htmlName += '<img src="css/images/editor/missing.png" title="Missing episode." />';
|
htmlName += '<img src="css/images/editor/missing.png" title="Missing episode." />';
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -671,7 +671,7 @@
|
||||||
if (item.PremiereDate) {
|
if (item.PremiereDate) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
futureDateText = LibraryBrowser.getFutureDateText(parseISO8601Date(item.PremiereDate), true);
|
futureDateText = LibraryBrowser.getFutureDateText(parseISO8601Date(item.PremiereDate, { toLocal: true }), true);
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
||||||
|
@ -884,7 +884,7 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var date = parseISO8601Date(item.PremiereDate);
|
var date = parseISO8601Date(item.PremiereDate, { toLocal: true });
|
||||||
|
|
||||||
html += "<div class='posterItemText'>";
|
html += "<div class='posterItemText'>";
|
||||||
html += LibraryBrowser.getPremiereDateText(item, date);
|
html += LibraryBrowser.getPremiereDateText(item, date);
|
||||||
|
@ -1020,7 +1020,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (item.PremiereDate && (new Date().getTime() < parseISO8601Date(item.PremiereDate).getTime())) {
|
|
||||||
|
var date = parseISO8601Date(item.PremiereDate, { toLocal: true });
|
||||||
|
|
||||||
|
if (item.PremiereDate && (new Date().getTime() < date.getTime())) {
|
||||||
return '<div class="posterRibbon unairedPosterRibbon">Unaired</div>';
|
return '<div class="posterRibbon unairedPosterRibbon">Unaired</div>';
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -1051,7 +1054,10 @@
|
||||||
|
|
||||||
if (!isPlayed) {
|
if (!isPlayed) {
|
||||||
try {
|
try {
|
||||||
if (date && (new Date().getTime() - parseISO8601Date(date).getTime()) < 604800000) {
|
|
||||||
|
var parsedDate = parseISO8601Date(item.PremiereDate, { toLocal: true });
|
||||||
|
|
||||||
|
if (date && (new Date().getTime() - parsedDate.getTime()) < 604800000) {
|
||||||
return "<div class='posterRibbon'>New</div>";
|
return "<div class='posterRibbon'>New</div>";
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
$('#selectCountry', page).val(config.MetadataCountryCode).selectmenu("refresh");
|
$('#selectCountry', page).val(config.MetadataCountryCode).selectmenu("refresh");
|
||||||
$('#chkEnableInternetProviders', page).checked(config.EnableInternetProviders).checkboxradio("refresh");
|
$('#chkEnableInternetProviders', page).checked(config.EnableInternetProviders).checkboxradio("refresh");
|
||||||
$('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh");
|
$('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh");
|
||||||
|
$('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
},
|
},
|
||||||
|
@ -91,6 +92,7 @@
|
||||||
config.SaveLocalMeta = $('#chkSaveLocal', form).checked();
|
config.SaveLocalMeta = $('#chkSaveLocal', form).checked();
|
||||||
config.PreferredMetadataLanguage = $('#selectLanguage', form).val();
|
config.PreferredMetadataLanguage = $('#selectLanguage', form).val();
|
||||||
config.MetadataCountryCode = $('#selectCountry', form).val();
|
config.MetadataCountryCode = $('#selectCountry', form).val();
|
||||||
|
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
|
||||||
|
|
||||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
var MetadataTVPage = {
|
|
||||||
|
|
||||||
onPageShow: function () {
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
ApiClient.getServerConfiguration().done(function (result) {
|
|
||||||
|
|
||||||
MetadataTVPage.load(page, result);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
load: function (page, config) {
|
|
||||||
|
|
||||||
var chkEnableTvdbUpdates = $('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
|
|
||||||
var chkCreateMissingEpisodes = $('#chkCreateMissingEpisodes', page).checked(config.CreateVirtualMissingEpisodes).checkboxradio("refresh");
|
|
||||||
var chkCreateFutureEpisodes = $('#chkCreateFutureEpisodes', page).checked(config.CreateVirtualFutureEpisodes).checkboxradio("refresh");
|
|
||||||
|
|
||||||
if (config.EnableInternetProviders) {
|
|
||||||
chkEnableTvdbUpdates.checkboxradio("enable");
|
|
||||||
chkCreateMissingEpisodes.checkboxradio("enable");
|
|
||||||
chkCreateFutureEpisodes.checkboxradio("enable");
|
|
||||||
} else {
|
|
||||||
chkEnableTvdbUpdates.checkboxradio("disable");
|
|
||||||
chkCreateMissingEpisodes.checkboxradio("disable");
|
|
||||||
chkCreateFutureEpisodes.checkboxradio("disable");
|
|
||||||
}
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
},
|
|
||||||
|
|
||||||
onSubmit: function () {
|
|
||||||
var form = this;
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
ApiClient.getServerConfiguration().done(function (config) {
|
|
||||||
|
|
||||||
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
|
|
||||||
config.CreateVirtualMissingEpisodes = $('#chkCreateMissingEpisodes', form).checked();
|
|
||||||
config.CreateVirtualFutureEpisodes = $('#chkCreateFutureEpisodes', form).checked();
|
|
||||||
|
|
||||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Disable default form submission
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$(document).on('pageshow', "#metadataTvPage", MetadataTVPage.onPageShow);
|
|
|
@ -11,7 +11,7 @@
|
||||||
SortBy: "PremiereDate,AirTime",
|
SortBy: "PremiereDate,AirTime",
|
||||||
SortOrder: "Ascending",
|
SortOrder: "Ascending",
|
||||||
IncludeItemTypes: "Episode",
|
IncludeItemTypes: "Episode",
|
||||||
Limit: 40,
|
Limit: 30,
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
||||||
HasPremiereDate: true,
|
HasPremiereDate: true,
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||||
|
|
||||||
if (!result.Items.length) {
|
if (!result.Items.length) {
|
||||||
$('#upcomingItems', page).html("Nothing here. To utilize this feature, please enable future episodes in the dashboard metadata configuration.");
|
$('#upcomingItems', page).html("<p>Nothing here. Please ensure <a href='metadata.html'>downloading of internet metadata</a> is enabled.</p>").trigger('create');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$('#upcomingItems', page).html(LibraryBrowser.getPosterViewHtml({
|
$('#upcomingItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue