changed db name

This commit is contained in:
Daniel Haller 2024-04-21 15:23:00 +02:00
parent df16ee7a1e
commit df0375dc25

View File

@ -4,7 +4,7 @@ import { CrunchyEpisode } from '../types/crunchyroll'
const sequelize = new Sequelize({ const sequelize = new Sequelize({
dialect: 'sqlite', dialect: 'sqlite',
storage: app.getPath('documents') + '/db.sqlite' storage: app.getPath('documents') + '/crd-dbv1.db'
}) })
interface AccountAttributes { interface AccountAttributes {
@ -32,9 +32,9 @@ interface PlaylistAttributes {
media: CrunchyEpisode media: CrunchyEpisode
dub: Array<string> dub: Array<string>
sub: Array<string> sub: Array<string>
hardsub: boolean, hardsub: boolean
quality: 1080 | 720 | 480 | 360 | 240, quality: 1080 | 720 | 480 | 360 | 240
dir: string, dir: string
failedreason: string failedreason: string
} }
@ -42,9 +42,9 @@ interface PlaylistCreateAttributes {
media: CrunchyEpisode media: CrunchyEpisode
dub: Array<string> dub: Array<string>
sub: Array<string> sub: Array<string>
dir: string, dir: string
quality: 1080 | 720 | 480 | 360 | 240, quality: 1080 | 720 | 480 | 360 | 240
hardsub: boolean, hardsub: boolean
status: 'waiting' | 'preparing' | 'downloading' | 'merging' | 'completed' | 'failed' status: 'waiting' | 'preparing' | 'downloading' | 'merging' | 'completed' | 'failed'
} }
@ -86,7 +86,7 @@ const Playlist: ModelDefined<PlaylistAttributes, PlaylistCreateAttributes> = seq
}, },
status: { status: {
allowNull: false, allowNull: false,
type: DataTypes.STRING, type: DataTypes.STRING
}, },
media: { media: {
allowNull: false, allowNull: false,