mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #525 - Edit Series Run Time through Web Dashboard
This commit is contained in:
parent
65db9f5390
commit
ba537f20af
2 changed files with 25 additions and 0 deletions
|
@ -150,6 +150,10 @@
|
|||
<label for="txtAirTime">Air Time:</label>
|
||||
<input type="time" id="txtAirTime" name="txtAirTime" data-mini="true" />
|
||||
</div>
|
||||
<div data-role="fieldcontain" id="fldSeriesRuntime" style="display: none;">
|
||||
<label for="txtSeriesRuntime">Run Time (minutes):</label>
|
||||
<input type="number" id="txtSeriesRuntime" name="txtSeriesRuntime" data-mini="true" />
|
||||
</div>
|
||||
<div data-role="fieldcontain" id="fldOfficialRating" style="display: none;">
|
||||
<label for="selectOfficialRating">Official rating:</label>
|
||||
<select name="selectOfficialRating" id="selectOfficialRating" data-mini="true"></select>
|
||||
|
|
|
@ -354,6 +354,12 @@
|
|||
$('#fldPath', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "Series") {
|
||||
$('#fldSeriesRuntime', page).show();
|
||||
} else {
|
||||
$('#fldSeriesRuntime', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "Series" || item.Type == "Person") {
|
||||
$('#fldEndDate', page).show();
|
||||
} else {
|
||||
|
@ -660,6 +666,14 @@
|
|||
$('#txtMusicBrainzReleaseGroupId', page).val(providerIds.MusicBrainzReleaseGroup || "");
|
||||
$('#txtRottenTomatoes', page).val(providerIds.RottenTomatoes || "");
|
||||
|
||||
if (item.RunTimeTicks) {
|
||||
|
||||
var minutes = item.RunTimeTicks / 600000000;
|
||||
|
||||
$('#txtSeriesRuntime', page).val(minutes);
|
||||
} else {
|
||||
$('#txtSeriesRuntime', page).val("");
|
||||
}
|
||||
}
|
||||
|
||||
function convertTo24HourFormat(time) {
|
||||
|
@ -895,6 +909,13 @@
|
|||
item.ProductionLocations = placeOfBirth ? [placeOfBirth] : [];
|
||||
}
|
||||
|
||||
if (currentItem.Type == "Series") {
|
||||
|
||||
// 600000000
|
||||
var seriesRuntime = $('#txtSeriesRuntime', form).val();
|
||||
item.RunTimeTicks = seriesRuntime ? (seriesRuntime * 600000000) : null;
|
||||
}
|
||||
|
||||
var updatePromise;
|
||||
|
||||
if (currentItem.Type == "Artist") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue