Skip to content

Commit

Permalink
Added StatusError, default group variable to comply with pull request M…
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbady committed Mar 10, 2024
1 parent 83d7c32 commit 52aef0f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
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

0 comments on commit 52aef0f

Please sign in to comment.