mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00

* fix: modified media status handling when media has been deleted fix: requests will now be updated to completed on scan fix: modified components to display deleted as a status fix: corrected media status switching away from deleted fix: modified components to display deleted as a status fix: corrected media status switching away from deleted fix: base scanner will set requests to completed correctly fix: mark available button correctly sets requests as completed fix: status will now stay deleted after declined request refactor: request completion handling moved to entity fix: prevented notifications from sending to old deleted requests refactor: cleaned up code and added more detail to logs refactor: updated to reflect latest availability sync changes * fix: fetch requests only if necessary in db and remove unneeded code * fix: update request button logic to accomodate specials fix: remove completed filtering in tv details * fix: correctly set seasons status when using the manual button * refactor: improve reliability of season request completion refactor: remove seasonrequest code * fix: send notification for 4k movies fix: same for shows * feat: add completed filter to requests list refactor: correct label
40 lines
805 B
TypeScript
40 lines
805 B
TypeScript
import { MediaRequestStatus } from '@server/constants/media';
|
|
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
ManyToOne,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
import { MediaRequest } from './MediaRequest';
|
|
|
|
@Entity()
|
|
class SeasonRequest {
|
|
@PrimaryGeneratedColumn()
|
|
public id: number;
|
|
|
|
@Column()
|
|
public seasonNumber: number;
|
|
|
|
@Column({ type: 'int', default: MediaRequestStatus.PENDING })
|
|
public status: MediaRequestStatus;
|
|
|
|
@ManyToOne(() => MediaRequest, (request) => request.seasons, {
|
|
onDelete: 'CASCADE',
|
|
})
|
|
public request: MediaRequest;
|
|
|
|
@CreateDateColumn()
|
|
public createdAt: Date;
|
|
|
|
@UpdateDateColumn()
|
|
public updatedAt: Date;
|
|
|
|
constructor(init?: Partial<SeasonRequest>) {
|
|
Object.assign(this, init);
|
|
}
|
|
}
|
|
|
|
export default SeasonRequest;
|