mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update search hints
This commit is contained in:
parent
299a58f14e
commit
ed5e0f9314
7 changed files with 220 additions and 7 deletions
|
@ -27,14 +27,14 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/iron-resizable-behavior",
|
"homepage": "https://github.com/polymerelements/iron-resizable-behavior",
|
||||||
"_release": "1.0.2",
|
"_release": "1.0.2",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.2",
|
"tag": "v1.0.2",
|
||||||
"commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
|
"commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-resizable-behavior.git",
|
"_source": "git://github.com/polymerelements/iron-resizable-behavior.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-resizable-behavior"
|
"_originalSource": "polymerelements/iron-resizable-behavior"
|
||||||
}
|
}
|
53
dashboard-ui/livetvguideprovider.html
Normal file
53
dashboard-ui/livetvguideprovider.html
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>${TitleLiveTV}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="liveTvGuideProviderPage" data-role="page" class="page type-interior liveTvSettingsPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvguideprovider">
|
||||||
|
|
||||||
|
<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" class="ui-btn-active">${TabTuners}</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;">
|
||||||
|
|
||||||
|
<h1>${HeaderEmbyGuide}</h1>
|
||||||
|
|
||||||
|
<form class="formListings">
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<br />
|
||||||
|
<label for="selectCountry">${LabelCountry}</label>
|
||||||
|
<select id="selectCountry" data-mini="true" required="required">
|
||||||
|
<option value="ca">Canada</option>
|
||||||
|
<option value="us" selected>United States</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<paper-input class="txtZipCode" label="${LabelZipCode}" required="required"></paper-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<br />
|
||||||
|
<label for="selectListing">${LabelLineup}</label>
|
||||||
|
<select id="selectListing" data-mini="true" required="required"></select>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button type="submit" data-role="none" class="clearButton">
|
||||||
|
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||||
|
</button>
|
||||||
|
<paper-button raised class="cancel block btnCancel" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></paper-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
148
dashboard-ui/scripts/livetvguideprovider.js
Normal file
148
dashboard-ui/scripts/livetvguideprovider.js
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
(function ($, document, window) {
|
||||||
|
|
||||||
|
var listingsId;
|
||||||
|
|
||||||
|
function reload(page, providerId) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
ApiClient.getNamedConfiguration("livetv").done(function (config) {
|
||||||
|
|
||||||
|
var info = config.ListingProviders.filter(function (i) {
|
||||||
|
return i.Id == providerId;
|
||||||
|
})[0];
|
||||||
|
|
||||||
|
info = info || {};
|
||||||
|
|
||||||
|
listingsId = info.ListingsId;
|
||||||
|
$('#selectListing', page).val(info.ListingsId || '').selectmenu('refresh');
|
||||||
|
|
||||||
|
page.querySelector('.txtZipCode').value = info.ZipCode || '';
|
||||||
|
|
||||||
|
setCountry(page, info);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setCountry(page, info) {
|
||||||
|
|
||||||
|
$('#selectCountry', page).val(info.Country || '').selectmenu('refresh');
|
||||||
|
|
||||||
|
$(page.querySelector('.txtZipCode')).trigger('change');
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitListingsForm(page) {
|
||||||
|
|
||||||
|
var selectedListingsId = $('#selectListing', page).val();
|
||||||
|
|
||||||
|
if (!selectedListingsId) {
|
||||||
|
Dashboard.alert({
|
||||||
|
message: Globalize.translate('ErrorPleaseSelectLineup')
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
var providerId = getParameterByName('id');
|
||||||
|
var id = providerId;
|
||||||
|
|
||||||
|
ApiClient.getNamedConfiguration("livetv").done(function (config) {
|
||||||
|
|
||||||
|
var info = config.ListingProviders.filter(function (i) {
|
||||||
|
return i.Id == id;
|
||||||
|
})[0];
|
||||||
|
|
||||||
|
info.ZipCode = page.querySelector('.txtZipCode').value;
|
||||||
|
info.Country = $('#selectCountry', page).val();
|
||||||
|
info.ListingsId = selectedListingsId;
|
||||||
|
|
||||||
|
ApiClient.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: ApiClient.getUrl('LiveTv/ListingProviders', {
|
||||||
|
ValidateListings: true
|
||||||
|
}),
|
||||||
|
data: JSON.stringify(info),
|
||||||
|
contentType: "application/json"
|
||||||
|
|
||||||
|
}).done(function (result) {
|
||||||
|
|
||||||
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
|
|
||||||
|
}).fail(function () {
|
||||||
|
Dashboard.alert({
|
||||||
|
message: Globalize.translate('ErrorSavingTvProvider')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function refreshListings(page, value) {
|
||||||
|
|
||||||
|
if (!value) {
|
||||||
|
$('#selectListing', page).html('').selectmenu('refresh');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var providerId = getParameterByName('id');
|
||||||
|
|
||||||
|
Dashboard.showModalLoadingMsg();
|
||||||
|
|
||||||
|
ApiClient.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: ApiClient.getUrl('LiveTv/ListingProviders/Lineups', {
|
||||||
|
Id: providerId,
|
||||||
|
Location: value,
|
||||||
|
Country: $('#selectCountry', page).val()
|
||||||
|
}),
|
||||||
|
dataType: 'json'
|
||||||
|
|
||||||
|
}).done(function (result) {
|
||||||
|
|
||||||
|
$('#selectListing', page).html(result.map(function (o) {
|
||||||
|
|
||||||
|
return '<option value="' + o.Id + '">' + o.Name + '</option>';
|
||||||
|
|
||||||
|
})).selectmenu('refresh');
|
||||||
|
|
||||||
|
if (listingsId) {
|
||||||
|
$('#selectListing', page).val(listingsId).selectmenu('refresh');
|
||||||
|
}
|
||||||
|
|
||||||
|
Dashboard.hideModalLoadingMsg();
|
||||||
|
|
||||||
|
}).fail(function (result) {
|
||||||
|
|
||||||
|
Dashboard.alert({
|
||||||
|
message: Globalize.translate('ErrorGettingTvLineups')
|
||||||
|
});
|
||||||
|
refreshListings(page, '');
|
||||||
|
Dashboard.hideModalLoadingMsg();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('pageinitdepends', "#liveTvGuideProviderPage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
$('.formListings', page).on('submit', function () {
|
||||||
|
submitListingsForm(page);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.txtZipCode', page).on('change', function () {
|
||||||
|
refreshListings(page, this.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
}).on('pageshowready', "#liveTvGuideProviderPage", function () {
|
||||||
|
|
||||||
|
var providerId = getParameterByName('id');
|
||||||
|
var page = this;
|
||||||
|
reload(page, providerId);
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery, document, window);
|
|
@ -377,6 +377,8 @@
|
||||||
|
|
||||||
case 'schedulesdirect':
|
case 'schedulesdirect':
|
||||||
return 'livetvguideprovider-scd.html';
|
return 'livetvguideprovider-scd.html';
|
||||||
|
case 'emby':
|
||||||
|
return 'livetvguideprovider.html';
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -386,9 +388,14 @@
|
||||||
|
|
||||||
var menuItems = [];
|
var menuItems = [];
|
||||||
|
|
||||||
|
//menuItems.push({
|
||||||
|
// name: 'Schedules Direct',
|
||||||
|
// id: 'SchedulesDirect'
|
||||||
|
//});
|
||||||
|
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
name: 'Schedules Direct',
|
name: 'Emby Guide',
|
||||||
id: 'SchedulesDirect'
|
id: 'emby'
|
||||||
});
|
});
|
||||||
|
|
||||||
require(['actionsheet'], function () {
|
require(['actionsheet'], function () {
|
||||||
|
|
|
@ -50,6 +50,10 @@
|
||||||
|
|
||||||
return [Globalize.translate('LabelCollection')];
|
return [Globalize.translate('LabelCollection')];
|
||||||
}
|
}
|
||||||
|
else if (hint.ChannelName) {
|
||||||
|
|
||||||
|
return [hint.ChannelName];
|
||||||
|
}
|
||||||
|
|
||||||
return [hint.Type];
|
return [hint.Type];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1516,5 +1516,6 @@
|
||||||
"ButtonSyncSettingsHelp": "Configure your sync settings",
|
"ButtonSyncSettingsHelp": "Configure your sync settings",
|
||||||
"LabelTranscodingThreadCount": "Transcoding thread count:",
|
"LabelTranscodingThreadCount": "Transcoding thread count:",
|
||||||
"LabelTranscodingThreadCountHelp": "Select the maximum number of threads to use when transcoding. Reducing the thread count will lower cpu usage but may not convert fast enough for a smooth playback experience.",
|
"LabelTranscodingThreadCountHelp": "Select the maximum number of threads to use when transcoding. Reducing the thread count will lower cpu usage but may not convert fast enough for a smooth playback experience.",
|
||||||
"OptionMax": "Max"
|
"OptionMax": "Max",
|
||||||
|
"HeaderEmbyGuide": "Emby Guide"
|
||||||
}
|
}
|
||||||
|
|
|
@ -824,7 +824,7 @@
|
||||||
"HeaderAddProvider": "Add Provider",
|
"HeaderAddProvider": "Add Provider",
|
||||||
"ErrorAddingTunerDevice": "There was an error adding the tuner device. Please ensure it is accessible and try again.",
|
"ErrorAddingTunerDevice": "There was an error adding the tuner device. Please ensure it is accessible and try again.",
|
||||||
"ErrorSavingTvProvider": "There was an error saving the TV provider. Please ensure it is accessible and try again.",
|
"ErrorSavingTvProvider": "There was an error saving the TV provider. Please ensure it is accessible and try again.",
|
||||||
"ErrorGettingTvLineups": "There was an error downloading tv lineups. Please ensure your username and password are correct and try again.",
|
"ErrorGettingTvLineups": "There was an error downloading tv lineups. Please ensure your information is correct and try again.",
|
||||||
"MessageCreateAccountAt": "Create an account at {0}",
|
"MessageCreateAccountAt": "Create an account at {0}",
|
||||||
"ErrorPleaseSelectLineup": "Please select a lineup and try again. If no lineups are available, then please check that your username, password, and postal code is correct.",
|
"ErrorPleaseSelectLineup": "Please select a lineup and try again. If no lineups are available, then please check that your username, password, and postal code is correct.",
|
||||||
"HeaderTryCinemaMode": "Try Cinema Mode",
|
"HeaderTryCinemaMode": "Try Cinema Mode",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue