Add watch status for TV series with UI and auto-fix
Added watch_status column to Entry model (plan_to_watch/watching/completed/ on_hold/dropped). Status pill on entry details page opens selection dialog. Set Status in quick actions menu and EntryCard dropdown (TV only). Status filter in Library filter popover. Maintenance auto-fix endpoint that sets statuses based on watched episodes (excl. season 0).
This commit is contained in:
1 parent
a5659cf4c8
commit
cdbaedd7d0
11 files changed
+663
-286
No files matched your search
+24
-18
@@ -1,13 +1,13 @@
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
|
||||
const Entry = sequelize.define("entry", {
|
||||
const Entry = sequelize.define('entry', {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
title: { type: DataTypes.STRING(500) },
|
||||
original_title: { type: DataTypes.STRING(100), field: "original_title" },
|
||||
release_date: { type: DataTypes.DATE, field: "release_date" },
|
||||
release_status: { type: DataTypes.STRING(50), field: "release_status" },
|
||||
original_title: { type: DataTypes.STRING(100), field: 'original_title' },
|
||||
release_date: { type: DataTypes.DATE, field: 'release_date' },
|
||||
release_status: { type: DataTypes.STRING(50), field: 'release_status' },
|
||||
runtime: { type: DataTypes.INTEGER },
|
||||
|
||||
tagline: { type: DataTypes.STRING(200) },
|
||||
@@ -15,13 +15,13 @@ const Entry = sequelize.define("entry", {
|
||||
country: { type: DataTypes.STRING(30) },
|
||||
|
||||
certification: { type: DataTypes.INTEGER },
|
||||
network_studio: { type: DataTypes.STRING(40), field: "network_studio" },
|
||||
collection_id: { type: DataTypes.INTEGER, field: "collection_id" },
|
||||
max_cast: { type: DataTypes.INTEGER, field: "max_cast", defaultValue: 10 },
|
||||
network_studio: { type: DataTypes.STRING(40), field: 'network_studio' },
|
||||
collection_id: { type: DataTypes.INTEGER, field: 'collection_id' },
|
||||
max_cast: { type: DataTypes.INTEGER, field: 'max_cast', defaultValue: 10 },
|
||||
credit_fetched: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
defaultValue: false,
|
||||
field: "credit_fetched",
|
||||
field: 'credit_fetched',
|
||||
},
|
||||
|
||||
watchlist: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
@@ -30,29 +30,35 @@ const Entry = sequelize.define("entry", {
|
||||
showInCalendar: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
defaultValue: true,
|
||||
field: "show_in_calendar",
|
||||
field: 'show_in_calendar',
|
||||
},
|
||||
autoSync: { type: DataTypes.BOOLEAN, defaultValue: true, field: "auto_sync" },
|
||||
autoSync: { type: DataTypes.BOOLEAN, defaultValue: true, field: 'auto_sync' },
|
||||
|
||||
note: { type: DataTypes.STRING(2000) },
|
||||
|
||||
is_tvseries: { type: DataTypes.BOOLEAN, field: "is_tvseries" },
|
||||
is_tvseries: { type: DataTypes.BOOLEAN, field: 'is_tvseries' },
|
||||
status: { type: DataTypes.STRING(20) },
|
||||
|
||||
poster_path: { type: DataTypes.STRING(200), field: "poster_path" },
|
||||
banner_path: { type: DataTypes.STRING(200), field: "banner_path" },
|
||||
poster_path: { type: DataTypes.STRING(200), field: 'poster_path' },
|
||||
banner_path: { type: DataTypes.STRING(200), field: 'banner_path' },
|
||||
|
||||
date_first_seen: { type: DataTypes.DATEONLY, field: "date_first_seen" },
|
||||
date_last_seen: { type: DataTypes.DATEONLY, field: "date_last_seen" },
|
||||
date_first_seen: { type: DataTypes.DATEONLY, field: 'date_first_seen' },
|
||||
date_last_seen: { type: DataTypes.DATEONLY, field: 'date_last_seen' },
|
||||
|
||||
last_fetch: { type: DataTypes.DATEONLY },
|
||||
|
||||
entry_sync_status: {
|
||||
type: DataTypes.STRING(50),
|
||||
field: "entry_sync_status",
|
||||
field: 'entry_sync_status',
|
||||
allowNull: true,
|
||||
},
|
||||
director: { type: DataTypes.STRING(200), allowNull: true },
|
||||
watch_status: {
|
||||
type: DataTypes.STRING(20),
|
||||
field: 'watch_status',
|
||||
allowNull: true,
|
||||
defaultValue: null,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = Entry;
|
||||
Reference in new issue
Block a user