";
var numLines = 2;
if (currentItemType === "MusicAlbum") {
@@ -239,12 +239,12 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
} else {
html += '
';
}
- html += lines[i] || ' ';
- html += '
';
+ html += lines[i] || " ";
+ html += "";
}
- html += '';
- html += '';
+ html += "";
+ html += "";
return html;
}
@@ -259,7 +259,7 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
loading.show();
var options = {
- ReplaceAllImages: page.querySelector('#chkIdentifyReplaceImages').checked
+ ReplaceAllImages: page.querySelector("#chkIdentifyReplaceImages").checked
};
var apiClient = getApiClient();
@@ -291,7 +291,7 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
apiClient.getJSON(apiClient.getUrl("Items/" + item.Id + "/ExternalIdInfos")).then(function (idList) {
- var html = '';
+ var html = "";
var providerIds = item.ProviderIds || {};
@@ -303,30 +303,30 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
html += '
';
- var idLabel = globalize.translate('LabelDynamicExternalId').replace('{0}', idInfo.Name);
+ var idLabel = globalize.translate("LabelDynamicExternalId").replace("{0}", idInfo.Name);
- var value = providerIds[idInfo.Key] || '';
+ var value = providerIds[idInfo.Key] || "";
html += '';
- html += '
';
+ html += "";
}
- page.querySelector('#txtLookupName').value = '';
+ page.querySelector("#txtLookupName").value = "";
if (item.Type === "Person" || item.Type === "BoxSet") {
- page.querySelector('.fldLookupYear').classList.add('hide');
- page.querySelector('#txtLookupYear').value = '';
+ page.querySelector(".fldLookupYear").classList.add("hide");
+ page.querySelector("#txtLookupYear").value = "";
} else {
- page.querySelector('.fldLookupYear').classList.remove('hide');
- page.querySelector('#txtLookupYear').value = '';
+ page.querySelector(".fldLookupYear").classList.remove("hide");
+ page.querySelector("#txtLookupYear").value = "";
}
- page.querySelector('.identifyProviderIds').innerHTML = html;
+ page.querySelector(".identifyProviderIds").innerHTML = html;
- page.querySelector('.formDialogHeaderTitle').innerHTML = globalize.translate('Identify');
+ page.querySelector(".formDialogHeaderTitle").innerHTML = globalize.translate("Identify");
});
}
@@ -334,7 +334,7 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
loading.show();
- require(['text!./itemidentifier.template.html'], function (template) {
+ require(["text!./itemidentifier.template.html"], function (template) {
var apiClient = getApiClient();
@@ -344,30 +344,30 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
currentItemType = currentItem.Type;
var dialogOptions = {
- size: 'fullscreen-border',
+ size: "fullscreen-border",
removeOnClose: true,
scrollY: false
};
if (layoutManager.tv) {
- dialogOptions.size = 'fullscreen';
+ dialogOptions.size = "fullscreen";
}
var dlg = dialogHelper.createDialog(dialogOptions);
- dlg.classList.add('formDialog');
- dlg.classList.add('recordingDialog');
+ dlg.classList.add("formDialog");
+ dlg.classList.add("recordingDialog");
- var html = '';
- html += globalize.translateDocument(template, 'core');
+ var html = "";
+ html += globalize.translateDocument(template, "core");
dlg.innerHTML = html;
// Has to be assigned a z-index after the call to .open()
- dlg.addEventListener('close', onDialogClosed);
+ dlg.addEventListener("close", onDialogClosed);
if (layoutManager.tv) {
- scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
+ scrollHelper.centerFocus.on(dlg.querySelector(".formDialogContent"), false);
}
if (item.Path) {
@@ -380,26 +380,26 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
dialogHelper.open(dlg);
- dlg.querySelector('.popupIdentifyForm').addEventListener('submit', function (e) {
+ dlg.querySelector(".popupIdentifyForm").addEventListener("submit", function (e) {
e.preventDefault();
searchForIdentificationResults(dlg);
return false;
});
- dlg.querySelector('.identifyOptionsForm').addEventListener('submit', function (e) {
+ dlg.querySelector(".identifyOptionsForm").addEventListener("submit", function (e) {
e.preventDefault();
submitIdentficationResult(dlg);
return false;
});
- dlg.querySelector('.btnCancel').addEventListener('click', function (e) {
+ dlg.querySelector(".btnCancel").addEventListener("click", function (e) {
dialogHelper.close(dlg);
});
- dlg.classList.add('identifyDialog');
+ dlg.classList.add("identifyDialog");
showIdentificationForm(dlg, item);
loading.hide();
@@ -422,49 +422,49 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
currentItem = null;
currentItemType = itemType;
- require(['text!./itemidentifier.template.html'], function (template) {
+ require(["text!./itemidentifier.template.html"], function (template) {
var dialogOptions = {
- size: 'fullscreen-border',
+ size: "fullscreen-border",
removeOnClose: true,
scrollY: false
};
if (layoutManager.tv) {
- dialogOptions.size = 'fullscreen';
+ dialogOptions.size = "fullscreen";
}
var dlg = dialogHelper.createDialog(dialogOptions);
- dlg.classList.add('formDialog');
- dlg.classList.add('recordingDialog');
+ dlg.classList.add("formDialog");
+ dlg.classList.add("recordingDialog");
- var html = '';
- html += globalize.translateDocument(template, 'core');
+ var html = "";
+ html += globalize.translateDocument(template, "core");
dlg.innerHTML = html;
if (layoutManager.tv) {
- scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
+ scrollHelper.centerFocus.on(dlg.querySelector(".formDialogContent"), false);
}
dialogHelper.open(dlg);
- dlg.querySelector('.btnCancel').addEventListener('click', function (e) {
+ dlg.querySelector(".btnCancel").addEventListener("click", function (e) {
dialogHelper.close(dlg);
});
- dlg.querySelector('.popupIdentifyForm').addEventListener('submit', function (e) {
+ dlg.querySelector(".popupIdentifyForm").addEventListener("submit", function (e) {
e.preventDefault();
searchForIdentificationResults(dlg);
return false;
});
- dlg.addEventListener('close', function () {
+ dlg.addEventListener("close", function () {
loading.hide();
var foundItem = hasChanges ? currentSearchResult : null;
@@ -472,7 +472,7 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
resolveFunc(foundItem);
});
- dlg.classList.add('identifyDialog');
+ dlg.classList.add("identifyDialog");
showIdentificationFormFindNew(dlg, itemName, itemYear, itemType);
});
@@ -480,20 +480,20 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
function showIdentificationFormFindNew(dlg, itemName, itemYear, itemType) {
- dlg.querySelector('#txtLookupName').value = itemName;
+ dlg.querySelector("#txtLookupName").value = itemName;
if (itemType === "Person" || itemType === "BoxSet") {
- dlg.querySelector('.fldLookupYear').classList.add('hide');
- dlg.querySelector('#txtLookupYear').value = '';
+ dlg.querySelector(".fldLookupYear").classList.add("hide");
+ dlg.querySelector("#txtLookupYear").value = "";
} else {
- dlg.querySelector('.fldLookupYear').classList.remove('hide');
- dlg.querySelector('#txtLookupYear').value = itemYear;
+ dlg.querySelector(".fldLookupYear").classList.remove("hide");
+ dlg.querySelector("#txtLookupYear").value = itemYear;
}
- dlg.querySelector('.formDialogHeaderTitle').innerHTML = globalize.translate('Search');
+ dlg.querySelector(".formDialogHeaderTitle").innerHTML = globalize.translate("Search");
}
return {
diff --git a/src/components/tunerpicker.js b/src/components/tunerpicker.js
index 784f677430..77bddba530 100644
--- a/src/components/tunerpicker.js
+++ b/src/components/tunerpicker.js
@@ -1,78 +1,171 @@
-define(["dialogHelper", "dom", "layoutManager", "connectionManager", "globalize", "loading", "material-icons", "formDialogStyle", "emby-button", "emby-itemscontainer", "cardStyle"], function(dialogHelper, dom, layoutManager, connectionManager, globalize, loading) {
+define(["dialogHelper", "dom", "layoutManager", "connectionManager", "globalize", "loading", "material-icons", "formDialogStyle", "emby-button", "emby-itemscontainer", "cardStyle"], function (dialogHelper, dom, layoutManager, connectionManager, globalize, loading) {
"use strict";
function getEditorHtml() {
var html = "";
- return html += '
";
}
function getDeviceHtml(device) {
- var padderClass, html = "",
- cssClass = "card scalableCard",
- cardBoxCssClass = "cardBox visualCardBox";
- return cssClass += " backdropCard backdropCard-scalable", padderClass = "cardPadder-backdrop", layoutManager.tv && (cssClass += " card-focusscale", cardBoxCssClass += " cardBox-focustransform"), cardBoxCssClass += " card-focuscontent", html += '"
+ var padderClass;
+ var html = "";
+ var cssClass = "card scalableCard";
+ var cardBoxCssClass = "cardBox visualCardBox";
+ cssClass += " backdropCard backdropCard-scalable";
+ padderClass = "cardPadder-backdrop";
+
+ if (layoutManager.tv) {
+ cssClass += " card-focusscale";
+ cardBoxCssClass += " cardBox-focustransform";
+ }
+
+ cardBoxCssClass += " card-focuscontent";
+ html += '";
}
function getTunerName(providerId) {
switch (providerId = providerId.toLowerCase()) {
case "m3u":
return "M3U";
+
case "hdhomerun":
return "HDHomerun";
+
case "hauppauge":
return "Hauppauge";
+
case "satip":
return "DVB";
+
default:
- return "Unknown"
+ return "Unknown";
}
}
function renderDevices(view, devices) {
- var i, length, html = "";
- for (i = 0, length = devices.length; i < length; i++) html += getDeviceHtml(devices[i]);
- devices.length ? view.querySelector(".devicesHeader").classList.remove("hide") : (html = "
" + globalize.translate("NoNewDevicesFound") + "
", view.querySelector(".devicesHeader").classList.add("hide"));
+ var i;
+ var length;
+ var html = "";
+
+ for (i = 0, length = devices.length; i < length; i++) {
+ html += getDeviceHtml(devices[i]);
+ }
+
+ if (devices.length) {
+ view.querySelector(".devicesHeader").classList.remove("hide");
+ } else {
+ html = "