Skip to content

Commit

Permalink
update strings
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Jan 19, 2020
1 parent 1beb47b commit aed88db
Show file tree
Hide file tree
Showing 20 changed files with 186 additions and 419 deletions.
2 changes: 1 addition & 1 deletion appheader/appheader.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

function onUserUpdated(e, apiClient, data) {

if (apiClient.getCurrentUserId() === data.Id && apiClient.serverId() === currentServerId && apiClient.isMinServerVersion('3.6.0.32')) {
if (apiClient.getCurrentUserId() === data.Id && apiClient.serverId() === currentServerId) {

updateUserInHeader(data);
}
Expand Down
2 changes: 1 addition & 1 deletion browserdeviceprofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ define(['browser'], function (browser) {
return true;
}

return (videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') && !browser.osx && !browser.iOS);
return (videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') && !(browser.osx && browser.safari) && !browser.iOS);
}

function supportsEac3(videoTestElement) {
Expand Down
4 changes: 2 additions & 2 deletions cardbuilder/cardbuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
var serverId = item.ServerId || options.serverId;

if (showOtherText) {
if ((options.showParentTitle || options.showParentTitleOrTitle) && !parentTitleUnderneath) {
if ((options.showParentTitle || options.showParentTitleOrTitle || (forceName && options.seriesNameInPlaceHolderName)) && !parentTitleUnderneath) {

if (isOuterFooter && itemType === 'Episode' && item.SeriesName) {

Expand Down Expand Up @@ -695,7 +695,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
}

var showMediaTitle = (showTitle && !titleAdded) || (options.showParentTitleOrTitle && !lines.length);
if (!showMediaTitle && !titleAdded && (showTitle || forceName)) {
if (!showMediaTitle && !titleAdded && (showTitle || (forceName && !options.seriesNameInPlaceHolderName))) {
showMediaTitle = true;
}

Expand Down
8 changes: 8 additions & 0 deletions detailbuttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
border-style: solid;
}

.detailButton-text {
max-width: 6.2em;
}

@media all and (min-width: 25em) {

.detailButton-icon {
Expand Down Expand Up @@ -60,6 +64,10 @@
width: 100%;
min-width: 3em;
}

.detailButton-text {
max-width: 8em;
}
}

@media not all and (min-width: 40em) {
Expand Down
4 changes: 0 additions & 4 deletions filtermenu/filtermenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,6 @@

var apiClient = connectionManager.getApiClient(options.serverId);

if (!apiClient.isMinServerVersion('3.6.0.53')) {
return Promise.resolve();
}

var query = Object.assign(options.filterMenuOptions, {

SortBy: "SortName",
Expand Down
4 changes: 2 additions & 2 deletions homesections/homesections.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@

return cardBuilder.getCardsHtml({
items: items,
shape: !enableTvPosters && viewType === 'tvshows' ? 'backdrop' : 'autooverflow',
shape: 'autooverflow',
preferThumb: 'auto',
showUnplayedIndicator: false,
showChildCountIndicator: true,
Expand Down Expand Up @@ -442,7 +442,7 @@

var itemsContainer = elem.querySelector('.itemsContainer');
itemsContainer.fetchData = getFetchLatestItemsFn(apiClient.serverId(), parent.Id, parent.CollectionType);
itemsContainer.getItemsHtml = getLatestItemsHtmlFn(parent.Type, parent.CollectionType, apiClient.isMinServerVersion('3.6'));
itemsContainer.getItemsHtml = getLatestItemsHtmlFn(parent.Type, parent.CollectionType);
itemsContainer.parentContainer = elem;

}
Expand Down
6 changes: 1 addition & 5 deletions itemhelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,6 @@ define(['apphost', 'globalize'], function (appHost, globalize) {

var itemType = item.Type;

if (!apiClient.isMinServerVersion('3.6.0.18')) {
return false;
}

return itemType === "Movie" ||
itemType === "Trailer" ||
itemType === "Series";
Expand All @@ -549,7 +545,7 @@ define(['apphost', 'globalize'], function (appHost, globalize) {
return false;
}

if (item.Type === 'TvChannel') {
if (item.Type === 'TvChannel' || item.Type === 'Program') {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion mediainfo/mediainfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ define(['browser', 'datetime', 'connectionManager', 'globalize', 'appRouter', 'i
html: '<div class="mediaInfoProgramAttribute mediaInfoItem premiereTvProgram">' + globalize.translate('Premiere') + '</div>'
});
}
else if (item.IsNew || (item.IsSeries && !item.IsRepeat && !connectionManager.getApiClient(item).isMinServerVersion('3.6.0.0'))) {
else if (item.IsNew) {
miscInfo.push({
html: '<div class="mediaInfoProgramAttribute mediaInfoItem newTvProgram">' + globalize.translate('AttributeNew') + '</div>'
});
Expand Down
121 changes: 0 additions & 121 deletions photoplayer/plugin.js

This file was deleted.

2 changes: 1 addition & 1 deletion playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@
Filters: "IsNotFolder",
Recursive: true,
// These are pre-sorted
SortBy: options.shuffle ? 'Random' : connectionManager.getApiClient(firstItem.ServerId).isMinServerVersion('3.6') ? null : 'SortName'
SortBy: options.shuffle ? 'Random' : null

}, queryOptions));
}
Expand Down
22 changes: 22 additions & 0 deletions recordingcreator/recordingcreator.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ <h1 class="programDialog-itemName recordingDialog-itemName dialogContentTitle"><
<p class="itemGenres secondaryText"></p>

<div style="margin:1em 0;" class="recordingFields flex align-items-flex-start flex-wrap-wrap">
<div class="recordSeriesContainer recordingFields-buttons flex align-items-flex-start hide">
<button is="emby-button" type="button" class="recordingButton seriesRecordingButton detailButton">
<div class="detailButton-content">
<i class="md-icon detailButton-icon recordingIcon">&#xE062;</i>
<div class="detailButton-text button-text seriesRecordingButtonText">${HeaderRecordSeries}</div>
</div>
</button>
</div>

<button is="emby-button" type="button" class="recordingButton singleRecordingButton detailButton">
<div class="detailButton-content">
<i class="md-icon detailButton-icon recordingIcon">&#xE061;</i>
<div class="detailButton-text button-text singleRecordingButtonText">${Record}</div>
</div>
</button>

<button is="emby-button" type="button" class="manageRecordingButton btnManageRecording hide detailButton">
<div class="detailButton-content">
<i class="md-icon detailButton-icon recordingIcon">&#xE8B8;</i>
<div class="detailButton-text button-text">${Settings}</div>
</div>
</button>
</div>
</div>
</div>
Expand Down
59 changes: 25 additions & 34 deletions recordingcreator/recordingfields.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@
parent.querySelector('.recordSeriesContainer').classList.add('hide');
}

var btnManageSeriesRecording = parent.querySelector('.btnManageSeriesRecording');

if (program.SeriesTimerId) {
parent.querySelector('.btnManageSeriesRecording').classList.remove('hide');

if (btnManageSeriesRecording) {
btnManageSeriesRecording.classList.remove('hide');
}
parent.querySelector('.seriesRecordingButton .recordingIcon').classList.add('recordingIcon-active');
parent.querySelector('.seriesRecordingButtonText').innerHTML = globalize.translate('HeaderCancelSeries');
} else {
parent.querySelector('.btnManageSeriesRecording').classList.add('hide');

if (btnManageSeriesRecording) {
btnManageSeriesRecording.classList.add('hide');
}

parent.querySelector('.seriesRecordingButton .recordingIcon').classList.remove('recordingIcon-active');
parent.querySelector('.seriesRecordingButtonText').innerHTML = globalize.translate('HeaderRecordSeries');
}
Expand Down Expand Up @@ -100,6 +109,7 @@
}

function RecordingEditor(options) {

this.options = options;
this.embed();

Expand All @@ -116,10 +126,6 @@
events.on(serverNotifications, 'SeriesTimerCancelled', seriesTimerChangedHandler);
}

function onSupporterButtonClick() {
registrationServices.showPremiereInfo();
}

function onManageRecordingClick(e) {

var options = this.options;
Expand Down Expand Up @@ -150,18 +156,7 @@
return;
}

var self = this;

require(['seriesRecordingEditor'], function (seriesRecordingEditor) {

seriesRecordingEditor.show(self.SeriesTimerId, options.serverId, {

enableCancel: false

}).then(function () {
self.changed = true;
});
});
// options.serverId
}

function onRecordChange(e) {
Expand Down Expand Up @@ -243,27 +238,23 @@

var self = this;

return new Promise(function (resolve, reject) {
var options = self.options;
var context = options.parent;

require(['text!./recordingfields.template.html'], function (template) {
var singleRecordingButton = context.querySelector('.singleRecordingButton');

var options = self.options;
var context = options.parent;
context.innerHTML = globalize.translateDocument(template, 'sharedcomponents');
singleRecordingButton.classList.remove('hide');

var supporterButtons = context.querySelectorAll('.btnSupporter');
for (var i = 0, length = supporterButtons.length; i < length; i++) {
supporterButtons[i].addEventListener('click', onSupporterButtonClick);
}
singleRecordingButton.addEventListener('click', onRecordChange.bind(self));
context.querySelector('.seriesRecordingButton').addEventListener('click', onRecordSeriesChange.bind(self));
context.querySelector('.btnManageRecording').addEventListener('click', onManageRecordingClick.bind(self));

context.querySelector('.singleRecordingButton').addEventListener('click', onRecordChange.bind(self));
context.querySelector('.seriesRecordingButton').addEventListener('click', onRecordSeriesChange.bind(self));
context.querySelector('.btnManageRecording').addEventListener('click', onManageRecordingClick.bind(self));
context.querySelector('.btnManageSeriesRecording').addEventListener('click', onManageSeriesRecordingClick.bind(self));
var btnManageSeriesRecording = context.querySelector('.btnManageSeriesRecording');
if (btnManageSeriesRecording) {
btnManageSeriesRecording.addEventListener('click', onManageSeriesRecordingClick.bind(self));
}

fetchData(self).then(resolve);
});
});
fetchData(self);
};

RecordingEditor.prototype.hasChanged = function () {
Expand Down
Loading

0 comments on commit aed88db

Please sign in to comment.