Commit e450ad6a66
e450ad6a66fbaacd218a1a8271e74dadbcc81cae
parent: 7bd09cab35
Unsigned
Duck <57977673+woducku@users.noreply.github.com> · 2026-10-25 16:59 UTC
type
Layout: unified · split
docs/.vitepress/theme/components/extrepo/helpers.ts
+7 −1
| @@ -79,7 +79,13 @@ const CONTENT_TYPE_LABELS: Record<string, string> = { |
| 79 | 'custom-source': 'Custom Source', |
79 | 'custom-source': 'Custom Source', |
| 80 | 'onlinestream-provider': 'Online Streaming', |
80 | 'onlinestream-provider': 'Online Streaming', |
| 81 | 'manga-provider': 'Manga Provider', |
81 | 'manga-provider': 'Manga Provider', |
| 82 | 'anime-torrent-provider': 'Anime Torrent' |
82 | 'anime-torrent-provider': 'Anime Torrent', |
| |
83 | movie: 'Movie', |
| |
84 | series: 'Series', |
| |
85 | anime: 'Anime', |
| |
86 | tv: 'TV', |
| |
87 | channel: 'Channel', |
| |
88 | other: 'Other' |
| 83 | } |
89 | } |
| 84 | |
90 | |
| 85 | export function contentTypeLabel(type: string): string { |
91 | export function contentTypeLabel(type: string): string { |
docs/.vitepress/theme/components/extrepo/types.ts
+1
| @@ -25,6 +25,7 @@ export interface RepoSite { |
| 25 | url: string |
25 | url: string |
| 26 | rating: Rating |
26 | rating: Rating |
| 27 | contentType?: string |
27 | contentType?: string |
| |
28 | contentTypes?: string[] |
| 28 | isBroken?: boolean |
29 | isBroken?: boolean |
| 29 | installUrl?: string |
30 | installUrl?: string |
| 30 | author?: string |
31 | author?: string |
docs/.vitepress/theme/components/extrepo/useRepoFilter.ts
+8 −1
| @@ -50,6 +50,11 @@ export function useRepoFilter( |
| 50 | let hasBroken = false |
50 | let hasBroken = false |
| 51 | for (const site of allSites.value) { |
51 | for (const site of allSites.value) { |
| 52 | if (site.contentType) contentTypes.add(site.contentType) |
52 | if (site.contentType) contentTypes.add(site.contentType) |
| |
53 | if (site.contentTypes) { |
| |
54 | for (const type of site.contentTypes) { |
| |
55 | if (type) contentTypes.add(type) |
| |
56 | } |
| |
57 | } |
| 53 | if (site.rating !== 'safe') hasRatings = true |
58 | if (site.rating !== 'safe') hasRatings = true |
| 54 | if (site.rating === 'mixed') hasMixed = true |
59 | if (site.rating === 'mixed') hasMixed = true |
| 55 | if (site.rating === 'suggestive') hasSuggestive = true |
60 | if (site.rating === 'suggestive') hasSuggestive = true |
| @@ -88,7 +93,9 @@ export function useRepoFilter( |
| 88 | if (q && !site.hay.includes(q)) return false |
93 | if (q && !site.hay.includes(q)) return false |
| 89 | if (lang && site.lang !== lang) return false |
94 | if (lang && site.lang !== lang) return false |
| 90 | if (rating !== 'all' && site.rating !== rating) return false |
95 | if (rating !== 'all' && site.rating !== rating) return false |
| 91 | if (ctype && site.contentType !== ctype) return false |
96 | if (ctype && site.contentType !== ctype) { |
| |
97 | if (!site.contentTypes?.includes(ctype)) return false |
| |
98 | } |
| 92 | return true |
99 | return true |
| 93 | }) |
100 | }) |
| 94 | return dedupeSites(filtered) |
101 | return dedupeSites(filtered) |
docs/ext/extensionRepos/parsers.ts
+4
| @@ -217,6 +217,7 @@ interface StremioAddon { |
| 217 | icon?: string | null |
217 | icon?: string | null |
| 218 | manifestUrl: string |
218 | manifestUrl: string |
| 219 | configureUrl?: string | null |
219 | configureUrl?: string | null |
| |
220 | types?: string[] | null |
| 220 | nsfw?: boolean |
221 | nsfw?: boolean |
| 221 | } |
222 | } |
| 222 | |
223 | |
| @@ -612,6 +613,9 @@ function toRepoDataStremio(index: StremioCollection): RepoSite[] { |
| 612 | icon: addon.icon ?? '', |
613 | icon: addon.icon ?? '', |
| 613 | url: '', |
614 | url: '', |
| 614 | rating: addon.nsfw ? 'nsfw' : 'safe', |
615 | rating: addon.nsfw ? 'nsfw' : 'safe', |
| |
616 | contentTypes: addon.types?.length |
| |
617 | ? [...new Set(addon.types.filter(Boolean))] |
| |
618 | : undefined, |
| 615 | installUrl: addon.manifestUrl, |
619 | installUrl: addon.manifestUrl, |
| 616 | copyUrl: addon.manifestUrl, |
620 | copyUrl: addon.manifestUrl, |
| 617 | configureUrl: addon.configureUrl ?? undefined |
621 | configureUrl: addon.configureUrl ?? undefined |