diff --git a/.gitignore b/.gitignore index 73ece88..b41dde3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ dist/ node_modules/ .vscode/ +.idea/ -.DS_Store \ No newline at end of file +.DS_Store diff --git a/src/core/errors/StatusError.ts b/src/core/errors/StatusError.ts new file mode 100644 index 0000000..20aa1e2 --- /dev/null +++ b/src/core/errors/StatusError.ts @@ -0,0 +1,12 @@ +export class StatusError extends Error { + status: number; + data: string; + hostname: string; + + constructor(status: number, message: string, data: string, hostname: string) { + super(message); + this.status = status; + this.data = data; + this.hostname = hostname; + } +} diff --git a/src/core/errors/index.ts b/src/core/errors/index.ts new file mode 100644 index 0000000..fe4be23 --- /dev/null +++ b/src/core/errors/index.ts @@ -0,0 +1 @@ +export * from './StatusError'; diff --git a/src/core/index.ts b/src/core/index.ts index 323e9d9..849b3ff 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,3 +1,4 @@ export * from './request'; +export * from './errors'; // export * from './storage'; // export * from './crypto'; diff --git a/src/interfaces/source/types.ts b/src/interfaces/source/types.ts index b3d8a6b..7231171 100644 --- a/src/interfaces/source/types.ts +++ b/src/interfaces/source/types.ts @@ -49,6 +49,7 @@ export enum DiscoverListingType { default, rank, featured, + lastWatched, } export enum DiscoverListingOrientationType { @@ -241,6 +242,11 @@ export type PlaylistGroup = { * If it is initialized but no variants are provided, it is assumed that there is no contents for this group. */ variants?: PlaylistGroupVariant[]; + + /** + * The current group is the one that should be shown when playlist details are opened. + */ + default?: boolean; }; export type PlaylistGroupVariantID = string;