diff --git a/docs/api-reference/openapi.json b/docs/api-reference/openapi.json index 4e9b353..8699810 100644 --- a/docs/api-reference/openapi.json +++ b/docs/api-reference/openapi.json @@ -4217,8 +4217,8 @@ }, "source": { "type": "string", - "example": "allthingsyoutube", - "description": "Extractor or upstream implementation that produced the normalized response." + "example": "video2ctx", + "description": "Service or upstream implementation that produced the normalized response." }, "fetchedAt": { "type": "string", diff --git a/platform/src/lib/youtube.ts b/platform/src/lib/youtube.ts index 8710cb5..d06d3c0 100644 --- a/platform/src/lib/youtube.ts +++ b/platform/src/lib/youtube.ts @@ -79,7 +79,7 @@ export function withYouTubeMetadata(value: T): T { if (!metadata || typeof metadata !== 'object' || Array.isArray(metadata)) return value; return { ...record, - meta: { ...metadata, source: 'allthingsyoutube', provider: 'youtube' }, + meta: { ...metadata, source: 'video2ctx', provider: 'youtube' }, } as T; } diff --git a/platform/src/openapi.ts b/platform/src/openapi.ts index 930b954..ecdce49 100644 --- a/platform/src/openapi.ts +++ b/platform/src/openapi.ts @@ -77,7 +77,7 @@ const sourceMetadata: Schema = { required: ['provider', 'source', 'fetchedAt', 'partial', 'warnings'], properties: { provider: { type: 'string', enum: PROVIDER_IDS, description: 'Platform that owns the source resource.' }, - source: { type: 'string', example: 'allthingsyoutube', description: 'Extractor or upstream implementation that produced the normalized response.' }, + source: { type: 'string', example: 'video2ctx', description: 'Service or upstream implementation that produced the normalized response.' }, fetchedAt: { type: 'string', format: 'date-time' }, partial: { type: 'boolean' }, warnings: { type: 'array', items: { type: 'string' } }, diff --git a/platform/test/contracts.test.ts b/platform/test/contracts.test.ts index 30637f3..247f981 100644 --- a/platform/test/contracts.test.ts +++ b/platform/test/contracts.test.ts @@ -16,7 +16,7 @@ describe('universal input routing', () => { }); describe('public source metadata', () => { - test('brands cached provider metadata as allthingsyoutube', async () => { + test('brands cached provider metadata as video2ctx', async () => { const snapshot = { type: 'video', id: 'abcdefghijk', title: 'Cached video', channel: { id: '', name: '', url: '' }, thumbnails: [], isLive: false, url: 'https://youtube.com/watch?v=abcdefghijk', keywords: [], @@ -36,7 +36,7 @@ describe('public source metadata', () => { const video = await getVideo(env, 'abcdefghijk'); - expect(video.meta.source).toBe('allthingsyoutube'); + expect(video.meta.source).toBe('video2ctx'); expect((video.meta as typeof video.meta & { provider: string }).provider).toBe('youtube'); }); }); diff --git a/platform/test/youtube-package-adapter.test.ts b/platform/test/youtube-package-adapter.test.ts index 79b5c31..857f2c6 100644 --- a/platform/test/youtube-package-adapter.test.ts +++ b/platform/test/youtube-package-adapter.test.ts @@ -187,7 +187,7 @@ describe('platform YouTube container adapter', () => { expect(stale.cacheStatus).toBe('stale'); expect(stale.value).toMatchObject({ id: 'abcdefghijk', - meta: { source: 'allthingsyoutube' }, + meta: { source: 'video2ctx' }, freshness: { state: 'stale', reason: 'UPSTREAM_UNAVAILABLE' }, }); });