feat: api to add torrent hash to blacklist

This commit is contained in:
Simon Ding
2024-10-10 00:49:32 +08:00
parent 7e4d907ef6
commit 5daeca0bd9
28 changed files with 1122 additions and 1137 deletions

View File

@@ -8,17 +8,18 @@ import (
)
var (
// BlocklistsColumns holds the columns for the "blocklists" table.
BlocklistsColumns = []*schema.Column{
// BlacklistsColumns holds the columns for the "blacklists" table.
BlacklistsColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "type", Type: field.TypeEnum, Enums: []string{"media", "torrent"}},
{Name: "value", Type: field.TypeString},
{Name: "value", Type: field.TypeJSON},
{Name: "notes", Type: field.TypeString, Nullable: true},
}
// BlocklistsTable holds the schema information for the "blocklists" table.
BlocklistsTable = &schema.Table{
Name: "blocklists",
Columns: BlocklistsColumns,
PrimaryKey: []*schema.Column{BlocklistsColumns[0]},
// BlacklistsTable holds the schema information for the "blacklists" table.
BlacklistsTable = &schema.Table{
Name: "blacklists",
Columns: BlacklistsColumns,
PrimaryKey: []*schema.Column{BlacklistsColumns[0]},
}
// DownloadClientsColumns holds the columns for the "download_clients" table.
DownloadClientsColumns = []*schema.Column{
@@ -192,7 +193,7 @@ var (
}
// Tables holds all the tables in the schema.
Tables = []*schema.Table{
BlocklistsTable,
BlacklistsTable,
DownloadClientsTable,
EpisodesTable,
HistoriesTable,