@digitalpaws/starr-video 0.0.1

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.rst ADDED
@@ -0,0 +1,70 @@
1
+ .. SPDX-License-Identifier: 0BSD
2
+ .. SPDX-FileCopyrightText: 2025 Digi <digitalpaws@proton.me>
3
+
4
+ =========================
5
+ starr-video
6
+ =========================
7
+
8
+ Registers the **video content types** (movie, TV show, season, episode) in the
9
+ Starr host. This is a pure content-type plugin — it registers four descriptors
10
+ and does not handle search, indexing, or downloading.
11
+
12
+ Content Types
13
+ =============
14
+
15
+ Movie (``starr-video/movie@1``)
16
+ --------------------------------
17
+
18
+ ======================== ===============================================
19
+ Property Value
20
+ ======================== ===============================================
21
+ Identity ``["tmdb", "imdb"]``
22
+ Display Poster, subtitle: releaseDate
23
+ Fields genres, studio, releaseStatus
24
+ ======================== ===============================================
25
+
26
+ TV Show (``starr-video/show@1``)
27
+ ---------------------------------
28
+
29
+ ======================== ===============================================
30
+ Property Value
31
+ ======================== ===============================================
32
+ Identity ``["tmdb", "imdb"]``
33
+ Display Poster, subtitle: firstAirDate
34
+ Fields genres, firstAirDate, lastAirDate, status
35
+ ======================== ===============================================
36
+
37
+ Season (``starr-video/season@1``)
38
+ ----------------------------------
39
+
40
+ ======================== ===============================================
41
+ Property Value
42
+ ======================== ===============================================
43
+ Identity ``["tmdb", "imdb"]``
44
+ Parent Show
45
+ Display Poster, subtitle: seasonNumber
46
+ Fields seasonNumber, episodeCount, firstAirDate
47
+ ======================== ===============================================
48
+
49
+ Episode (``starr-video/episode@1``)
50
+ ------------------------------------
51
+
52
+ ======================== ===============================================
53
+ Property Value
54
+ ======================== ===============================================
55
+ Identity ``["tmdb", "imdb"]``
56
+ Parent Season
57
+ Display Thumbnail, subtitle: episodeNumber
58
+ Fields seasonNumber, episodeNumber, airDate
59
+ Acquirable No (display-only in v1)
60
+ ======================== ===============================================
61
+
62
+ This plugin pairs with metadata providers like ``starr-tmdb`` and ``starr-omdb``
63
+ for discovery/search.
64
+
65
+ Dependencies
66
+ ============
67
+
68
+ - ``starr`` (dev) — plugin context
69
+ - ``starr-types-core`` — content type base types
70
+ - ``starr-types-video`` — video-specific types
@@ -0,0 +1,3 @@
1
+ import type { PluginContext, PluginLifecycle } from "@digitalpaws/starr";
2
+ export default function register(ctx: PluginContext): PluginLifecycle;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA4EzE,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,eAAe,CA0BpE"}
package/dist/index.js ADDED
@@ -0,0 +1,94 @@
1
+ // SPDX-License-Identifier: 0BSD
2
+ // SPDX-FileCopyrightText: 2025 Digi <digitalpaws@proton.me>
3
+ // ── Descriptors ────────────────────────────────────────────────────
4
+ const movieDescriptor = {
5
+ id: "starr-video/movie@1",
6
+ name: "Movie",
7
+ pluralName: "Movies",
8
+ icon: "film",
9
+ identity: ["tmdb", "imdb"],
10
+ fields: [
11
+ { key: "genres", label: "Genres", type: "list", itemType: "string", group: "Details", order: 10 },
12
+ { key: "studio", label: "Studio", type: "string", group: "Details", order: 20 },
13
+ { key: "releaseStatus", label: "Status", type: "string", group: "Details", order: 30 },
14
+ ],
15
+ display: {
16
+ primaryImageRole: "poster",
17
+ subtitle: "releaseDate",
18
+ },
19
+ };
20
+ const showDescriptor = {
21
+ id: "starr-video/show@1",
22
+ name: "TV Show",
23
+ pluralName: "TV Shows",
24
+ icon: "tv",
25
+ identity: ["tmdb", "imdb"],
26
+ fields: [
27
+ { key: "genres", label: "Genres", type: "list", itemType: "string", group: "Details", order: 10 },
28
+ { key: "firstAirDate", label: "First Aired", type: "date", group: "Details", order: 20 },
29
+ { key: "lastAirDate", label: "Last Aired", type: "date", group: "Details", order: 30 },
30
+ { key: "status", label: "Status", type: "string", group: "Details", order: 40 },
31
+ ],
32
+ display: {
33
+ primaryImageRole: "poster",
34
+ subtitle: "fields.firstAirDate",
35
+ },
36
+ };
37
+ const seasonDescriptor = {
38
+ id: "starr-video/season@1",
39
+ name: "Season",
40
+ pluralName: "Seasons",
41
+ icon: "layers",
42
+ identity: ["tmdb", "imdb"],
43
+ fields: [
44
+ { key: "seasonNumber", label: "Season No.", type: "number", group: "Details", order: 10 },
45
+ { key: "episodeCount", label: "Episodes", type: "number", group: "Details", order: 20 },
46
+ { key: "firstAirDate", label: "First Aired", type: "date", group: "Details", order: 30 },
47
+ ],
48
+ display: {
49
+ primaryImageRole: "poster",
50
+ subtitle: "fields.seasonNumber",
51
+ },
52
+ };
53
+ const episodeDescriptor = {
54
+ id: "starr-video/episode@1",
55
+ name: "Episode",
56
+ pluralName: "Episodes",
57
+ icon: "play",
58
+ identity: ["tmdb", "imdb"],
59
+ fields: [
60
+ { key: "seasonNumber", label: "Season No.", type: "number", group: "Details", order: 10 },
61
+ { key: "episodeNumber", label: "Episode No.", type: "number", group: "Details", order: 20 },
62
+ { key: "airDate", label: "Air Date", type: "date", group: "Details", order: 30 },
63
+ ],
64
+ display: {
65
+ primaryImageRole: "thumbnail",
66
+ subtitle: "fields.episodeNumber",
67
+ },
68
+ };
69
+ // ── Register ──────────────────────────────────────────────────────
70
+ export default function register(ctx) {
71
+ ctx.define({
72
+ id: "starr-video",
73
+ version: "1.0.0",
74
+ starrApiVersion: "^1.0.0",
75
+ });
76
+ // Register all four descriptors (order is arbitrary; all must succeed
77
+ // or the loader will roll back the entire plugin).
78
+ ctx.contentTypes.register(movieDescriptor);
79
+ ctx.contentTypes.register(showDescriptor);
80
+ ctx.contentTypes.register(seasonDescriptor);
81
+ ctx.contentTypes.register(episodeDescriptor);
82
+ ctx.logger.info("registered video content types", {
83
+ types: ["movie", "show", "season", "episode"],
84
+ });
85
+ return {
86
+ start() {
87
+ ctx.logger.info("starr-video started");
88
+ },
89
+ stop() {
90
+ ctx.logger.info("starr-video stopped");
91
+ },
92
+ };
93
+ }
94
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,4DAA4D;AAK5D,sEAAsE;AAEtE,MAAM,eAAe,GAA0B;IAC7C,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE;QACN,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QACjG,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QAC/E,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;KACvF;IACD,OAAO,EAAE;QACP,gBAAgB,EAAE,QAAQ;QAC1B,QAAQ,EAAE,aAAa;KACxB;CACF,CAAC;AAEF,MAAM,cAAc,GAA0B;IAC5C,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,UAAU;IACtB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE;QACN,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAA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,gCAAgC,EAAE;QAChD,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;KAC9C,CAAC,CAAC;IAEH,OAAO;QACL,KAAK;YACH,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;QACD,IAAI;YACF,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@digitalpaws/starr-video",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "devDependencies": {
7
+ "typescript": "^5.4.0",
8
+ "@digitalpaws/starr": "0.0.1",
9
+ "@digitalpaws/starr-types-core": "0.0.1",
10
+ "@digitalpaws/starr-types-video": "0.0.1"
11
+ },
12
+ "scripts": {
13
+ "build": "tsc -p tsconfig.json"
14
+ }
15
+ }
@@ -0,0 +1,2 @@
1
+ SPDX-License-Identifier: 0BSD
2
+ SPDX-FileCopyrightText: 2025 Digi <digitalpaws@proton.me>
package/src/index.ts ADDED
@@ -0,0 +1,106 @@
1
+ // SPDX-License-Identifier: 0BSD
2
+ // SPDX-FileCopyrightText: 2025 Digi <digitalpaws@proton.me>
3
+
4
+ import type { PluginContext, PluginLifecycle } from "@digitalpaws/starr";
5
+ import type { ContentTypeDescriptor } from "@digitalpaws/starr-types-core";
6
+
7
+ // ── Descriptors ────────────────────────────────────────────────────
8
+
9
+ const movieDescriptor: ContentTypeDescriptor = {
10
+ id: "starr-video/movie@1",
11
+ name: "Movie",
12
+ pluralName: "Movies",
13
+ icon: "film",
14
+ identity: ["tmdb", "imdb"],
15
+ fields: [
16
+ { key: "genres", label: "Genres", type: "list", itemType: "string", group: "Details", order: 10 },
17
+ { key: "studio", label: "Studio", type: "string", group: "Details", order: 20 },
18
+ { key: "releaseStatus", label: "Status", type: "string", group: "Details", order: 30 },
19
+ ],
20
+ display: {
21
+ primaryImageRole: "poster",
22
+ subtitle: "releaseDate",
23
+ },
24
+ };
25
+
26
+ const showDescriptor: ContentTypeDescriptor = {
27
+ id: "starr-video/show@1",
28
+ name: "TV Show",
29
+ pluralName: "TV Shows",
30
+ icon: "tv",
31
+ identity: ["tmdb", "imdb"],
32
+ fields: [
33
+ { key: "genres", label: "Genres", type: "list", itemType: "string", group: "Details", order: 10 },
34
+ { key: "firstAirDate", label: "First Aired", type: "date", group: "Details", order: 20 },
35
+ { key: "lastAirDate", label: "Last Aired", type: "date", group: "Details", order: 30 },
36
+ { key: "status", label: "Status", type: "string", group: "Details", order: 40 },
37
+ ],
38
+ display: {
39
+ primaryImageRole: "poster",
40
+ subtitle: "fields.firstAirDate",
41
+ },
42
+ };
43
+
44
+ const seasonDescriptor: ContentTypeDescriptor = {
45
+ id: "starr-video/season@1",
46
+ name: "Season",
47
+ pluralName: "Seasons",
48
+ icon: "layers",
49
+ identity: ["tmdb", "imdb"],
50
+ fields: [
51
+ { key: "seasonNumber", label: "Season No.", type: "number", group: "Details", order: 10 },
52
+ { key: "episodeCount", label: "Episodes", type: "number", group: "Details", order: 20 },
53
+ { key: "firstAirDate", label: "First Aired", type: "date", group: "Details", order: 30 },
54
+ ],
55
+ display: {
56
+ primaryImageRole: "poster",
57
+ subtitle: "fields.seasonNumber",
58
+ },
59
+ };
60
+
61
+ const episodeDescriptor: ContentTypeDescriptor = {
62
+ id: "starr-video/episode@1",
63
+ name: "Episode",
64
+ pluralName: "Episodes",
65
+ icon: "play",
66
+ identity: ["tmdb", "imdb"],
67
+ fields: [
68
+ { key: "seasonNumber", label: "Season No.", type: "number", group: "Details", order: 10 },
69
+ { key: "episodeNumber", label: "Episode No.", type: "number", group: "Details", order: 20 },
70
+ { key: "airDate", label: "Air Date", type: "date", group: "Details", order: 30 },
71
+ ],
72
+ display: {
73
+ primaryImageRole: "thumbnail",
74
+ subtitle: "fields.episodeNumber",
75
+ },
76
+ };
77
+
78
+ // ── Register ──────────────────────────────────────────────────────
79
+
80
+ export default function register(ctx: PluginContext): PluginLifecycle {
81
+ ctx.define({
82
+ id: "starr-video",
83
+ version: "1.0.0",
84
+ starrApiVersion: "^1.0.0",
85
+ });
86
+
87
+ // Register all four descriptors (order is arbitrary; all must succeed
88
+ // or the loader will roll back the entire plugin).
89
+ ctx.contentTypes.register(movieDescriptor);
90
+ ctx.contentTypes.register(showDescriptor);
91
+ ctx.contentTypes.register(seasonDescriptor);
92
+ ctx.contentTypes.register(episodeDescriptor);
93
+
94
+ ctx.logger.info("registered video content types", {
95
+ types: ["movie", "show", "season", "episode"],
96
+ });
97
+
98
+ return {
99
+ start() {
100
+ ctx.logger.info("starr-video started");
101
+ },
102
+ stop() {
103
+ ctx.logger.info("starr-video stopped");
104
+ },
105
+ };
106
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "rootDir": "./src",
5
+ "outDir": "./dist"
6
+ },
7
+ "include": ["src/**/*"]
8
+ }
@@ -0,0 +1,2 @@
1
+ SPDX-License-Identifier: 0BSD
2
+ SPDX-FileCopyrightText: 2025 Digi <digitalpaws@proton.me>