diff --git a/package.json b/package.json index 92016b6f..d2a5dbb2 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "immer": "^10.0.2", "iso-639-1": "^3.1.0", "lodash.isequal": "^4.5.0", + "nanoid": "^5.0.4", "node-forge": "^1.3.1", "ofetch": "^1.0.0", "react": "^17.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 729e7e19..c2e88592 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,9 @@ dependencies: lodash.isequal: specifier: ^4.5.0 version: 4.5.0 + nanoid: + specifier: ^5.0.4 + version: 5.0.4 node-forge: specifier: ^1.3.1 version: 1.3.1 @@ -4753,6 +4756,12 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /nanoid@5.0.4: + resolution: {integrity: sha512-vAjmBf13gsmhXSgBrtIclinISzFFy22WwCYoyilZlsrRXNIHSwgFQ1bEdjRwMT3aoadeIF6HMuDRlOxzfXV8ig==} + engines: {node: ^18 || >=20} + hasBin: true + dev: false + /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true diff --git a/src/assets/languages.ts b/src/assets/languages.ts index 71c21fe2..d6c47905 100644 --- a/src/assets/languages.ts +++ b/src/assets/languages.ts @@ -27,4 +27,4 @@ export const locales = { }; export type Locales = keyof typeof locales; -export const rtlLocales: Locales[] = ["nl"]; +export const rtlLocales: Locales[] = []; diff --git a/src/backend/helpers/report.ts b/src/backend/helpers/report.ts index f9ac89a6..b7c32645 100644 --- a/src/backend/helpers/report.ts +++ b/src/backend/helpers/report.ts @@ -1,4 +1,5 @@ import { ScrapeMedia } from "@movie-web/providers"; +import { nanoid } from "nanoid"; import { ofetch } from "ofetch"; import { useCallback } from "react"; @@ -8,6 +9,7 @@ import { PlayerMeta } from "@/stores/player/slices/source"; // for anybody who cares - these are anonymous metrics. // They are just used for figuring out if providers are broken or not const metricsEndpoint = "https://backend.movie-web.app/metrics/providers"; +const batchId = () => nanoid(32); export type ProviderMetric = { tmdbId: string; @@ -34,6 +36,7 @@ export async function reportProviders(items: ProviderMetric[]): Promise { method: "POST", body: { items, + batchId: batchId(), }, }); }