Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Added StatusError, default group variable. #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ dist/
node_modules/

.vscode/
.idea/

.DS_Store
.DS_Store
12 changes: 12 additions & 0 deletions src/core/errors/StatusError.ts
Original file line number Diff line number Diff line change
@@ -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;
}
}
1 change: 1 addition & 0 deletions src/core/errors/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './StatusError';
1 change: 1 addition & 0 deletions src/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './request';
export * from './errors';
// export * from './storage';
// export * from './crypto';
6 changes: 6 additions & 0 deletions src/interfaces/source/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export enum DiscoverListingType {
default,
rank,
featured,
lastWatched,
}

export enum DiscoverListingOrientationType {
Expand Down Expand Up @@ -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;
Expand Down