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 | 79 | 'custom-source': 'Custom Source', |
| 80 | 80 | 'onlinestream-provider': 'Online Streaming', |
| 81 | 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 | 91 | export function contentTypeLabel(type: string): string { |
docs/.vitepress/theme/components/extrepo/types.ts
+1
| @@ -25,6 +25,7 @@ export interface RepoSite { |
| 25 | 25 | url: string |
| 26 | 26 | rating: Rating |
| 27 | 27 | contentType?: string |
| 28 | contentTypes?: string[] |
| 28 | 29 | isBroken?: boolean |
| 29 | 30 | installUrl?: string |
| 30 | 31 | author?: string |
docs/.vitepress/theme/components/extrepo/useRepoFilter.ts
+8 −1
| @@ -50,6 +50,11 @@ export function useRepoFilter( |
| 50 | 50 | let hasBroken = false |
| 51 | 51 | for (const site of allSites.value) { |
| 52 | 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 | 58 | if (site.rating !== 'safe') hasRatings = true |
| 54 | 59 | if (site.rating === 'mixed') hasMixed = true |
| 55 | 60 | if (site.rating === 'suggestive') hasSuggestive = true |
| @@ -88,7 +93,9 @@ export function useRepoFilter( |
| 88 | 93 | if (q && !site.hay.includes(q)) return false |
| 89 | 94 | if (lang && site.lang !== lang) return false |
| 90 | 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 | 99 | return true |
| 93 | 100 | }) |
| 94 | 101 | return dedupeSites(filtered) |
docs/ext/extensionRepos/parsers.ts
+4
| @@ -217,6 +217,7 @@ interface StremioAddon { |
| 217 | 217 | icon?: string | null |
| 218 | 218 | manifestUrl: string |
| 219 | 219 | configureUrl?: string | null |
| 220 | types?: string[] | null |
| 220 | 221 | nsfw?: boolean |
| 221 | 222 | } |
| 222 | 223 | |
| @@ -612,6 +613,9 @@ function toRepoDataStremio(index: StremioCollection): RepoSite[] { |
| 612 | 613 | icon: addon.icon ?? '', |
| 613 | 614 | url: '', |
| 614 | 615 | rating: addon.nsfw ? 'nsfw' : 'safe', |
| 616 | contentTypes: addon.types?.length |
| 617 | ? [...new Set(addon.types.filter(Boolean))] |
| 618 | : undefined, |
| 615 | 619 | installUrl: addon.manifestUrl, |
| 616 | 620 | copyUrl: addon.manifestUrl, |
| 617 | 621 | configureUrl: addon.configureUrl ?? undefined |