migrations; torr search, dl, seed, delete; files scan, delete; configs

This commit is contained in:
Jurgis Sakalauskas
2023-02-03 17:41:40 +02:00
parent 8d354027fc
commit daaeda539b
84 changed files with 5456 additions and 301 deletions
+23
View File
@@ -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;
}
}