Skip to content

Commit

Permalink
fix(frontend): dont show external links unless slug is set
Browse files Browse the repository at this point in the history
  • Loading branch information
sct committed Jan 28, 2021
1 parent 0c6d478 commit 946bd2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions server/entity/Media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class Media {
@AfterLoad()
public setServiceUrl(): void {
if (this.mediaType === MediaType.MOVIE) {
if (this.serviceId !== null) {
if (this.serviceId !== null && this.externalServiceSlug !== null) {
const settings = getSettings();
const server = settings.radarr.find(
(radarr) => radarr.id === this.serviceId
Expand All @@ -155,7 +155,7 @@ class Media {
}
}

if (this.serviceId4k !== null) {
if (this.serviceId4k !== null && this.externalServiceSlug4k !== null) {
const settings = getSettings();
const server = settings.radarr.find(
(radarr) => radarr.id === this.serviceId4k
Expand All @@ -173,7 +173,7 @@ class Media {
}

if (this.mediaType === MediaType.TV) {
if (this.serviceId !== null) {
if (this.serviceId !== null && this.externalServiceSlug !== null) {
const settings = getSettings();
const server = settings.sonarr.find(
(sonarr) => sonarr.id === this.serviceId
Expand All @@ -189,7 +189,7 @@ class Media {
}
}

if (this.serviceId4k !== null) {
if (this.serviceId4k !== null && this.externalServiceSlug4k !== null) {
const settings = getSettings();
const server = settings.sonarr.find(
(sonarr) => sonarr.id === this.serviceId4k
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings/SettingsJobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const SettingsJobs: React.FC = () => {
<Table>
<thead>
<Table.TH>{intl.formatMessage(messages.jobname)}</Table.TH>
<Table.TH>{intl.formatMessage(messages.jobname)}</Table.TH>
<Table.TH>{intl.formatMessage(messages.jobtype)}</Table.TH>
<Table.TH>{intl.formatMessage(messages.nextexecution)}</Table.TH>
<Table.TH></Table.TH>
</thead>
Expand Down

0 comments on commit 946bd2d

Please sign in to comment.