jukebox-media-server 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/bin/jukebox-media-server.js +2 -1
- package/dist/client/assets/{Watch-C2gUX-4m.js → Watch-kJkUCvFd.js} +31 -31
- package/dist/client/assets/index-1v1BzSVv.js +56 -0
- package/dist/client/assets/index-FPcl2l8F.css +1 -0
- package/dist/client/assets/workbox-window.prod.es5-BIl4cyR9.js +2 -0
- package/dist/client/index.html +24 -4
- package/dist/client/{images/site.webmanifest → manifest.webmanifest} +9 -6
- package/dist/client/offline.html +107 -0
- package/dist/client/sw.js +1 -0
- package/dist/client/workbox-d3da0cfa.js +1 -0
- package/dist/server/index.js +1258 -39
- package/drizzle/0001_steady_puma.sql +65 -65
- package/drizzle/0002_sloppy_betty_ross.sql +8 -8
- package/drizzle/0003_public_speedball.sql +42 -0
- package/drizzle/0004_motionless_bug.sql +13 -0
- package/drizzle/meta/0002_snapshot.json +591 -591
- package/drizzle/meta/0003_snapshot.json +804 -0
- package/drizzle/meta/0004_snapshot.json +880 -0
- package/drizzle/meta/_journal.json +41 -27
- package/package.json +32 -2
- package/dist/client/assets/index-D_um8N7Q.js +0 -52
- package/dist/client/assets/index-DfXUcX5G.css +0 -1
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
CREATE TABLE `episodes` (
|
|
2
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
-
`show_id` integer NOT NULL,
|
|
4
|
-
`season_id` integer NOT NULL,
|
|
5
|
-
`season_number` integer NOT NULL,
|
|
6
|
-
`episode_number` integer NOT NULL,
|
|
7
|
-
`title` text NOT NULL,
|
|
8
|
-
`file_path` text NOT NULL,
|
|
9
|
-
`file_name` text NOT NULL,
|
|
10
|
-
`file_size` integer,
|
|
11
|
-
`extension` text,
|
|
12
|
-
`tmdb_id` integer,
|
|
13
|
-
`overview` text,
|
|
14
|
-
`runtime` integer,
|
|
15
|
-
`still_path` text,
|
|
16
|
-
`created_at` integer NOT NULL,
|
|
17
|
-
`updated_at` integer NOT NULL,
|
|
18
|
-
FOREIGN KEY (`show_id`) REFERENCES `shows`(`id`) ON UPDATE no action ON DELETE no action,
|
|
19
|
-
FOREIGN KEY (`season_id`) REFERENCES `seasons`(`id`) ON UPDATE no action ON DELETE no action
|
|
20
|
-
);
|
|
21
|
-
--> statement-breakpoint
|
|
22
|
-
CREATE UNIQUE INDEX `episodes_file_path_unique` ON `episodes` (`file_path`);--> statement-breakpoint
|
|
23
|
-
CREATE TABLE `seasons` (
|
|
24
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
25
|
-
`show_id` integer NOT NULL,
|
|
26
|
-
`season_number` integer NOT NULL,
|
|
27
|
-
`name` text,
|
|
28
|
-
`overview` text,
|
|
29
|
-
`poster_path` text,
|
|
30
|
-
`episode_count` integer,
|
|
31
|
-
FOREIGN KEY (`show_id`) REFERENCES `shows`(`id`) ON UPDATE no action ON DELETE no action
|
|
32
|
-
);
|
|
33
|
-
--> statement-breakpoint
|
|
34
|
-
CREATE TABLE `shows` (
|
|
35
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
36
|
-
`title` text NOT NULL,
|
|
37
|
-
`folder_path` text NOT NULL,
|
|
38
|
-
`tmdb_id` integer,
|
|
39
|
-
`year` integer,
|
|
40
|
-
`overview` text,
|
|
41
|
-
`genres` text,
|
|
42
|
-
`rating` real,
|
|
43
|
-
`poster_path` text,
|
|
44
|
-
`backdrop_path` text,
|
|
45
|
-
`created_at` integer NOT NULL,
|
|
46
|
-
`updated_at` integer NOT NULL
|
|
47
|
-
);
|
|
48
|
-
--> statement-breakpoint
|
|
49
|
-
CREATE UNIQUE INDEX `shows_folder_path_unique` ON `shows` (`folder_path`);--> statement-breakpoint
|
|
50
|
-
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
51
|
-
CREATE TABLE `__new_watch_progress` (
|
|
52
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
53
|
-
`movie_id` integer,
|
|
54
|
-
`episode_id` integer,
|
|
55
|
-
`current_time` integer NOT NULL,
|
|
56
|
-
`duration` integer,
|
|
57
|
-
`updated_at` integer NOT NULL,
|
|
58
|
-
FOREIGN KEY (`movie_id`) REFERENCES `movies`(`id`) ON UPDATE no action ON DELETE no action,
|
|
59
|
-
FOREIGN KEY (`episode_id`) REFERENCES `episodes`(`id`) ON UPDATE no action ON DELETE no action
|
|
60
|
-
);
|
|
61
|
-
--> statement-breakpoint
|
|
62
|
-
INSERT INTO `__new_watch_progress`("id", "movie_id", "episode_id", "current_time", "duration", "updated_at") SELECT "id", "movie_id",
|
|
63
|
-
DROP TABLE `watch_progress`;--> statement-breakpoint
|
|
64
|
-
ALTER TABLE `__new_watch_progress` RENAME TO `watch_progress`;--> statement-breakpoint
|
|
65
|
-
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `episodes` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`show_id` integer NOT NULL,
|
|
4
|
+
`season_id` integer NOT NULL,
|
|
5
|
+
`season_number` integer NOT NULL,
|
|
6
|
+
`episode_number` integer NOT NULL,
|
|
7
|
+
`title` text NOT NULL,
|
|
8
|
+
`file_path` text NOT NULL,
|
|
9
|
+
`file_name` text NOT NULL,
|
|
10
|
+
`file_size` integer,
|
|
11
|
+
`extension` text,
|
|
12
|
+
`tmdb_id` integer,
|
|
13
|
+
`overview` text,
|
|
14
|
+
`runtime` integer,
|
|
15
|
+
`still_path` text,
|
|
16
|
+
`created_at` integer NOT NULL,
|
|
17
|
+
`updated_at` integer NOT NULL,
|
|
18
|
+
FOREIGN KEY (`show_id`) REFERENCES `shows`(`id`) ON UPDATE no action ON DELETE no action,
|
|
19
|
+
FOREIGN KEY (`season_id`) REFERENCES `seasons`(`id`) ON UPDATE no action ON DELETE no action
|
|
20
|
+
);
|
|
21
|
+
--> statement-breakpoint
|
|
22
|
+
CREATE UNIQUE INDEX `episodes_file_path_unique` ON `episodes` (`file_path`);--> statement-breakpoint
|
|
23
|
+
CREATE TABLE `seasons` (
|
|
24
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
25
|
+
`show_id` integer NOT NULL,
|
|
26
|
+
`season_number` integer NOT NULL,
|
|
27
|
+
`name` text,
|
|
28
|
+
`overview` text,
|
|
29
|
+
`poster_path` text,
|
|
30
|
+
`episode_count` integer,
|
|
31
|
+
FOREIGN KEY (`show_id`) REFERENCES `shows`(`id`) ON UPDATE no action ON DELETE no action
|
|
32
|
+
);
|
|
33
|
+
--> statement-breakpoint
|
|
34
|
+
CREATE TABLE `shows` (
|
|
35
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
36
|
+
`title` text NOT NULL,
|
|
37
|
+
`folder_path` text NOT NULL,
|
|
38
|
+
`tmdb_id` integer,
|
|
39
|
+
`year` integer,
|
|
40
|
+
`overview` text,
|
|
41
|
+
`genres` text,
|
|
42
|
+
`rating` real,
|
|
43
|
+
`poster_path` text,
|
|
44
|
+
`backdrop_path` text,
|
|
45
|
+
`created_at` integer NOT NULL,
|
|
46
|
+
`updated_at` integer NOT NULL
|
|
47
|
+
);
|
|
48
|
+
--> statement-breakpoint
|
|
49
|
+
CREATE UNIQUE INDEX `shows_folder_path_unique` ON `shows` (`folder_path`);--> statement-breakpoint
|
|
50
|
+
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
51
|
+
CREATE TABLE `__new_watch_progress` (
|
|
52
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
53
|
+
`movie_id` integer,
|
|
54
|
+
`episode_id` integer,
|
|
55
|
+
`current_time` integer NOT NULL,
|
|
56
|
+
`duration` integer,
|
|
57
|
+
`updated_at` integer NOT NULL,
|
|
58
|
+
FOREIGN KEY (`movie_id`) REFERENCES `movies`(`id`) ON UPDATE no action ON DELETE no action,
|
|
59
|
+
FOREIGN KEY (`episode_id`) REFERENCES `episodes`(`id`) ON UPDATE no action ON DELETE no action
|
|
60
|
+
);
|
|
61
|
+
--> statement-breakpoint
|
|
62
|
+
INSERT INTO `__new_watch_progress`("id", "movie_id", "episode_id", "current_time", "duration", "updated_at") SELECT "id", "movie_id", NULL, "current_time", "duration", "updated_at" FROM `watch_progress`;--> statement-breakpoint
|
|
63
|
+
DROP TABLE `watch_progress`;--> statement-breakpoint
|
|
64
|
+
ALTER TABLE `__new_watch_progress` RENAME TO `watch_progress`;--> statement-breakpoint
|
|
65
|
+
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
|
66
66
|
ALTER TABLE `movies` ADD `trailer_url` text;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
CREATE TABLE `libraries` (
|
|
2
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
-
`name` text NOT NULL,
|
|
4
|
-
`path` text NOT NULL,
|
|
5
|
-
`type` text NOT NULL,
|
|
6
|
-
`created_at` integer NOT NULL
|
|
7
|
-
);
|
|
8
|
-
--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `libraries` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`name` text NOT NULL,
|
|
4
|
+
`path` text NOT NULL,
|
|
5
|
+
`type` text NOT NULL,
|
|
6
|
+
`created_at` integer NOT NULL
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
9
|
CREATE UNIQUE INDEX `libraries_path_unique` ON `libraries` (`path`);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
CREATE TABLE `profiles` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`name` text NOT NULL,
|
|
4
|
+
`emoji` text NOT NULL,
|
|
5
|
+
`created_at` integer NOT NULL
|
|
6
|
+
);
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
CREATE UNIQUE INDEX `profiles_name_unique` ON `profiles` (`name`);--> statement-breakpoint
|
|
9
|
+
INSERT INTO `profiles` (`id`, `name`, `emoji`, `created_at`) VALUES (1, 'Default', '🍿', unixepoch());--> statement-breakpoint
|
|
10
|
+
CREATE TABLE `favorites` (
|
|
11
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
12
|
+
`profile_id` integer NOT NULL,
|
|
13
|
+
`movie_id` integer,
|
|
14
|
+
`show_id` integer,
|
|
15
|
+
`created_at` integer NOT NULL,
|
|
16
|
+
FOREIGN KEY (`profile_id`) REFERENCES `profiles`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
17
|
+
FOREIGN KEY (`movie_id`) REFERENCES `movies`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
18
|
+
FOREIGN KEY (`show_id`) REFERENCES `shows`(`id`) ON UPDATE no action ON DELETE cascade
|
|
19
|
+
);
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
CREATE UNIQUE INDEX `favorites_profile_movie_idx` ON `favorites` (`profile_id`,`movie_id`);--> statement-breakpoint
|
|
22
|
+
CREATE UNIQUE INDEX `favorites_profile_show_idx` ON `favorites` (`profile_id`,`show_id`);--> statement-breakpoint
|
|
23
|
+
CREATE TABLE `__new_watch_progress` (
|
|
24
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
25
|
+
`profile_id` integer NOT NULL,
|
|
26
|
+
`movie_id` integer,
|
|
27
|
+
`episode_id` integer,
|
|
28
|
+
`current_time` integer NOT NULL,
|
|
29
|
+
`duration` integer,
|
|
30
|
+
`updated_at` integer NOT NULL,
|
|
31
|
+
FOREIGN KEY (`profile_id`) REFERENCES `profiles`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
32
|
+
FOREIGN KEY (`movie_id`) REFERENCES `movies`(`id`) ON UPDATE no action ON DELETE no action,
|
|
33
|
+
FOREIGN KEY (`episode_id`) REFERENCES `episodes`(`id`) ON UPDATE no action ON DELETE no action
|
|
34
|
+
);
|
|
35
|
+
--> statement-breakpoint
|
|
36
|
+
INSERT INTO `__new_watch_progress` (`id`, `profile_id`, `movie_id`, `episode_id`, `current_time`, `duration`, `updated_at`)
|
|
37
|
+
SELECT `id`, 1, `movie_id`, `episode_id`, `current_time`, `duration`, `updated_at` FROM `watch_progress`;
|
|
38
|
+
--> statement-breakpoint
|
|
39
|
+
DROP TABLE `watch_progress`;--> statement-breakpoint
|
|
40
|
+
ALTER TABLE `__new_watch_progress` RENAME TO `watch_progress`;--> statement-breakpoint
|
|
41
|
+
CREATE UNIQUE INDEX `watch_progress_profile_movie_idx` ON `watch_progress` (`profile_id`,`movie_id`);--> statement-breakpoint
|
|
42
|
+
CREATE UNIQUE INDEX `watch_progress_profile_episode_idx` ON `watch_progress` (`profile_id`,`episode_id`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
CREATE TABLE `auth_config` (
|
|
2
|
+
`id` integer PRIMARY KEY NOT NULL,
|
|
3
|
+
`password_hash` text,
|
|
4
|
+
`updated_at` integer NOT NULL
|
|
5
|
+
);
|
|
6
|
+
--> statement-breakpoint
|
|
7
|
+
CREATE TABLE `sessions` (
|
|
8
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
9
|
+
`created_at` integer NOT NULL,
|
|
10
|
+
`expires_at` integer NOT NULL,
|
|
11
|
+
`last_seen_at` integer NOT NULL,
|
|
12
|
+
`user_agent` text
|
|
13
|
+
);
|