@redseat/api 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.d.ts +24 -0
- package/dist/library.js +30 -0
- package/package.json +1 -1
package/dist/library.d.ts
CHANGED
|
@@ -176,7 +176,31 @@ export declare class LibraryApi {
|
|
|
176
176
|
updatePersonPortrait(personId: string, portrait: FormData): Promise<void>;
|
|
177
177
|
searchSeries(name: string): Promise<ISerie[]>;
|
|
178
178
|
setEpisodeWatched(serieId: string, season: number, number: number, date: number): Promise<void>;
|
|
179
|
+
/**
|
|
180
|
+
* Searches for available media sources for a specific episode.
|
|
181
|
+
* @param serieId - The series identifier
|
|
182
|
+
* @param season - The season number
|
|
183
|
+
* @param episode - The episode number
|
|
184
|
+
* @returns Array of available media requests that can be used to download/stream the episode
|
|
185
|
+
*/
|
|
179
186
|
searchEpisodeMedias(serieId: string, season: number, episode: number): Promise<RsRequest[]>;
|
|
187
|
+
/**
|
|
188
|
+
* Adds a searched episode media to the database for download/storage.
|
|
189
|
+
* @param serieId - The series identifier
|
|
190
|
+
* @param season - The season number
|
|
191
|
+
* @param episode - The episode number
|
|
192
|
+
* @param request - The media request to add (typically from searchEpisodeMedias results)
|
|
193
|
+
* @returns The created media file entry
|
|
194
|
+
*/
|
|
195
|
+
addSearchedEpisodeMedia(serieId: string, season: number, episode: number, request: RsRequest): Promise<IFile>;
|
|
196
|
+
/**
|
|
197
|
+
* Checks if a request can be made permanent (saved for later use).
|
|
198
|
+
* Tests the availability of the URL and returns a permanent version if valid.
|
|
199
|
+
* @param request - The request to check for permanence
|
|
200
|
+
* @returns The request with `permanent: true` if the URL is valid and can be saved
|
|
201
|
+
* @throws Error if the URL is not available or cannot be made permanent
|
|
202
|
+
*/
|
|
203
|
+
checkRequestPermanent(request: RsRequest): Promise<RsRequest>;
|
|
180
204
|
getUnassignedFaces(params?: Map<string, string>): Promise<any>;
|
|
181
205
|
getClusters(): Promise<any>;
|
|
182
206
|
assignFaces(request: any): Promise<any>;
|
package/dist/library.js
CHANGED
|
@@ -425,10 +425,40 @@ export class LibraryApi {
|
|
|
425
425
|
async setEpisodeWatched(serieId, season, number, date) {
|
|
426
426
|
await this.client.post(this.getUrl(`/series/${serieId}/seasons/${season}/episodes/${number}/watched`), { date });
|
|
427
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* Searches for available media sources for a specific episode.
|
|
430
|
+
* @param serieId - The series identifier
|
|
431
|
+
* @param season - The season number
|
|
432
|
+
* @param episode - The episode number
|
|
433
|
+
* @returns Array of available media requests that can be used to download/stream the episode
|
|
434
|
+
*/
|
|
428
435
|
async searchEpisodeMedias(serieId, season, episode) {
|
|
429
436
|
const res = await this.client.get(this.getUrl(`/series/${serieId}/seasons/${season}/episodes/${episode}/search`));
|
|
430
437
|
return res.data;
|
|
431
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* Adds a searched episode media to the database for download/storage.
|
|
441
|
+
* @param serieId - The series identifier
|
|
442
|
+
* @param season - The season number
|
|
443
|
+
* @param episode - The episode number
|
|
444
|
+
* @param request - The media request to add (typically from searchEpisodeMedias results)
|
|
445
|
+
* @returns The created media file entry
|
|
446
|
+
*/
|
|
447
|
+
async addSearchedEpisodeMedia(serieId, season, episode, request) {
|
|
448
|
+
const res = await this.client.post(this.getUrl(`/series/${serieId}/seasons/${season}/episodes/${episode}/search`), request);
|
|
449
|
+
return res.data;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Checks if a request can be made permanent (saved for later use).
|
|
453
|
+
* Tests the availability of the URL and returns a permanent version if valid.
|
|
454
|
+
* @param request - The request to check for permanence
|
|
455
|
+
* @returns The request with `permanent: true` if the URL is valid and can be saved
|
|
456
|
+
* @throws Error if the URL is not available or cannot be made permanent
|
|
457
|
+
*/
|
|
458
|
+
async checkRequestPermanent(request) {
|
|
459
|
+
const res = await this.client.post(this.getUrl('/plugins/requests/permanent'), request);
|
|
460
|
+
return res.data;
|
|
461
|
+
}
|
|
432
462
|
async getUnassignedFaces(params) {
|
|
433
463
|
const queryParams = {};
|
|
434
464
|
if (params) {
|