mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv setup
This commit is contained in:
parent
13c3281ad0
commit
8ef120c759
16 changed files with 212 additions and 57 deletions
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav livetvTabs" data-mini="true" style="display:none;">
|
||||
<a href="livetvstatus.html" data-role="button">${TabTuners}</a>
|
||||
<a href="#" data-role="button">${TabGuide}</a>
|
||||
<a href="livetvguidesettings.html" data-role="button">${TabGuide}</a>
|
||||
<a href="livetvsettings.html" data-role="button">${TabSettings}</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabExternalServices}</a>
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
|
||||
<a href="livetvstatus.html" data-role="button">${TabTuners}</a>
|
||||
<a href="#" data-role="button">${TabGuide}</a>
|
||||
<a href="livetvguidesettings.html" data-role="button">${TabGuide}</a>
|
||||
<a href="livetvsettings.html" data-role="button">${TabSettings}</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabExternalServices}</a>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-styles",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"description": "Common (global) styles for Material Design elements.",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -28,11 +28,11 @@
|
|||
"devDependencies": {
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.10",
|
||||
"_release": "1.0.11",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.10",
|
||||
"commit": "f1a79cd7916f7870a59918911062007bbc07867e"
|
||||
"tag": "v1.0.11",
|
||||
"commit": "347542e9ebe3e6e5f0830ee10e1c20c12956ff2c"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-styles.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-styles",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"description": "Common (global) styles for Material Design elements.",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -268,9 +268,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
--paper-orange-a400: #ff9100;
|
||||
--paper-orange-a700: #ff6500;
|
||||
|
||||
--paper-deep-orange-50: #ff5722;
|
||||
--paper-deep-orange-100: #fbe9e7;
|
||||
--paper-deep-orange-200: #ffccbc;
|
||||
--paper-deep-orange-50: #fbe9e7;
|
||||
--paper-deep-orange-100: #ffccbc;
|
||||
--paper-deep-orange-200: #ffab91;
|
||||
--paper-deep-orange-300: #ff8a65;
|
||||
--paper-deep-orange-400: #ff7043;
|
||||
--paper-deep-orange-500: #ff5722;
|
||||
|
|
71
dashboard-ui/livetvguidesettings.html
Normal file
71
dashboard-ui/livetvguidesettings.html
Normal file
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>${TitleLiveTV}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvGuideSettingsPage" data-role="page" class="page type-interior liveTvSettingsPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvguidesettings">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="livetvstatus.html" data-role="button">${TabTuners}</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabGuide}</a>
|
||||
<a href="livetvsettings.html" data-role="button">${TabSettings}</a>
|
||||
<a href="appservices.html?context=livetv" data-role="button">${TabExternalServices}</a>
|
||||
</div>
|
||||
|
||||
<div class="readOnlyContent" style="margin-top: 2em;">
|
||||
|
||||
<div class="liveTvStatusContent">
|
||||
|
||||
<h1>${HeaderGuideProviders}</h1>
|
||||
<p>${AddGuideProviderHelp}</p>
|
||||
<paper-button raised class="submit btnAddProvider block"><iron-icon icon="add"></iron-icon><span>${ButtonAdd}</span></paper-button>
|
||||
<div class="providerList">
|
||||
</div>
|
||||
|
||||
<paper-dialog class="dlgAddProvider" entry-animation="fade-in-animation" exit-animation="fade-out-animation" style="height:600px;width:300px;" with-backdrop>
|
||||
|
||||
<h2>${HeaderAddProvider}</h2>
|
||||
|
||||
<form class="formAddProvider">
|
||||
<div>
|
||||
<div>
|
||||
<label for="selectType">${LabelType}</label>
|
||||
<select id="selectType" data-mini="true">
|
||||
<option value="Schedules Direct">Schedules Direct</option>
|
||||
</select>
|
||||
<div class="fieldDescription"><a href="http://www.schedulesdirect.org" target="_blank">Schedules Direct</a></div>
|
||||
</div>
|
||||
<div>
|
||||
<br />
|
||||
<label for="txtUser">${LabelUsername}</label>
|
||||
<input type="text" id="txtUser" required="required" />
|
||||
</div>
|
||||
<div>
|
||||
<br />
|
||||
<label for="txtPass">${LabelPassword}</label>
|
||||
<input type="text" id="txtPass" required="required" />
|
||||
</div>
|
||||
<div>
|
||||
<br />
|
||||
<label for="txtZipCode">${LabelZipCode}</label>
|
||||
<input type="text" id="txtZipCode" required="required" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<paper-button dialog-dismiss>${ButtonCancel}</paper-button>
|
||||
<button data-role="none" type="submit" class="clearButton"><paper-button><span>${ButtonOk}</span></paper-button></button>
|
||||
</div>
|
||||
</form>
|
||||
</paper-dialog>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="livetvstatus.html" data-role="button">${TabTuners}</a>
|
||||
<a href="#" data-role="button">${TabGuide}</a>
|
||||
<a href="livetvguidesettings.html" data-role="button">${TabGuide}</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabSettings}</a>
|
||||
<a href="appservices.html?context=livetv" data-role="button">${TabExternalServices}</a>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabTuners}</a>
|
||||
<a href="#" data-role="button">${TabGuide}</a>
|
||||
<a href="livetvguidesettings.html" data-role="button">${TabGuide}</a>
|
||||
<a href="livetvsettings.html" data-role="button">${TabSettings}</a>
|
||||
<a href="appservices.html?context=livetv" data-role="button">${TabExternalServices}</a>
|
||||
</div>
|
||||
|
|
|
@ -81,25 +81,6 @@
|
|||
<div>
|
||||
<label for="selectMaxBitrate">${LabelMaxStreamingBitrate}</label>
|
||||
<select id="selectMaxBitrate" data-mini="true">
|
||||
<option value="30000000">30Mbps</option>
|
||||
<option value="25000000">25Mbps</option>
|
||||
<option value="20000000">20Mbps</option>
|
||||
<option value="15000000">15Mbps</option>
|
||||
<option value="10000000">10Mbps</option>
|
||||
<option value="8000000">8Mbps</option>
|
||||
<option value="6000000">6Mbps</option>
|
||||
<option value="5000000">5Mbps</option>
|
||||
<option value="4000000">4Mbps</option>
|
||||
<option value="3000000">3Mbps</option>
|
||||
<option value="2500000">2.5Mbps</option>
|
||||
<option value="2000000">2Mbps</option>
|
||||
<option value="1500000">1.5Mbps</option>
|
||||
<option value="1000000">1Mbps</option>
|
||||
<option value="720000">720kbps</option>
|
||||
<option value="420000">420kbps</option>
|
||||
<option value="400000">400kbps</option>
|
||||
<option value="320000">320kbps</option>
|
||||
<option value="192000">192kbps</option>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
};
|
||||
|
||||
query.ParentId = LibraryMenu.getTopParentId();
|
||||
|
||||
ApiClient.getNextUpEpisodes(query).done(function (result) {
|
||||
|
||||
if (result.Items.length) {
|
||||
|
|
|
@ -16,16 +16,6 @@
|
|||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
};
|
||||
|
||||
query.ParentId = LibraryMenu.getTopParentId();
|
||||
|
||||
var context = '';
|
||||
|
||||
if (query.ParentId) {
|
||||
|
||||
context = 'tv';
|
||||
|
||||
}
|
||||
|
||||
ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming", query)).done(function (result) {
|
||||
|
||||
var items = result.Items;
|
||||
|
|
111
dashboard-ui/scripts/livetvguidesettings.js
Normal file
111
dashboard-ui/scripts/livetvguidesettings.js
Normal file
|
@ -0,0 +1,111 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
function loadPage(page) {
|
||||
|
||||
ApiClient.getNamedConfiguration("livetv").done(function (config) {
|
||||
|
||||
renderProviders(page, config.ListingProviders);
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
function renderProviders(page, providers) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
||||
|
||||
for (var i = 0, length = providers.length; i < length; i++) {
|
||||
|
||||
var provider = providers[i];
|
||||
html += '<li>';
|
||||
html += '<a href="#">';
|
||||
|
||||
html += '<h3>';
|
||||
html += provider.Name;
|
||||
html += '</h3>';
|
||||
|
||||
html += '</a>';
|
||||
html += '<a href="#" class="btnDelete">';
|
||||
html += '</a>';
|
||||
html += '</li>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
var elem = $('.providerList', page).html(html).trigger('create');
|
||||
|
||||
$('.btnDelete', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-id');
|
||||
|
||||
deleteProvider(page, id);
|
||||
});
|
||||
}
|
||||
|
||||
function deleteProvider(page, id) {
|
||||
|
||||
var message = Globalize.translate('MessageConfirmDeleteGuideProvider');
|
||||
|
||||
Dashboard.confirm(message, Globalize.translate('HeaderDeleteProvider'), function (confirmResult) {
|
||||
|
||||
if (confirmResult) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.ajax({
|
||||
type: "DELETE",
|
||||
url: ApiClient.getUrl('LiveTv/TunerHosts', {
|
||||
Id: id
|
||||
})
|
||||
|
||||
}).done(function () {
|
||||
|
||||
loadPage(page);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submitAddProviderForm(page) {
|
||||
|
||||
page.querySelector('.dlgAddProvider').close();
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.ajax({
|
||||
type: "POST",
|
||||
url: ApiClient.getUrl('LiveTv/TunerHosts'),
|
||||
data: JSON.stringify({
|
||||
Type: $('#selectTunerDeviceType', page).val(),
|
||||
Url: $('#txtDevicePath', page).val()
|
||||
}),
|
||||
contentType: "application/json"
|
||||
|
||||
}).done(function () {
|
||||
|
||||
loadPage(page);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#liveTvGuideSettingsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.btnAddProvider', page).on('click', function () {
|
||||
page.querySelector('.dlgAddProvider').open();
|
||||
});
|
||||
|
||||
$('.formAddProvider', page).on('submit', function () {
|
||||
submitAddProviderForm(page);
|
||||
return false;
|
||||
});
|
||||
|
||||
}).on('pageshowready', "#liveTvGuideSettingsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
loadPage(page);
|
||||
});
|
||||
|
||||
})(jQuery, document, window);
|
|
@ -291,7 +291,7 @@
|
|||
page.querySelector('.dlgAddDevice').open();
|
||||
});
|
||||
|
||||
$('.dlgAddDevice', page).on('submit', function () {
|
||||
$('.formAddDevice', page).on('submit', function () {
|
||||
submitAddDeviceForm(page);
|
||||
return false;
|
||||
});
|
||||
|
|
|
@ -33,7 +33,15 @@
|
|||
|
||||
$('#chkEnableChromecastAc3', page).checked(AppSettings.enableChromecastAc3()).checkboxradio("refresh");
|
||||
$('#chkExternalVideoPlayer', page).checked(AppSettings.enableExternalPlayers()).checkboxradio("refresh");
|
||||
$('#selectMaxBitrate', page).val(AppSettings.maxStreamingBitrate()).selectmenu("refresh");
|
||||
|
||||
var bitrateOptions = MediaPlayer.getVideoQualityOptions().map(function (i) {
|
||||
|
||||
return '<option value="' + i.bitrate + '">' + i.name + '</option>';
|
||||
|
||||
}).join('');
|
||||
$('#selectMaxBitrate', page).html(bitrateOptions).val(AppSettings.maxStreamingBitrate()).selectmenu("refresh");
|
||||
|
||||
|
||||
$('#selectMaxChromecastBitrate', page).val(AppSettings.maxChromecastBitrate()).selectmenu("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
function getPluginCardHtml(plugin, getTextLinesCallback, pluginConfigurationPages) {
|
||||
function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
||||
|
||||
var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) {
|
||||
return pluginConfigurationPage.PluginId == plugin.Id;
|
||||
|
@ -96,10 +96,6 @@
|
|||
html += plugin.Version;
|
||||
html += "</div>";
|
||||
|
||||
if (getTextLinesCallback) {
|
||||
html += getTextLinesCallback(plugin);
|
||||
}
|
||||
|
||||
// cardFooter
|
||||
html += "</div>";
|
||||
|
||||
|
@ -112,16 +108,16 @@
|
|||
return html;
|
||||
}
|
||||
|
||||
function renderPlugins(page, plugins, getTextLinesCallback) {
|
||||
function renderPlugins(page, plugins) {
|
||||
|
||||
ApiClient.getJSON(ApiClient.getUrl("dashboard/configurationpages") + "?pageType=PluginConfiguration").done(function (configPages) {
|
||||
|
||||
populateList(page, plugins, getTextLinesCallback, configPages);
|
||||
populateList(page, plugins, configPages);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function populateList(page, plugins, getTextLinesCallback, pluginConfigurationPages) {
|
||||
function populateList(page, plugins, pluginConfigurationPages) {
|
||||
|
||||
plugins = plugins.sort(function (plugin1, plugin2) {
|
||||
|
||||
|
@ -130,7 +126,7 @@
|
|||
});
|
||||
|
||||
var html = plugins.map(function (p) {
|
||||
return getPluginCardHtml(p, getTextLinesCallback, pluginConfigurationPages);
|
||||
return getPluginCardHtml(p, pluginConfigurationPages);
|
||||
|
||||
}).join('');
|
||||
|
||||
|
|
|
@ -7261,9 +7261,9 @@ this._removeChildren();
|
|||
--paper-orange-a400: #ff9100;
|
||||
--paper-orange-a700: #ff6500;
|
||||
|
||||
--paper-deep-orange-50: #ff5722;
|
||||
--paper-deep-orange-100: #fbe9e7;
|
||||
--paper-deep-orange-200: #ffccbc;
|
||||
--paper-deep-orange-50: #fbe9e7;
|
||||
--paper-deep-orange-100: #ffccbc;
|
||||
--paper-deep-orange-200: #ffab91;
|
||||
--paper-deep-orange-300: #ff8a65;
|
||||
--paper-deep-orange-400: #ff7043;
|
||||
--paper-deep-orange-500: #ff5722;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue