diff --git a/app/components/HomeMovieCard.vue b/app/components/HomeMovieCard.vue index bdb77d4..257e12e 100644 --- a/app/components/HomeMovieCard.vue +++ b/app/components/HomeMovieCard.vue @@ -32,23 +32,8 @@ const isDescriptionExpanded = ref(false); const previewStyle = ref>({}); let hideTimer: ReturnType | undefined; -const movieSourcesQuery = computed(() => - ( - props.movie.sources || [ - { source: props.movie.source, slug: props.movie.slug }, - ] - ) - .filter((source) => source.source && source.slug) - .map((source) => `${source.source}:${source.slug}`) - .join(","), -); - const movieLink = computed(() => ({ path: `/phim/${props.movie.slug}`, - query: { - source: props.movie.source, - srcs: movieSourcesQuery.value || undefined, - }, })); function showPreview(event: MouseEvent) { diff --git a/app/pages/index.vue b/app/pages/index.vue index 79edc43..e398691 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -188,9 +188,6 @@ function formatCommentContent(content: string, maxLength = 120) { function movieLinkFromSection(movie: any) { return { path: `/phim/${movie?.slug}`, - query: { - source: movie?.source, - }, } } @@ -210,24 +207,11 @@ function genreTagColor(index: number) { return colors[index % colors.length] } -function movieSourcesQuery(movie: any) { - return (movie?.sources || [{ source: movie?.source, slug: movie?.slug }]) - .filter((source: any) => source.source && source.slug) - .map((source: any) => `${source.source}:${source.slug}`) - .join(',') -} - function movieLink(movie: any) { return { path: `/phim/${movie?.slug}`, - query: { - source: movie?.source, - srcs: movieSourcesQuery(movie) || undefined, - }, } } - - function goToSlide(index: number) { heroSliderRef.value?.goTo(index) } @@ -236,7 +220,6 @@ function watchHistoryLink(item: WatchHistoryItem) { return { path: `/xem/${item.slug}`, query: { - source: item.source, server: item.serverIndex || 0, ep: (item.episodeIndex || 0) + 1, }, @@ -296,7 +279,7 @@ watch(hero, async (currentHero) => { return } - const cacheKey = `${currentHero.source}:${currentHero.slug}` + const cacheKey = currentHero.slug if (heroDetailCache.has(cacheKey)) { heroDetail.value = heroDetailCache.get(cacheKey) return @@ -304,15 +287,10 @@ watch(hero, async (currentHero) => { heroDetail.value = null try { - const detail = await $fetch(`/api/movies/${currentHero.slug}`, { - query: { - source: currentHero.source, - srcs: movieSourcesQuery(currentHero) || undefined, - }, - }) + const detail = await $fetch(`/api/movies/${currentHero.slug}`) heroDetailCache.set(cacheKey, detail) - if (hero.value?.slug === currentHero.slug && hero.value?.source === currentHero.source) { + if (hero.value?.slug === currentHero.slug) { heroDetail.value = detail } } catch { diff --git a/app/pages/lich-chieu.vue b/app/pages/lich-chieu.vue index d75586b..e825a20 100644 --- a/app/pages/lich-chieu.vue +++ b/app/pages/lich-chieu.vue @@ -190,7 +190,7 @@ useHead({
diff --git a/app/pages/lich-su.vue b/app/pages/lich-su.vue index 15aa8b4..a922637 100644 --- a/app/pages/lich-su.vue +++ b/app/pages/lich-su.vue @@ -15,7 +15,6 @@ function watchHistoryLink(item: WatchHistoryItem) { return { path: `/xem/${item.slug}`, query: { - source: item.source, server: item.serverIndex || 0, ep: (item.episodeIndex || 0) + 1, }, diff --git a/app/pages/phim/[slug].vue b/app/pages/phim/[slug].vue index d3888c0..497c2b4 100644 --- a/app/pages/phim/[slug].vue +++ b/app/pages/phim/[slug].vue @@ -1,7 +1,5 @@