mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-08 20:37:41 +00:00
migrations; torr search, dl, seed, delete; files scan, delete; configs
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import ResponseItem from './response-item.dto';
|
||||
import { NavigationItem } from '../../Shared/Dto/navigation-item.dto';
|
||||
|
||||
export default class ApiResponse {
|
||||
items: Array<ResponseItem> = [];
|
||||
content = 'videos';
|
||||
updateList = true;
|
||||
selectList: boolean | undefined;
|
||||
category: string | undefined;
|
||||
play: string | undefined;
|
||||
msgBoxOK: string | undefined;
|
||||
@@ -40,4 +42,25 @@ export default class ApiResponse {
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
setShowAsSelectList() {
|
||||
this.updateList = false;
|
||||
this.selectList = true;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
addNavigationItems(navigationItems: NavigationItem[], pathPrefix = '') {
|
||||
for (const [label, path, searchFor] of navigationItems) {
|
||||
const item = this.createItem()
|
||||
.setLabel(label)
|
||||
.setToFolder()
|
||||
.setPath(pathPrefix + path ?? '');
|
||||
if (searchFor !== undefined) {
|
||||
item.setActionSearch(searchFor);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user