fix: Images loaded from Jellyfin not showing up, some fixes regarding environment variables

Closes #66
This commit is contained in:
Aleksi Lassila
2023-08-15 17:57:15 +03:00
parent fd52073455
commit c1ba3efabf
11 changed files with 71 additions and 46 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import { env } from '$env/dynamic/public';
import { setJellyfinItemUnwatched, setJellyfinItemWatched } from '$lib/apis/jellyfin/jellyfinApi';
import { JELLYFIN_BASE_URL, RADARR_BASE_URL, SONARR_BASE_URL } from '$lib/constants';
import { library, type LibraryItemStore } from '$lib/stores/library.store';
import type { TitleType } from '$lib/types';
import ContextMenuDivider from './ContextMenuDivider.svelte';
@@ -36,7 +36,7 @@
function handleOpenInJellyfin() {
window.open(
env.PUBLIC_JELLYFIN_URL + '/web/index.html#!/details?id=' + $itemStore.item?.jellyfinItem?.Id
JELLYFIN_BASE_URL + '/web/index.html#!/details?id=' + $itemStore.item?.jellyfinItem?.Id
);
}
</script>
@@ -59,7 +59,7 @@
<ContextMenuItem
disabled={!$itemStore.item.radarrMovie}
on:click={() =>
window.open(env.PUBLIC_RADARR_BASE_URL + '/movie/' + $itemStore.item?.radarrMovie?.tmdbId)}
window.open(RADARR_BASE_URL + '/movie/' + $itemStore.item?.radarrMovie?.tmdbId)}
>
Open in Radarr
</ContextMenuItem>
@@ -67,9 +67,7 @@
<ContextMenuItem
disabled={!$itemStore.item.sonarrSeries}
on:click={() =>
window.open(
env.PUBLIC_SONARR_BASE_URL + '/series/' + $itemStore.item?.sonarrSeries?.titleSlug
)}
window.open(SONARR_BASE_URL + '/series/' + $itemStore.item?.sonarrSeries?.titleSlug)}
>
Open in Sonarr
</ContextMenuItem>