Sync from /srv/compose/unified-media-manager
This commit is contained in:
15
internal/db/migrations/004_naming_templates.sql
Normal file
15
internal/db/migrations/004_naming_templates.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE naming_templates (
|
||||
id SERIAL PRIMARY KEY,
|
||||
media_type MEDIA_TYPE NOT NULL UNIQUE,
|
||||
template TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
INSERT INTO naming_templates (media_type, template) VALUES
|
||||
('movie', '{{sanitize .Title}} ({{.Year}})/{{sanitize .Title}} ({{.Year}}) - {{.Quality}}.{{.Ext}}'),
|
||||
('series', '{{sanitize .Title}}/Season {{printf "%02d" .Season}}/{{sanitize .Title}} - S{{printf "%02d" .Season}}E{{printf "%02d" .Episode}} - {{.Quality}}.{{.Ext}}'),
|
||||
('music', '{{sanitize .Artist}}/{{sanitize .Album}}/{{printf "%02d" .Track}} - {{sanitize .Title}}.{{.Ext}}'),
|
||||
('audiobook', '{{sanitize .Author}}/{{sanitize .Title}}/{{sanitize .Title}} - Ch{{printf "%02d" .Chapter}}.{{.Ext}}'),
|
||||
('podcast', '{{sanitize .Title}}/{{sanitize .Title}} - {{.Date}}.{{.Ext}}'),
|
||||
('book', '{{sanitize .Author}}/{{sanitize .Title}} ({{.Year}})/{{sanitize .Title}} ({{.Year}}).{{.Ext}}');
|
||||
Reference in New Issue
Block a user