Fix Poster Render on Add Artist, Add EPs by Default

pull/6/head
Qstick 7 years ago
parent 90018cf487
commit 1b64171b30

@ -11,7 +11,7 @@ function findBanner(images) {
function getBannerUrl(banner, size) { function getBannerUrl(banner, size) {
if (banner) { if (banner) {
if (banner.url.contains('lastWrite')) { if (banner.url.contains('lastWrite=') || (/^https?:/).test(banner.url)) {
// Remove protocol // Remove protocol
let url = banner.url.replace(/^https?:/, ''); let url = banner.url.replace(/^https?:/, '');
url = url.replace('banner.jpg', `banner-${size}.jpg`); url = url.replace('banner.jpg', `banner-${size}.jpg`);

@ -11,7 +11,7 @@ function findPoster(images) {
function getPosterUrl(poster, size) { function getPosterUrl(poster, size) {
if (poster) { if (poster) {
if (poster.url.contains('lastWrite')) { if (poster.url.contains('lastWrite=') || (/^https?:/).test(poster.url)) {
// Remove protocol // Remove protocol
let url = poster.url.replace(/^https?:/, ''); let url = poster.url.replace(/^https?:/, '');
url = url.replace('poster.jpg', `poster-${size}.jpg`); url = url.replace('poster.jpg', `poster-${size}.jpg`);

@ -38,13 +38,13 @@ const albumTypes = [
isVisible: true isVisible: true
}, },
{ {
name: 'single', name: 'ep',
label: 'Single', label: 'EP',
isVisible: true isVisible: true
}, },
{ {
name: 'ep', name: 'single',
label: 'EP', label: 'Single',
isVisible: true isVisible: true
}, },
{ {
@ -524,13 +524,6 @@ class ArtistDetails extends Component {
</div> </div>
} }
{
isPopulated && !albums.length &&
<div>
No episode information is available.
</div>
}
</div> </div>
<OrganizePreviewModalConnector <OrganizePreviewModalConnector

@ -57,8 +57,8 @@ class ArtistDetailsSeason extends Component {
} = this.props; } = this.props;
const expand = _.some(items, (item) => { const expand = _.some(items, (item) => {
return isAfter(item.airDateUtc) || return isAfter(item.releaseDate) ||
isAfter(item.airDateUtc, { days: -30 }); isAfter(item.releaseDate, { days: -30 });
}); });
onExpandPress(name, expand && name > 0); onExpandPress(name, expand && name > 0);
@ -273,7 +273,7 @@ class ArtistDetailsSeason extends Component {
<IconButton <IconButton
name={icons.COLLAPSE} name={icons.COLLAPSE}
size={20} size={20}
title="Hide episodes" title="Hide albums"
onPress={this.onExpandPress} onPress={this.onExpandPress}
/> />
</div> </div>

@ -22,7 +22,7 @@ export const defaultState = {
monitor: 'allEpisodes', monitor: 'allEpisodes',
qualityProfileId: 0, qualityProfileId: 0,
languageProfileId: 0, languageProfileId: 0,
primaryAlbumTypes: ['Album'], primaryAlbumTypes: ['Album', 'EP'],
secondaryAlbumTypes: ['Studio'], secondaryAlbumTypes: ['Studio'],
albumFolder: true, albumFolder: true,
tags: [] tags: []

Loading…
Cancel
Save