Remove From On Deck (#2131)

* Allow admins to customize the amount of progress time or last item added time for on deck calculation

* Implemented the ability to remove series from on deck. They will be removed until the user reads a new chapter.

Quite a few db lookup reduction calls for reading based stuff, like continue point, bookmarks, etc.
This commit is contained in:
Joe Milazzo 2023-07-15 09:27:21 -05:00 committed by GitHub
parent 90a6c89486
commit 348bc062ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 2597 additions and 87 deletions

View file

@ -88,6 +88,10 @@ export enum Action {
* Import some data into Kavita
*/
Import = 18,
/**
* Removes the Series from On Deck inclusion
*/
RemoveFromOnDeck = 19,
}
export interface ActionItem<T> {
@ -563,9 +567,7 @@ export class ActionFactoryService {
// Checks the whole tree for the action and returns true if it exists
public hasAction(actions: Array<ActionItem<any>>, action: Action) {
var actionFound = false;
if (actions.length === 0) return actionFound;
if (actions.length === 0) return false;
for (let i = 0; i < actions.length; i++)
{
@ -573,8 +575,7 @@ export class ActionFactoryService {
if (this.hasAction(actions[i].children, action)) return true;
}
return actionFound;
return false;
}
}