Skip to content

Commit 1ee6a04

Browse files
committed
fix(simkl): adds simkl links to movies
1 parent 9a5d845 commit 1ee6a04

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/components/views/panel/MoviePanelDetails.vue

+11-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { capitalizeEachWord, deCapitalise } from '@dvcol/common-utils/common/str
44
import { NFlex } from 'naive-ui';
55
import { computed, type PropType, toRefs } from 'vue';
66
7-
import type { TraktMovieExtended } from '@dvcol/trakt-http-client/models';
7+
import type { SimklIdsExtended } from '@dvcol/simkl-http-client/models';
8+
import type { TraktApiIds, TraktMovieExtended } from '@dvcol/trakt-http-client/models';
89
910
import TextField from '~/components/common/typography/TextField.vue';
1011
import PanelAlias from '~/components/views/panel/PanelAlias.vue';
@@ -74,6 +75,14 @@ const simklMovie = computed(() => {
7475
return getMovie(movie.value.ids.imdb).value;
7576
});
7677
78+
const ids = computed(() => {
79+
if (!movie?.value) return;
80+
return {
81+
...simklMovie.value?.ids,
82+
...movie.value?.ids,
83+
} as Partial<TraktApiIds & SimklIdsExtended>;
84+
});
85+
7786
const genres = computed(() => {
7887
if (!movie?.value) return;
7988
const _genres = new Set<string>();
@@ -117,12 +126,7 @@ const movieTitle = computed(() => deCapitalise(movie?.value?.title));
117126
/>
118127

119128
<!-- links -->
120-
<PanelLinks
121-
:ids="movie?.ids"
122-
mode="movie"
123-
:title="movieTitle"
124-
:alias="movieAlias"
125-
/>
129+
<PanelLinks mode="movie" :ids="ids" :title="movieTitle" :alias="movieAlias" />
126130
</NFlex>
127131

128132
<!-- Movie name alias -->

0 commit comments

Comments
 (0)