@francofantomius/jellyfin 0.1.0 → 0.2.0
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/README.md +69 -0
- package/dist/index.cjs +392 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +175 -3
- package/dist/index.d.ts +175 -3
- package/dist/index.js +387 -15
- package/dist/index.js.map +1 -1
- package/package.json +9 -1
package/dist/index.d.cts
CHANGED
|
@@ -255,7 +255,17 @@ interface GetSongsOptions {
|
|
|
255
255
|
interface SearchOptions {
|
|
256
256
|
limit?: number;
|
|
257
257
|
startIndex?: number;
|
|
258
|
-
|
|
258
|
+
parentId?: string;
|
|
259
|
+
includeItemTypes?: string | string[];
|
|
260
|
+
mediaTypes?: string | string[];
|
|
261
|
+
genres?: string[];
|
|
262
|
+
years?: number[];
|
|
263
|
+
isFavorite?: boolean;
|
|
264
|
+
sortBy?: string;
|
|
265
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
266
|
+
fields?: string;
|
|
267
|
+
recursive?: boolean;
|
|
268
|
+
userId?: string;
|
|
259
269
|
}
|
|
260
270
|
interface CreatePlaylistDto {
|
|
261
271
|
Name: string;
|
|
@@ -491,6 +501,49 @@ interface DownloadItemOptions {
|
|
|
491
501
|
index?: number;
|
|
492
502
|
quality?: VideoQualityPresetKey | VideoQualityOption | number | string;
|
|
493
503
|
}
|
|
504
|
+
interface GetResumeItemsOptions {
|
|
505
|
+
userId?: string;
|
|
506
|
+
limit?: number;
|
|
507
|
+
startIndex?: number;
|
|
508
|
+
parentId?: string;
|
|
509
|
+
mediaTypes?: string[];
|
|
510
|
+
enableImages?: boolean;
|
|
511
|
+
enableUserData?: boolean;
|
|
512
|
+
imageTypeLimit?: number;
|
|
513
|
+
enableImageTypes?: string[];
|
|
514
|
+
fields?: string;
|
|
515
|
+
}
|
|
516
|
+
interface GetNextUpOptions {
|
|
517
|
+
userId?: string;
|
|
518
|
+
parentId?: string;
|
|
519
|
+
seriesId?: string;
|
|
520
|
+
limit?: number;
|
|
521
|
+
startIndex?: number;
|
|
522
|
+
fields?: string;
|
|
523
|
+
enableImages?: boolean;
|
|
524
|
+
enableUserData?: boolean;
|
|
525
|
+
enableTotalRecordCount?: boolean;
|
|
526
|
+
imageTypeLimit?: number;
|
|
527
|
+
enableImageTypes?: string[];
|
|
528
|
+
disableFirstEpisode?: boolean;
|
|
529
|
+
nextUpDateCutoff?: string;
|
|
530
|
+
}
|
|
531
|
+
interface GetLatestMediaOptions {
|
|
532
|
+
userId?: string;
|
|
533
|
+
parentId?: string;
|
|
534
|
+
limit?: number;
|
|
535
|
+
fields?: string;
|
|
536
|
+
includeItemTypes?: string[];
|
|
537
|
+
isPlayed?: boolean;
|
|
538
|
+
enableImages?: boolean;
|
|
539
|
+
imageTypeLimit?: number;
|
|
540
|
+
enableImageTypes?: string[];
|
|
541
|
+
groupItems?: boolean;
|
|
542
|
+
}
|
|
543
|
+
interface StopActiveEncodingOptions {
|
|
544
|
+
playSessionId: string;
|
|
545
|
+
deviceId?: string;
|
|
546
|
+
}
|
|
494
547
|
|
|
495
548
|
interface RequestOptions {
|
|
496
549
|
method?: string;
|
|
@@ -746,8 +799,11 @@ declare class PlaybackModule {
|
|
|
746
799
|
reportProgress(itemId: string, positionTicks?: number, isPaused?: boolean): Promise<void>;
|
|
747
800
|
/**
|
|
748
801
|
* Report that playback has stopped for an item.
|
|
802
|
+
* Optionally teardown active transcoding session if playSessionId is provided.
|
|
749
803
|
*/
|
|
750
|
-
reportStopped(itemId: string, positionTicks?: number
|
|
804
|
+
reportStopped(itemId: string, positionTicks?: number, options?: {
|
|
805
|
+
playSessionId?: string;
|
|
806
|
+
}): Promise<void>;
|
|
751
807
|
}
|
|
752
808
|
|
|
753
809
|
declare class MediaModule {
|
|
@@ -966,6 +1022,117 @@ declare class OfflineStorageManager {
|
|
|
966
1022
|
formatBytes(bytes: number): string;
|
|
967
1023
|
}
|
|
968
1024
|
|
|
1025
|
+
declare class ResumeModule {
|
|
1026
|
+
private http;
|
|
1027
|
+
private getUserId;
|
|
1028
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1029
|
+
private resolveUserId;
|
|
1030
|
+
/**
|
|
1031
|
+
* Fetch items currently in-progress for the user via /UserItems/Resume.
|
|
1032
|
+
*/
|
|
1033
|
+
getResumeItems(options?: GetResumeItemsOptions): Promise<ItemsResponse>;
|
|
1034
|
+
/**
|
|
1035
|
+
* Convenience alias for getResumeItems.
|
|
1036
|
+
*/
|
|
1037
|
+
getItems(options?: GetResumeItemsOptions): Promise<ItemsResponse>;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
declare class NextUpModule {
|
|
1041
|
+
private http;
|
|
1042
|
+
private getUserId;
|
|
1043
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1044
|
+
private resolveUserId;
|
|
1045
|
+
/**
|
|
1046
|
+
* Fetch the next unplayed episodes for followed series via /Shows/NextUp.
|
|
1047
|
+
*/
|
|
1048
|
+
getNextUp(options?: GetNextUpOptions): Promise<ItemsResponse>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Convenience alias for getNextUp.
|
|
1051
|
+
*/
|
|
1052
|
+
getEpisodes(options?: GetNextUpOptions): Promise<ItemsResponse>;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
declare class LatestModule {
|
|
1056
|
+
private http;
|
|
1057
|
+
private getUserId;
|
|
1058
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1059
|
+
private resolveUserId;
|
|
1060
|
+
/**
|
|
1061
|
+
* Fetch recently added media items for the user via /Users/{userId}/Items/Latest.
|
|
1062
|
+
*/
|
|
1063
|
+
getLatest(options?: GetLatestMediaOptions): Promise<BaseItemDto[]>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Convenience helper to fetch recently added movies.
|
|
1066
|
+
*/
|
|
1067
|
+
getLatestMovies(options?: Omit<GetLatestMediaOptions, 'includeItemTypes'>): Promise<BaseItemDto[]>;
|
|
1068
|
+
/**
|
|
1069
|
+
* Convenience helper to fetch recently added TV episodes.
|
|
1070
|
+
*/
|
|
1071
|
+
getLatestEpisodes(options?: Omit<GetLatestMediaOptions, 'includeItemTypes'>): Promise<BaseItemDto[]>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Convenience helper to fetch recently added music albums.
|
|
1074
|
+
*/
|
|
1075
|
+
getLatestAlbums(options?: Omit<GetLatestMediaOptions, 'includeItemTypes'>): Promise<BaseItemDto[]>;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
declare class TranscodeModule {
|
|
1079
|
+
private http;
|
|
1080
|
+
private getDeviceId;
|
|
1081
|
+
constructor(http: HttpTransport, getDeviceId: () => string);
|
|
1082
|
+
/**
|
|
1083
|
+
* Explicitly stop an active server transcoding session via DELETE /Videos/ActiveEncodings.
|
|
1084
|
+
* This terminates lingering FFmpeg processes on the Jellyfin server.
|
|
1085
|
+
*
|
|
1086
|
+
* @param playSessionId The unique playback session ID.
|
|
1087
|
+
* @param deviceId The client device ID (defaults to configured client device ID).
|
|
1088
|
+
*/
|
|
1089
|
+
stopActiveEncoding(playSessionId: string, deviceId?: string): Promise<void>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Convenience alias for stopActiveEncoding.
|
|
1092
|
+
*/
|
|
1093
|
+
stop(playSessionId: string, deviceId?: string): Promise<void>;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
declare const COMMON_SEARCH_FIELDS = "PrimaryImageAspectRatio,PrimaryImageTag,ImageTags,BackdropImageTags,AlbumPrimaryImageTag,AlbumId,AudioInfo,MediaSources,Chapters,HasLyrics,Overview,Genres,Studios,ProductionYear,OfficialRating,CommunityRating,CriticRating,PremiereDate,RunTimeTicks,IndexNumber,ParentIndexNumber,SeriesName,SeriesId,SeasonId,SeasonName,UserData";
|
|
1097
|
+
declare class SearchModule {
|
|
1098
|
+
private http;
|
|
1099
|
+
private getUserId;
|
|
1100
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1101
|
+
private resolveUserId;
|
|
1102
|
+
/**
|
|
1103
|
+
* Universal search across Jellyfin items with comprehensive filters.
|
|
1104
|
+
*/
|
|
1105
|
+
search(query: string, options?: SearchOptions): Promise<ItemsResponse>;
|
|
1106
|
+
/**
|
|
1107
|
+
* Search specifically within a specific library or parent folder.
|
|
1108
|
+
*/
|
|
1109
|
+
searchInLibrary(parentId: string, query: string, options?: Omit<SearchOptions, 'parentId'>): Promise<ItemsResponse>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Convenience helper to search audio tracks / songs.
|
|
1112
|
+
*/
|
|
1113
|
+
searchSongs(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Convenience helper to search music albums.
|
|
1116
|
+
*/
|
|
1117
|
+
searchAlbums(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Convenience helper to search music artists.
|
|
1120
|
+
*/
|
|
1121
|
+
searchArtists(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Convenience helper to search movies.
|
|
1124
|
+
*/
|
|
1125
|
+
searchMovies(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Convenience helper to search TV series.
|
|
1128
|
+
*/
|
|
1129
|
+
searchSeries(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Convenience helper to search TV episodes.
|
|
1132
|
+
*/
|
|
1133
|
+
searchEpisodes(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
969
1136
|
interface CacheRecord<T = unknown> {
|
|
970
1137
|
key: string;
|
|
971
1138
|
data: T;
|
|
@@ -1007,12 +1174,17 @@ declare class JellyfinClient {
|
|
|
1007
1174
|
readonly auth: AuthModule;
|
|
1008
1175
|
readonly system: SystemModule;
|
|
1009
1176
|
readonly library: LibraryModule;
|
|
1177
|
+
readonly search: SearchModule;
|
|
1010
1178
|
readonly playlists: PlaylistsModule;
|
|
1011
1179
|
readonly playback: PlaybackModule;
|
|
1012
1180
|
readonly media: MediaModule;
|
|
1013
1181
|
readonly lyrics: LyricsModule;
|
|
1014
1182
|
readonly favorites: FavoritesModule;
|
|
1015
1183
|
readonly offline: OfflineStorageManager;
|
|
1184
|
+
readonly resume: ResumeModule;
|
|
1185
|
+
readonly nextUp: NextUpModule;
|
|
1186
|
+
readonly latest: LatestModule;
|
|
1187
|
+
readonly transcode: TranscodeModule;
|
|
1016
1188
|
private http;
|
|
1017
1189
|
private storage;
|
|
1018
1190
|
private cache;
|
|
@@ -1089,4 +1261,4 @@ declare class JellyfinAuthError extends JellyfinApiError {
|
|
|
1089
1261
|
constructor(message?: string, status?: number, endpoint?: string);
|
|
1090
1262
|
}
|
|
1091
1263
|
|
|
1092
|
-
export { AUDIO_QUALITY_PRESETS, type ArtworkUrlOptions, type AudioHlsStreamOptions, type AudioQualityOption, type AudioQualityPresetKey, type AudioStreamOptions, AuthModule, type AuthenticationResult, type BaseItemDto, type CacheAdapter, type CacheRecord, type ClientCapabilities, type ClientEventListener, type ClientEventType, type ClientInfo, type CreatePlaylistDto, type CreatePlaylistOptions, type DownloadItemOptions, type DownloadProgress, type DownloadRecord, type DownloadUrlOptions, FavoritesModule, type GetAlbumsOptions, type GetArtistsOptions, type GetEpisodesOptions, type GetMoviesOptions, type GetSeasonsOptions, type GetSeriesOptions, type GetSongsOptions, type GetVideosOptions, HttpTransport, IndexedDBCacheAdapter, type ItemsResponse, JellyfinApiError, JellyfinAuthError, JellyfinClient, type JellyfinClientOptions, JellyfinError, LibraryModule, LocalStorageAdapter, type LyricLine, type LyricsDto, LyricsModule, MediaModule, type MediaSourceInfo, type MediaStreamInfo, MemoryCacheAdapter, MemoryStorage, OfflineStorageManager, type PlaybackInfoOptions, type PlaybackInfoResponse, PlaybackModule, PlaylistsModule, type PublicSystemInfo, type RequestOptions, type SearchOptions, type StorageAdapter, type SubtitleTrackInfo, type SubtitleUrlOptions, type SystemInfo, SystemModule, type UpdatePlaylistOptions, type UserDto, type UserItemDataDto, VIDEO_QUALITY_PRESETS, type VideoHlsStreamOptions, type VideoQualityOption, type VideoQualityPresetKey, type VideoStreamOptions, buildAuthHeader, cleanUrl, fetchWithCache, formatBitrate, generateDeviceId, getAudioQualityList, getDefaultStorage, getVideoQualityList, isV12OrHigher, isVersionAtLeast, parseSemVer, resolveAudioQuality, resolveVideoQuality };
|
|
1264
|
+
export { AUDIO_QUALITY_PRESETS, type ArtworkUrlOptions, type AudioHlsStreamOptions, type AudioQualityOption, type AudioQualityPresetKey, type AudioStreamOptions, AuthModule, type AuthenticationResult, type BaseItemDto, COMMON_SEARCH_FIELDS, type CacheAdapter, type CacheRecord, type ClientCapabilities, type ClientEventListener, type ClientEventType, type ClientInfo, type CreatePlaylistDto, type CreatePlaylistOptions, type DownloadItemOptions, type DownloadProgress, type DownloadRecord, type DownloadUrlOptions, FavoritesModule, type GetAlbumsOptions, type GetArtistsOptions, type GetEpisodesOptions, type GetLatestMediaOptions, type GetMoviesOptions, type GetNextUpOptions, type GetResumeItemsOptions, type GetSeasonsOptions, type GetSeriesOptions, type GetSongsOptions, type GetVideosOptions, HttpTransport, IndexedDBCacheAdapter, type ItemsResponse, JellyfinApiError, JellyfinAuthError, JellyfinClient, type JellyfinClientOptions, JellyfinError, LatestModule, LibraryModule, LocalStorageAdapter, type LyricLine, type LyricsDto, LyricsModule, MediaModule, type MediaSourceInfo, type MediaStreamInfo, MemoryCacheAdapter, MemoryStorage, NextUpModule, OfflineStorageManager, type PlaybackInfoOptions, type PlaybackInfoResponse, PlaybackModule, PlaylistsModule, type PublicSystemInfo, type RequestOptions, ResumeModule, SearchModule, type SearchOptions, type StopActiveEncodingOptions, type StorageAdapter, type SubtitleTrackInfo, type SubtitleUrlOptions, type SystemInfo, SystemModule, TranscodeModule, type UpdatePlaylistOptions, type UserDto, type UserItemDataDto, VIDEO_QUALITY_PRESETS, type VideoHlsStreamOptions, type VideoQualityOption, type VideoQualityPresetKey, type VideoStreamOptions, buildAuthHeader, cleanUrl, fetchWithCache, formatBitrate, generateDeviceId, getAudioQualityList, getDefaultStorage, getVideoQualityList, isV12OrHigher, isVersionAtLeast, parseSemVer, resolveAudioQuality, resolveVideoQuality };
|
package/dist/index.d.ts
CHANGED
|
@@ -255,7 +255,17 @@ interface GetSongsOptions {
|
|
|
255
255
|
interface SearchOptions {
|
|
256
256
|
limit?: number;
|
|
257
257
|
startIndex?: number;
|
|
258
|
-
|
|
258
|
+
parentId?: string;
|
|
259
|
+
includeItemTypes?: string | string[];
|
|
260
|
+
mediaTypes?: string | string[];
|
|
261
|
+
genres?: string[];
|
|
262
|
+
years?: number[];
|
|
263
|
+
isFavorite?: boolean;
|
|
264
|
+
sortBy?: string;
|
|
265
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
266
|
+
fields?: string;
|
|
267
|
+
recursive?: boolean;
|
|
268
|
+
userId?: string;
|
|
259
269
|
}
|
|
260
270
|
interface CreatePlaylistDto {
|
|
261
271
|
Name: string;
|
|
@@ -491,6 +501,49 @@ interface DownloadItemOptions {
|
|
|
491
501
|
index?: number;
|
|
492
502
|
quality?: VideoQualityPresetKey | VideoQualityOption | number | string;
|
|
493
503
|
}
|
|
504
|
+
interface GetResumeItemsOptions {
|
|
505
|
+
userId?: string;
|
|
506
|
+
limit?: number;
|
|
507
|
+
startIndex?: number;
|
|
508
|
+
parentId?: string;
|
|
509
|
+
mediaTypes?: string[];
|
|
510
|
+
enableImages?: boolean;
|
|
511
|
+
enableUserData?: boolean;
|
|
512
|
+
imageTypeLimit?: number;
|
|
513
|
+
enableImageTypes?: string[];
|
|
514
|
+
fields?: string;
|
|
515
|
+
}
|
|
516
|
+
interface GetNextUpOptions {
|
|
517
|
+
userId?: string;
|
|
518
|
+
parentId?: string;
|
|
519
|
+
seriesId?: string;
|
|
520
|
+
limit?: number;
|
|
521
|
+
startIndex?: number;
|
|
522
|
+
fields?: string;
|
|
523
|
+
enableImages?: boolean;
|
|
524
|
+
enableUserData?: boolean;
|
|
525
|
+
enableTotalRecordCount?: boolean;
|
|
526
|
+
imageTypeLimit?: number;
|
|
527
|
+
enableImageTypes?: string[];
|
|
528
|
+
disableFirstEpisode?: boolean;
|
|
529
|
+
nextUpDateCutoff?: string;
|
|
530
|
+
}
|
|
531
|
+
interface GetLatestMediaOptions {
|
|
532
|
+
userId?: string;
|
|
533
|
+
parentId?: string;
|
|
534
|
+
limit?: number;
|
|
535
|
+
fields?: string;
|
|
536
|
+
includeItemTypes?: string[];
|
|
537
|
+
isPlayed?: boolean;
|
|
538
|
+
enableImages?: boolean;
|
|
539
|
+
imageTypeLimit?: number;
|
|
540
|
+
enableImageTypes?: string[];
|
|
541
|
+
groupItems?: boolean;
|
|
542
|
+
}
|
|
543
|
+
interface StopActiveEncodingOptions {
|
|
544
|
+
playSessionId: string;
|
|
545
|
+
deviceId?: string;
|
|
546
|
+
}
|
|
494
547
|
|
|
495
548
|
interface RequestOptions {
|
|
496
549
|
method?: string;
|
|
@@ -746,8 +799,11 @@ declare class PlaybackModule {
|
|
|
746
799
|
reportProgress(itemId: string, positionTicks?: number, isPaused?: boolean): Promise<void>;
|
|
747
800
|
/**
|
|
748
801
|
* Report that playback has stopped for an item.
|
|
802
|
+
* Optionally teardown active transcoding session if playSessionId is provided.
|
|
749
803
|
*/
|
|
750
|
-
reportStopped(itemId: string, positionTicks?: number
|
|
804
|
+
reportStopped(itemId: string, positionTicks?: number, options?: {
|
|
805
|
+
playSessionId?: string;
|
|
806
|
+
}): Promise<void>;
|
|
751
807
|
}
|
|
752
808
|
|
|
753
809
|
declare class MediaModule {
|
|
@@ -966,6 +1022,117 @@ declare class OfflineStorageManager {
|
|
|
966
1022
|
formatBytes(bytes: number): string;
|
|
967
1023
|
}
|
|
968
1024
|
|
|
1025
|
+
declare class ResumeModule {
|
|
1026
|
+
private http;
|
|
1027
|
+
private getUserId;
|
|
1028
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1029
|
+
private resolveUserId;
|
|
1030
|
+
/**
|
|
1031
|
+
* Fetch items currently in-progress for the user via /UserItems/Resume.
|
|
1032
|
+
*/
|
|
1033
|
+
getResumeItems(options?: GetResumeItemsOptions): Promise<ItemsResponse>;
|
|
1034
|
+
/**
|
|
1035
|
+
* Convenience alias for getResumeItems.
|
|
1036
|
+
*/
|
|
1037
|
+
getItems(options?: GetResumeItemsOptions): Promise<ItemsResponse>;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
declare class NextUpModule {
|
|
1041
|
+
private http;
|
|
1042
|
+
private getUserId;
|
|
1043
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1044
|
+
private resolveUserId;
|
|
1045
|
+
/**
|
|
1046
|
+
* Fetch the next unplayed episodes for followed series via /Shows/NextUp.
|
|
1047
|
+
*/
|
|
1048
|
+
getNextUp(options?: GetNextUpOptions): Promise<ItemsResponse>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Convenience alias for getNextUp.
|
|
1051
|
+
*/
|
|
1052
|
+
getEpisodes(options?: GetNextUpOptions): Promise<ItemsResponse>;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
declare class LatestModule {
|
|
1056
|
+
private http;
|
|
1057
|
+
private getUserId;
|
|
1058
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1059
|
+
private resolveUserId;
|
|
1060
|
+
/**
|
|
1061
|
+
* Fetch recently added media items for the user via /Users/{userId}/Items/Latest.
|
|
1062
|
+
*/
|
|
1063
|
+
getLatest(options?: GetLatestMediaOptions): Promise<BaseItemDto[]>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Convenience helper to fetch recently added movies.
|
|
1066
|
+
*/
|
|
1067
|
+
getLatestMovies(options?: Omit<GetLatestMediaOptions, 'includeItemTypes'>): Promise<BaseItemDto[]>;
|
|
1068
|
+
/**
|
|
1069
|
+
* Convenience helper to fetch recently added TV episodes.
|
|
1070
|
+
*/
|
|
1071
|
+
getLatestEpisodes(options?: Omit<GetLatestMediaOptions, 'includeItemTypes'>): Promise<BaseItemDto[]>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Convenience helper to fetch recently added music albums.
|
|
1074
|
+
*/
|
|
1075
|
+
getLatestAlbums(options?: Omit<GetLatestMediaOptions, 'includeItemTypes'>): Promise<BaseItemDto[]>;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
declare class TranscodeModule {
|
|
1079
|
+
private http;
|
|
1080
|
+
private getDeviceId;
|
|
1081
|
+
constructor(http: HttpTransport, getDeviceId: () => string);
|
|
1082
|
+
/**
|
|
1083
|
+
* Explicitly stop an active server transcoding session via DELETE /Videos/ActiveEncodings.
|
|
1084
|
+
* This terminates lingering FFmpeg processes on the Jellyfin server.
|
|
1085
|
+
*
|
|
1086
|
+
* @param playSessionId The unique playback session ID.
|
|
1087
|
+
* @param deviceId The client device ID (defaults to configured client device ID).
|
|
1088
|
+
*/
|
|
1089
|
+
stopActiveEncoding(playSessionId: string, deviceId?: string): Promise<void>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Convenience alias for stopActiveEncoding.
|
|
1092
|
+
*/
|
|
1093
|
+
stop(playSessionId: string, deviceId?: string): Promise<void>;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
declare const COMMON_SEARCH_FIELDS = "PrimaryImageAspectRatio,PrimaryImageTag,ImageTags,BackdropImageTags,AlbumPrimaryImageTag,AlbumId,AudioInfo,MediaSources,Chapters,HasLyrics,Overview,Genres,Studios,ProductionYear,OfficialRating,CommunityRating,CriticRating,PremiereDate,RunTimeTicks,IndexNumber,ParentIndexNumber,SeriesName,SeriesId,SeasonId,SeasonName,UserData";
|
|
1097
|
+
declare class SearchModule {
|
|
1098
|
+
private http;
|
|
1099
|
+
private getUserId;
|
|
1100
|
+
constructor(http: HttpTransport, getUserId: () => string);
|
|
1101
|
+
private resolveUserId;
|
|
1102
|
+
/**
|
|
1103
|
+
* Universal search across Jellyfin items with comprehensive filters.
|
|
1104
|
+
*/
|
|
1105
|
+
search(query: string, options?: SearchOptions): Promise<ItemsResponse>;
|
|
1106
|
+
/**
|
|
1107
|
+
* Search specifically within a specific library or parent folder.
|
|
1108
|
+
*/
|
|
1109
|
+
searchInLibrary(parentId: string, query: string, options?: Omit<SearchOptions, 'parentId'>): Promise<ItemsResponse>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Convenience helper to search audio tracks / songs.
|
|
1112
|
+
*/
|
|
1113
|
+
searchSongs(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Convenience helper to search music albums.
|
|
1116
|
+
*/
|
|
1117
|
+
searchAlbums(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Convenience helper to search music artists.
|
|
1120
|
+
*/
|
|
1121
|
+
searchArtists(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Convenience helper to search movies.
|
|
1124
|
+
*/
|
|
1125
|
+
searchMovies(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Convenience helper to search TV series.
|
|
1128
|
+
*/
|
|
1129
|
+
searchSeries(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Convenience helper to search TV episodes.
|
|
1132
|
+
*/
|
|
1133
|
+
searchEpisodes(query: string, options?: Omit<SearchOptions, 'includeItemTypes'>): Promise<ItemsResponse>;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
969
1136
|
interface CacheRecord<T = unknown> {
|
|
970
1137
|
key: string;
|
|
971
1138
|
data: T;
|
|
@@ -1007,12 +1174,17 @@ declare class JellyfinClient {
|
|
|
1007
1174
|
readonly auth: AuthModule;
|
|
1008
1175
|
readonly system: SystemModule;
|
|
1009
1176
|
readonly library: LibraryModule;
|
|
1177
|
+
readonly search: SearchModule;
|
|
1010
1178
|
readonly playlists: PlaylistsModule;
|
|
1011
1179
|
readonly playback: PlaybackModule;
|
|
1012
1180
|
readonly media: MediaModule;
|
|
1013
1181
|
readonly lyrics: LyricsModule;
|
|
1014
1182
|
readonly favorites: FavoritesModule;
|
|
1015
1183
|
readonly offline: OfflineStorageManager;
|
|
1184
|
+
readonly resume: ResumeModule;
|
|
1185
|
+
readonly nextUp: NextUpModule;
|
|
1186
|
+
readonly latest: LatestModule;
|
|
1187
|
+
readonly transcode: TranscodeModule;
|
|
1016
1188
|
private http;
|
|
1017
1189
|
private storage;
|
|
1018
1190
|
private cache;
|
|
@@ -1089,4 +1261,4 @@ declare class JellyfinAuthError extends JellyfinApiError {
|
|
|
1089
1261
|
constructor(message?: string, status?: number, endpoint?: string);
|
|
1090
1262
|
}
|
|
1091
1263
|
|
|
1092
|
-
export { AUDIO_QUALITY_PRESETS, type ArtworkUrlOptions, type AudioHlsStreamOptions, type AudioQualityOption, type AudioQualityPresetKey, type AudioStreamOptions, AuthModule, type AuthenticationResult, type BaseItemDto, type CacheAdapter, type CacheRecord, type ClientCapabilities, type ClientEventListener, type ClientEventType, type ClientInfo, type CreatePlaylistDto, type CreatePlaylistOptions, type DownloadItemOptions, type DownloadProgress, type DownloadRecord, type DownloadUrlOptions, FavoritesModule, type GetAlbumsOptions, type GetArtistsOptions, type GetEpisodesOptions, type GetMoviesOptions, type GetSeasonsOptions, type GetSeriesOptions, type GetSongsOptions, type GetVideosOptions, HttpTransport, IndexedDBCacheAdapter, type ItemsResponse, JellyfinApiError, JellyfinAuthError, JellyfinClient, type JellyfinClientOptions, JellyfinError, LibraryModule, LocalStorageAdapter, type LyricLine, type LyricsDto, LyricsModule, MediaModule, type MediaSourceInfo, type MediaStreamInfo, MemoryCacheAdapter, MemoryStorage, OfflineStorageManager, type PlaybackInfoOptions, type PlaybackInfoResponse, PlaybackModule, PlaylistsModule, type PublicSystemInfo, type RequestOptions, type SearchOptions, type StorageAdapter, type SubtitleTrackInfo, type SubtitleUrlOptions, type SystemInfo, SystemModule, type UpdatePlaylistOptions, type UserDto, type UserItemDataDto, VIDEO_QUALITY_PRESETS, type VideoHlsStreamOptions, type VideoQualityOption, type VideoQualityPresetKey, type VideoStreamOptions, buildAuthHeader, cleanUrl, fetchWithCache, formatBitrate, generateDeviceId, getAudioQualityList, getDefaultStorage, getVideoQualityList, isV12OrHigher, isVersionAtLeast, parseSemVer, resolveAudioQuality, resolveVideoQuality };
|
|
1264
|
+
export { AUDIO_QUALITY_PRESETS, type ArtworkUrlOptions, type AudioHlsStreamOptions, type AudioQualityOption, type AudioQualityPresetKey, type AudioStreamOptions, AuthModule, type AuthenticationResult, type BaseItemDto, COMMON_SEARCH_FIELDS, type CacheAdapter, type CacheRecord, type ClientCapabilities, type ClientEventListener, type ClientEventType, type ClientInfo, type CreatePlaylistDto, type CreatePlaylistOptions, type DownloadItemOptions, type DownloadProgress, type DownloadRecord, type DownloadUrlOptions, FavoritesModule, type GetAlbumsOptions, type GetArtistsOptions, type GetEpisodesOptions, type GetLatestMediaOptions, type GetMoviesOptions, type GetNextUpOptions, type GetResumeItemsOptions, type GetSeasonsOptions, type GetSeriesOptions, type GetSongsOptions, type GetVideosOptions, HttpTransport, IndexedDBCacheAdapter, type ItemsResponse, JellyfinApiError, JellyfinAuthError, JellyfinClient, type JellyfinClientOptions, JellyfinError, LatestModule, LibraryModule, LocalStorageAdapter, type LyricLine, type LyricsDto, LyricsModule, MediaModule, type MediaSourceInfo, type MediaStreamInfo, MemoryCacheAdapter, MemoryStorage, NextUpModule, OfflineStorageManager, type PlaybackInfoOptions, type PlaybackInfoResponse, PlaybackModule, PlaylistsModule, type PublicSystemInfo, type RequestOptions, ResumeModule, SearchModule, type SearchOptions, type StopActiveEncodingOptions, type StorageAdapter, type SubtitleTrackInfo, type SubtitleUrlOptions, type SystemInfo, SystemModule, TranscodeModule, type UpdatePlaylistOptions, type UserDto, type UserItemDataDto, VIDEO_QUALITY_PRESETS, type VideoHlsStreamOptions, type VideoQualityOption, type VideoQualityPresetKey, type VideoStreamOptions, buildAuthHeader, cleanUrl, fetchWithCache, formatBitrate, generateDeviceId, getAudioQualityList, getDefaultStorage, getVideoQualityList, isV12OrHigher, isVersionAtLeast, parseSemVer, resolveAudioQuality, resolveVideoQuality };
|