mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-22 00:35:12 +02:00
feat: Make Jellyfin environment variables optional
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
PUBLIC_JELLYFIN_URL,
|
||||
PUBLIC_RADARR_BASE_URL,
|
||||
PUBLIC_SONARR_BASE_URL
|
||||
} from '$env/static/public';
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { setJellyfinItemUnwatched, setJellyfinItemWatched } from '$lib/apis/jellyfin/jellyfinApi';
|
||||
import { library, type LibraryItemStore } from '$lib/stores/library.store';
|
||||
import type { TitleType } from '$lib/types';
|
||||
@@ -40,7 +36,7 @@
|
||||
|
||||
function handleOpenInJellyfin() {
|
||||
window.open(
|
||||
PUBLIC_JELLYFIN_URL + '/web/index.html#!/details?id=' + $itemStore.item?.jellyfinItem?.Id
|
||||
env.PUBLIC_JELLYFIN_URL + '/web/index.html#!/details?id=' + $itemStore.item?.jellyfinItem?.Id
|
||||
);
|
||||
}
|
||||
</script>
|
||||
@@ -63,7 +59,7 @@
|
||||
<ContextMenuItem
|
||||
disabled={!$itemStore.item.radarrMovie}
|
||||
on:click={() =>
|
||||
window.open(PUBLIC_RADARR_BASE_URL + '/movie/' + $itemStore.item?.radarrMovie?.tmdbId)}
|
||||
window.open(env.PUBLIC_RADARR_BASE_URL + '/movie/' + $itemStore.item?.radarrMovie?.tmdbId)}
|
||||
>
|
||||
Open in Radarr
|
||||
</ContextMenuItem>
|
||||
@@ -71,7 +67,9 @@
|
||||
<ContextMenuItem
|
||||
disabled={!$itemStore.item.sonarrSeries}
|
||||
on:click={() =>
|
||||
window.open(PUBLIC_SONARR_BASE_URL + '/series/' + $itemStore.item?.sonarrSeries?.titleSlug)}
|
||||
window.open(
|
||||
env.PUBLIC_SONARR_BASE_URL + '/series/' + $itemStore.item?.sonarrSeries?.titleSlug
|
||||
)}
|
||||
>
|
||||
Open in Sonarr
|
||||
</ContextMenuItem>
|
||||
|
||||
Reference in New Issue
Block a user