itube-specs 0.0.300 → 0.0.302

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,8 +29,7 @@ export const useFetchModels = async (
29
29
  'per-page': 48,
30
30
  },
31
31
  getSelectedQuery(route, sortModels) || '-popularity',
32
- unref(filters),
33
- ''
32
+ unref(filters)
34
33
  )(),
35
34
  {
36
35
  watch: [() => route.query],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.300",
4
+ "version": "0.0.302",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
@@ -4,6 +4,6 @@ export const cleanCategoryCard = (card: IRawCategoryCard): ICategoryCard => ({
4
4
  name: card.name,
5
5
  title: card.title,
6
6
  videosCount: card.videosCount,
7
- thumbUrl: card.video_thumb_urls.webp['480x270'],
7
+ thumbUrl: card.video_thumb_urls?.webp?.['480x270'],
8
8
  guid: card.guid,
9
9
  })
@@ -5,5 +5,5 @@ export const cleanCategoryInfo = (card: IRawCategoryInfo): ICardInfo => ({
5
5
  title: card.title,
6
6
  videosCount: card.videosCount,
7
7
  description: card.description,
8
- thumbUrl: card.video_thumb_urls.webp['480x270'],
8
+ thumbUrl: card.video_thumb_urls?.webp?.['480x270'],
9
9
  })
@@ -8,5 +8,5 @@ export const cleanChannelCard = (card: IRawChannelCard): IChannelCard => ({
8
8
  isNetwork: card.is_network,
9
9
  updated: card.updated,
10
10
  avatarUrl: card.avatar_url,
11
- thumbUrl: card.video_thumb_urls.webp['480x270'],
11
+ thumbUrl: card.video_thumb_urls.webp?.['480x270'],
12
12
  })
@@ -9,5 +9,5 @@ export const cleanChannelInfo = (card: IRawChannelInfo): ICardInfo => ({
9
9
  isNetwork: card.is_network,
10
10
  updated: card.updated,
11
11
  avatarUrl: card.avatar_url,
12
- thumbUrl: card.video_thumb_urls.webp['480x270'],
12
+ thumbUrl: card.video_thumb_urls.webp?.['480x270'],
13
13
  })
@@ -3,7 +3,7 @@ import type { IRawModelCard, IModelCard } from '../../../types';
3
3
  export const cleanModelCard = (card: IRawModelCard): IModelCard => ({
4
4
  title: card.title || '',
5
5
  videosCount: card.videos_count || 0,
6
- thumbUrl: card.video_thumb_urls.webp[ '480x270' ] || '',
6
+ thumbUrl: card.video_thumb_urls?.webp?.['480x270'] || '',
7
7
  primaryImageUrl: card.primary_image_url || '',
8
8
  guid: card.guid || '',
9
- })
9
+ });
@@ -6,6 +6,6 @@ export const cleanModelInfo = (card: IRawModelInfo): ICardInfo => ({
6
6
  social: card.social,
7
7
  orientation: card.orientation,
8
8
  videosCount: card.videos_count,
9
- thumbUrl: card.video_thumb_urls?.webp['480x270'],
9
+ thumbUrl: card.video_thumb_urls?.webp?.['480x270'],
10
10
  parameters: card.parameters,
11
11
  })
@@ -6,7 +6,7 @@ export const cleanPlaylistCard = (card: IRawPlaylistCard): IPlaylistCard => ({
6
6
  name: card.name,
7
7
  username: card.username,
8
8
  playlistType: card.playlist_type,
9
- thumbUrls: card.thumbs?.map(item => item.urls.webp['480x270']),
9
+ thumbUrls: card.thumbs?.map(item => item.urls.webp?.['480x270']),
10
10
  videosCount: card.videos_count,
11
11
  firstVideoId: card.first_video_id,
12
12
  searchTags: card.search_tags,
@@ -13,7 +13,7 @@ export const cleanVideoCard = (card: IRawVideoCard): IVideoCard => ({
13
13
  channelName: card.channel?.name,
14
14
  url: card.url,
15
15
  previewUrl: card.preview_url,
16
- thumbUrl: card.thumb_urls?.webp['480x270'],
16
+ thumbUrl: card.thumb_urls?.webp?.['480x270'],
17
17
  md5: card.md5,
18
18
  thumbNum: card.thumb_number,
19
19
  })
@@ -17,7 +17,7 @@ export const cleanVideoData = (data: IRawVideoData): IVideoData => ({
17
17
  channelAvatar: data.channel?.avatar || '',
18
18
  url: data.url || '',
19
19
  previewUrl: data.preview_url || '',
20
- thumbUrl: data.thumb_urls?.webp['480x270'] || '',
20
+ thumbUrl: data.thumb_urls?.webp?.['480x270'] || '',
21
21
  vttUrl: data.vtt_url || '',
22
22
  vttSpriteUrl: data.vtt_sprite_url || '',
23
23
  created: data.created || 0,