chore: keep showing VixSrc for Italian to avoid confusions

This commit is contained in:
WebStreamr 2025-06-26 12:31:12 +00:00
parent adae573a0f
commit d44da650bd
No known key found for this signature in database
3 changed files with 10 additions and 8 deletions

View file

@ -10,7 +10,7 @@ export class VixSrc implements Source {
public readonly contentTypes: ContentType[] = ['movie', 'series'];
public readonly countryCodes: CountryCode[] = [CountryCode.multi];
public readonly countryCodes: CountryCode[] = [CountryCode.multi, CountryCode.it];
private readonly baseUrl = 'https://vixsrc.to';

View file

@ -74,6 +74,11 @@ exports[`buildManifest has unchecked source without a config 1`] = `
"title": "Castilian Spanish 🇪🇸 (VerHdLink)",
"type": "checkbox",
},
{
"key": "it",
"title": "Italian 🇮🇹 (VixSrc)",
"type": "checkbox",
},
{
"key": "mx",
"title": "Latin American Spanish 🇲🇽 (VerHdLink)",

View file

@ -34,13 +34,10 @@ export const buildManifest = (sources: Source[], config: Config): ManifestWithCo
};
const countryCodeSources: Partial<Record<CountryCode, Source[]>> = {};
sources.forEach((source) => {
if (source.countryCodes.includes(CountryCode.multi)) {
return;
}
source.countryCodes.forEach(countryCode => countryCodeSources[countryCode] = [...(countryCodeSources[countryCode] ?? []), source]);
});
sources.forEach(source =>
source.countryCodes
.filter(countryCode => countryCode !== CountryCode.multi)
.forEach(countryCode => countryCodeSources[countryCode] = [...(countryCodeSources[countryCode] ?? []), source]));
const sortedLanguageSources = typedEntries(countryCodeSources)
.sort(([countryCodeA], [countryCodeB]) => countryCodeA.localeCompare(countryCodeB));