@@ -11,10 +11,8 @@ import type {
11
11
import FloatingButton from ' ~/components/common/buttons/FloatingButton.vue' ;
12
12
import ListScroll from ' ~/components/common/list/ListScroll.vue' ;
13
13
import { useHistoryStore , useHistoryStoreRefs } from ' ~/stores/data/history.store' ;
14
- import { useImageStore , useImageStoreRefs } from ' ~/stores/data/image.store' ;
15
14
import { useUserSettingsStoreRefs } from ' ~/stores/settings/user.store' ;
16
15
import { useI18n } from ' ~/utils' ;
17
- import { findClosestMatch } from ' ~/utils/math.utils' ;
18
16
19
17
const { filteredHistory, pagination, loading, pageSize, belowThreshold } =
20
18
useHistoryStoreRefs ();
@@ -42,15 +40,6 @@ onMounted(() => {
42
40
});
43
41
});
44
42
45
- const { getImageUrl } = useImageStore ();
46
- const { imageSizes } = useImageStoreRefs ();
47
-
48
- const size = computed (() =>
49
- imageSizes .value ?.poster ?.length
50
- ? findClosestMatch (200 , imageSizes .value .poster )
51
- : ' original' ,
52
- );
53
-
54
43
const history = computed <ListScrollItem []>(() => {
55
44
const array = filteredHistory .value ;
56
45
if (! array .length ) return [];
@@ -62,24 +51,6 @@ const history = computed<ListScrollItem[]>(() => {
62
51
else if (' season' in _item ) _item .type = ' season' ;
63
52
else if (' show' in _item ) _item .type = ' show' ;
64
53
65
- if (! _item ?.poster && _item .type && _item ?.movie ?.ids ?.tmdb ) {
66
- _item .poster = getImageUrl (
67
- {
68
- id: _item .movie .ids .tmdb ,
69
- type: _item .type ,
70
- },
71
- size .value ,
72
- );
73
- } else if (! _item ?.poster && _item .type && _item ?.show ?.ids ?.tmdb ) {
74
- _item .poster = getImageUrl (
75
- {
76
- id: _item .show .ids .tmdb ,
77
- type: ' show' ,
78
- },
79
- size .value ,
80
- );
81
- }
82
-
83
54
if (! item .watched_at ) return _item ;
84
55
85
56
const date: ListScrollItem [' date' ] = { current: new Date (item .watched_at ) };
0 commit comments