@dominevo/addon-media-library 0.1.14 → 0.1.15
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/CHANGELOG.md +6 -0
- package/dist/media-library.addon.js +68 -54
- package/dist/media-library.addon.mjs +68 -54
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.15] - 2026-12-04
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- The media plugin app is now offered to viewers as well as admins by default
|
|
15
|
+
|
|
10
16
|
## [0.1.14] - 2026-12-04
|
|
11
17
|
|
|
12
18
|
### Removed
|
|
@@ -8605,57 +8605,6 @@ var NOT_A_DEVICE = {
|
|
|
8605
8605
|
INTERNAL: "internal plumbing between addons — never operator-facing"
|
|
8606
8606
|
};
|
|
8607
8607
|
//#endregion
|
|
8608
|
-
//#region ../types/dist/esm/capabilities/address-role-source.cap.mjs
|
|
8609
|
-
/**
|
|
8610
|
-
* `address-role-source` — the connection kinds an addon needs of the hub's address
|
|
8611
|
-
* palette (D1124). A collection cap, shaped like `retention-source` (D1084): each addon
|
|
8612
|
-
* that wants its OWN kind of connection (media playback, a notification link, …)
|
|
8613
|
-
* registers a provider and lists its declarations; the hub's collection fan-out
|
|
8614
|
-
* concatenates the answers, so no central list has to be edited and `local-network`
|
|
8615
|
-
* (which owns the palette and the operator's flags) hardcodes none.
|
|
8616
|
-
*
|
|
8617
|
-
* A declaration stores nothing. The operator's choice lives in `local-network`
|
|
8618
|
-
* (`setDeclaredAddressRole`), validated against the same palette every fixed role uses
|
|
8619
|
-
* (`HUB_ADDRESS_ROLES` stays the framework's own four). `default` says what the role
|
|
8620
|
-
* resolves to while nothing is flagged: `follow: 'connection'` means "whatever the client
|
|
8621
|
-
* is connected to" (the behaviour before the role existed), the others name a fixed role.
|
|
8622
|
-
*/
|
|
8623
|
-
var AddressRoleCardinalitySchema = /* @__PURE__ */ _enum(["many", "single"]);
|
|
8624
|
-
/** What an unflagged declared role resolves to. */
|
|
8625
|
-
var AddressRoleFollowSchema = /* @__PURE__ */ _enum([
|
|
8626
|
-
"connection",
|
|
8627
|
-
"appConnections",
|
|
8628
|
-
"publicEndpoint",
|
|
8629
|
-
"internal"
|
|
8630
|
-
]);
|
|
8631
|
-
var addressRoleSourceCapability = {
|
|
8632
|
-
name: "address-role-source",
|
|
8633
|
-
scope: "system",
|
|
8634
|
-
mode: "collection",
|
|
8635
|
-
internal: true,
|
|
8636
|
-
methods: {
|
|
8637
|
-
/** List the address roles this addon declares. */
|
|
8638
|
-
listAddressRoles: /* @__PURE__ */ method(/* @__PURE__ */ _void(), /* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
8639
|
-
/** Stable id: `<addonId>:<kind>`. */
|
|
8640
|
-
id: /* @__PURE__ */ string().min(1),
|
|
8641
|
-
/** The addon that declares and consumes the role. */
|
|
8642
|
-
owner: /* @__PURE__ */ string().min(1),
|
|
8643
|
-
/** i18n key of the label (`addressRole.<owner>.<kind>`). */
|
|
8644
|
-
labelKey: /* @__PURE__ */ string().min(1),
|
|
8645
|
-
/** English fallback when the key has no translation. */
|
|
8646
|
-
label: /* @__PURE__ */ string().min(1),
|
|
8647
|
-
/** i18n key of the description. */
|
|
8648
|
-
descriptionKey: /* @__PURE__ */ string().min(1).optional(),
|
|
8649
|
-
/** English fallback of the description. */
|
|
8650
|
-
description: /* @__PURE__ */ string().min(1).optional(),
|
|
8651
|
-
/** `many`: a set of addresses the client races; `single`: at most one address carries it. */
|
|
8652
|
-
cardinality: AddressRoleCardinalitySchema,
|
|
8653
|
-
/** What the role resolves to while the operator has flagged nothing. */
|
|
8654
|
-
default: /* @__PURE__ */ object({ follow: AddressRoleFollowSchema })
|
|
8655
|
-
})).readonly(), { auth: "admin" }) },
|
|
8656
|
-
vocabulary: { notOperatorFacing: NOT_A_DEVICE.INTERNAL }
|
|
8657
|
-
};
|
|
8658
|
-
//#endregion
|
|
8659
8608
|
//#region ../types/dist/esm/capabilities/app-source.cap.mjs
|
|
8660
8609
|
/**
|
|
8661
8610
|
* `app-source` — collection cap: every addon that offers an app in the viewer
|
|
@@ -8758,6 +8707,57 @@ var appSourceCapability = {
|
|
|
8758
8707
|
})).readonly(), { auth: "admin" }) },
|
|
8759
8708
|
vocabulary: { notOperatorFacing: NOT_A_DEVICE.UI_PLUMBING }
|
|
8760
8709
|
};
|
|
8710
|
+
//#endregion
|
|
8711
|
+
//#region ../types/dist/esm/capabilities/address-role-source.cap.mjs
|
|
8712
|
+
/**
|
|
8713
|
+
* `address-role-source` — the connection kinds an addon needs of the hub's address
|
|
8714
|
+
* palette (D1124). A collection cap, shaped like `retention-source` (D1084): each addon
|
|
8715
|
+
* that wants its OWN kind of connection (media playback, a notification link, …)
|
|
8716
|
+
* registers a provider and lists its declarations; the hub's collection fan-out
|
|
8717
|
+
* concatenates the answers, so no central list has to be edited and `local-network`
|
|
8718
|
+
* (which owns the palette and the operator's flags) hardcodes none.
|
|
8719
|
+
*
|
|
8720
|
+
* A declaration stores nothing. The operator's choice lives in `local-network`
|
|
8721
|
+
* (`setDeclaredAddressRole`), validated against the same palette every fixed role uses
|
|
8722
|
+
* (`HUB_ADDRESS_ROLES` stays the framework's own four). `default` says what the role
|
|
8723
|
+
* resolves to while nothing is flagged: `follow: 'connection'` means "whatever the client
|
|
8724
|
+
* is connected to" (the behaviour before the role existed), the others name a fixed role.
|
|
8725
|
+
*/
|
|
8726
|
+
var AddressRoleCardinalitySchema = /* @__PURE__ */ _enum(["many", "single"]);
|
|
8727
|
+
/** What an unflagged declared role resolves to. */
|
|
8728
|
+
var AddressRoleFollowSchema = /* @__PURE__ */ _enum([
|
|
8729
|
+
"connection",
|
|
8730
|
+
"appConnections",
|
|
8731
|
+
"publicEndpoint",
|
|
8732
|
+
"internal"
|
|
8733
|
+
]);
|
|
8734
|
+
var addressRoleSourceCapability = {
|
|
8735
|
+
name: "address-role-source",
|
|
8736
|
+
scope: "system",
|
|
8737
|
+
mode: "collection",
|
|
8738
|
+
internal: true,
|
|
8739
|
+
methods: {
|
|
8740
|
+
/** List the address roles this addon declares. */
|
|
8741
|
+
listAddressRoles: /* @__PURE__ */ method(/* @__PURE__ */ _void(), /* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
8742
|
+
/** Stable id: `<addonId>:<kind>`. */
|
|
8743
|
+
id: /* @__PURE__ */ string().min(1),
|
|
8744
|
+
/** The addon that declares and consumes the role. */
|
|
8745
|
+
owner: /* @__PURE__ */ string().min(1),
|
|
8746
|
+
/** i18n key of the label (`addressRole.<owner>.<kind>`). */
|
|
8747
|
+
labelKey: /* @__PURE__ */ string().min(1),
|
|
8748
|
+
/** English fallback when the key has no translation. */
|
|
8749
|
+
label: /* @__PURE__ */ string().min(1),
|
|
8750
|
+
/** i18n key of the description. */
|
|
8751
|
+
descriptionKey: /* @__PURE__ */ string().min(1).optional(),
|
|
8752
|
+
/** English fallback of the description. */
|
|
8753
|
+
description: /* @__PURE__ */ string().min(1).optional(),
|
|
8754
|
+
/** `many`: a set of addresses the client races; `single`: at most one address carries it. */
|
|
8755
|
+
cardinality: AddressRoleCardinalitySchema,
|
|
8756
|
+
/** What the role resolves to while the operator has flagged nothing. */
|
|
8757
|
+
default: /* @__PURE__ */ object({ follow: AddressRoleFollowSchema })
|
|
8758
|
+
})).readonly(), { auth: "admin" }) },
|
|
8759
|
+
vocabulary: { notOperatorFacing: NOT_A_DEVICE.INTERNAL }
|
|
8760
|
+
};
|
|
8761
8761
|
var MediaItemKindSchema = /* @__PURE__ */ _enum([
|
|
8762
8762
|
"series",
|
|
8763
8763
|
"movie",
|
|
@@ -8967,7 +8967,20 @@ var mediaLibraryCapability = {
|
|
|
8967
8967
|
name: "media-library",
|
|
8968
8968
|
scope: "system",
|
|
8969
8969
|
mode: "singleton",
|
|
8970
|
-
role: { feature: "media" },
|
|
8970
|
+
role: { feature: "media.library" },
|
|
8971
|
+
features: [{
|
|
8972
|
+
id: "media.library",
|
|
8973
|
+
app: "media",
|
|
8974
|
+
label: {
|
|
8975
|
+
key: "feature.media.library",
|
|
8976
|
+
fallback: "Media library"
|
|
8977
|
+
},
|
|
8978
|
+
description: {
|
|
8979
|
+
key: "feature.media.library.description",
|
|
8980
|
+
fallback: "Browse the media library."
|
|
8981
|
+
},
|
|
8982
|
+
defaultRoles: ["admin", "viewer"]
|
|
8983
|
+
}],
|
|
8971
8984
|
methods: {
|
|
8972
8985
|
/** Series, sorted by title. */
|
|
8973
8986
|
listSeries: /* @__PURE__ */ method(PageInputSchema, MediaItemPageSchema, { caller: "required" }),
|
|
@@ -9080,7 +9093,8 @@ function customAction(input, output, options) {
|
|
|
9080
9093
|
kind: options?.kind ?? "query",
|
|
9081
9094
|
auth: options?.auth ?? "protected",
|
|
9082
9095
|
scope: options?.scope ?? { kind: "system" },
|
|
9083
|
-
...options?.caller ? { caller: "required" } : {}
|
|
9096
|
+
...options?.caller ? { caller: "required" } : {},
|
|
9097
|
+
...options?.feature !== void 0 ? { feature: options.feature } : {}
|
|
9084
9098
|
};
|
|
9085
9099
|
}
|
|
9086
9100
|
//#endregion
|
|
@@ -9166,7 +9180,7 @@ function buildPluginApp(version) {
|
|
|
9166
9180
|
version
|
|
9167
9181
|
},
|
|
9168
9182
|
reach: { kind: "hub" },
|
|
9169
|
-
adminOnly:
|
|
9183
|
+
adminOnly: false,
|
|
9170
9184
|
nav: [],
|
|
9171
9185
|
takesSharedSearch: false,
|
|
9172
9186
|
settings: null
|
|
@@ -8601,57 +8601,6 @@ var NOT_A_DEVICE = {
|
|
|
8601
8601
|
INTERNAL: "internal plumbing between addons — never operator-facing"
|
|
8602
8602
|
};
|
|
8603
8603
|
//#endregion
|
|
8604
|
-
//#region ../types/dist/esm/capabilities/address-role-source.cap.mjs
|
|
8605
|
-
/**
|
|
8606
|
-
* `address-role-source` — the connection kinds an addon needs of the hub's address
|
|
8607
|
-
* palette (D1124). A collection cap, shaped like `retention-source` (D1084): each addon
|
|
8608
|
-
* that wants its OWN kind of connection (media playback, a notification link, …)
|
|
8609
|
-
* registers a provider and lists its declarations; the hub's collection fan-out
|
|
8610
|
-
* concatenates the answers, so no central list has to be edited and `local-network`
|
|
8611
|
-
* (which owns the palette and the operator's flags) hardcodes none.
|
|
8612
|
-
*
|
|
8613
|
-
* A declaration stores nothing. The operator's choice lives in `local-network`
|
|
8614
|
-
* (`setDeclaredAddressRole`), validated against the same palette every fixed role uses
|
|
8615
|
-
* (`HUB_ADDRESS_ROLES` stays the framework's own four). `default` says what the role
|
|
8616
|
-
* resolves to while nothing is flagged: `follow: 'connection'` means "whatever the client
|
|
8617
|
-
* is connected to" (the behaviour before the role existed), the others name a fixed role.
|
|
8618
|
-
*/
|
|
8619
|
-
var AddressRoleCardinalitySchema = /* @__PURE__ */ _enum(["many", "single"]);
|
|
8620
|
-
/** What an unflagged declared role resolves to. */
|
|
8621
|
-
var AddressRoleFollowSchema = /* @__PURE__ */ _enum([
|
|
8622
|
-
"connection",
|
|
8623
|
-
"appConnections",
|
|
8624
|
-
"publicEndpoint",
|
|
8625
|
-
"internal"
|
|
8626
|
-
]);
|
|
8627
|
-
var addressRoleSourceCapability = {
|
|
8628
|
-
name: "address-role-source",
|
|
8629
|
-
scope: "system",
|
|
8630
|
-
mode: "collection",
|
|
8631
|
-
internal: true,
|
|
8632
|
-
methods: {
|
|
8633
|
-
/** List the address roles this addon declares. */
|
|
8634
|
-
listAddressRoles: /* @__PURE__ */ method(/* @__PURE__ */ _void(), /* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
8635
|
-
/** Stable id: `<addonId>:<kind>`. */
|
|
8636
|
-
id: /* @__PURE__ */ string().min(1),
|
|
8637
|
-
/** The addon that declares and consumes the role. */
|
|
8638
|
-
owner: /* @__PURE__ */ string().min(1),
|
|
8639
|
-
/** i18n key of the label (`addressRole.<owner>.<kind>`). */
|
|
8640
|
-
labelKey: /* @__PURE__ */ string().min(1),
|
|
8641
|
-
/** English fallback when the key has no translation. */
|
|
8642
|
-
label: /* @__PURE__ */ string().min(1),
|
|
8643
|
-
/** i18n key of the description. */
|
|
8644
|
-
descriptionKey: /* @__PURE__ */ string().min(1).optional(),
|
|
8645
|
-
/** English fallback of the description. */
|
|
8646
|
-
description: /* @__PURE__ */ string().min(1).optional(),
|
|
8647
|
-
/** `many`: a set of addresses the client races; `single`: at most one address carries it. */
|
|
8648
|
-
cardinality: AddressRoleCardinalitySchema,
|
|
8649
|
-
/** What the role resolves to while the operator has flagged nothing. */
|
|
8650
|
-
default: /* @__PURE__ */ object({ follow: AddressRoleFollowSchema })
|
|
8651
|
-
})).readonly(), { auth: "admin" }) },
|
|
8652
|
-
vocabulary: { notOperatorFacing: NOT_A_DEVICE.INTERNAL }
|
|
8653
|
-
};
|
|
8654
|
-
//#endregion
|
|
8655
8604
|
//#region ../types/dist/esm/capabilities/app-source.cap.mjs
|
|
8656
8605
|
/**
|
|
8657
8606
|
* `app-source` — collection cap: every addon that offers an app in the viewer
|
|
@@ -8754,6 +8703,57 @@ var appSourceCapability = {
|
|
|
8754
8703
|
})).readonly(), { auth: "admin" }) },
|
|
8755
8704
|
vocabulary: { notOperatorFacing: NOT_A_DEVICE.UI_PLUMBING }
|
|
8756
8705
|
};
|
|
8706
|
+
//#endregion
|
|
8707
|
+
//#region ../types/dist/esm/capabilities/address-role-source.cap.mjs
|
|
8708
|
+
/**
|
|
8709
|
+
* `address-role-source` — the connection kinds an addon needs of the hub's address
|
|
8710
|
+
* palette (D1124). A collection cap, shaped like `retention-source` (D1084): each addon
|
|
8711
|
+
* that wants its OWN kind of connection (media playback, a notification link, …)
|
|
8712
|
+
* registers a provider and lists its declarations; the hub's collection fan-out
|
|
8713
|
+
* concatenates the answers, so no central list has to be edited and `local-network`
|
|
8714
|
+
* (which owns the palette and the operator's flags) hardcodes none.
|
|
8715
|
+
*
|
|
8716
|
+
* A declaration stores nothing. The operator's choice lives in `local-network`
|
|
8717
|
+
* (`setDeclaredAddressRole`), validated against the same palette every fixed role uses
|
|
8718
|
+
* (`HUB_ADDRESS_ROLES` stays the framework's own four). `default` says what the role
|
|
8719
|
+
* resolves to while nothing is flagged: `follow: 'connection'` means "whatever the client
|
|
8720
|
+
* is connected to" (the behaviour before the role existed), the others name a fixed role.
|
|
8721
|
+
*/
|
|
8722
|
+
var AddressRoleCardinalitySchema = /* @__PURE__ */ _enum(["many", "single"]);
|
|
8723
|
+
/** What an unflagged declared role resolves to. */
|
|
8724
|
+
var AddressRoleFollowSchema = /* @__PURE__ */ _enum([
|
|
8725
|
+
"connection",
|
|
8726
|
+
"appConnections",
|
|
8727
|
+
"publicEndpoint",
|
|
8728
|
+
"internal"
|
|
8729
|
+
]);
|
|
8730
|
+
var addressRoleSourceCapability = {
|
|
8731
|
+
name: "address-role-source",
|
|
8732
|
+
scope: "system",
|
|
8733
|
+
mode: "collection",
|
|
8734
|
+
internal: true,
|
|
8735
|
+
methods: {
|
|
8736
|
+
/** List the address roles this addon declares. */
|
|
8737
|
+
listAddressRoles: /* @__PURE__ */ method(/* @__PURE__ */ _void(), /* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
8738
|
+
/** Stable id: `<addonId>:<kind>`. */
|
|
8739
|
+
id: /* @__PURE__ */ string().min(1),
|
|
8740
|
+
/** The addon that declares and consumes the role. */
|
|
8741
|
+
owner: /* @__PURE__ */ string().min(1),
|
|
8742
|
+
/** i18n key of the label (`addressRole.<owner>.<kind>`). */
|
|
8743
|
+
labelKey: /* @__PURE__ */ string().min(1),
|
|
8744
|
+
/** English fallback when the key has no translation. */
|
|
8745
|
+
label: /* @__PURE__ */ string().min(1),
|
|
8746
|
+
/** i18n key of the description. */
|
|
8747
|
+
descriptionKey: /* @__PURE__ */ string().min(1).optional(),
|
|
8748
|
+
/** English fallback of the description. */
|
|
8749
|
+
description: /* @__PURE__ */ string().min(1).optional(),
|
|
8750
|
+
/** `many`: a set of addresses the client races; `single`: at most one address carries it. */
|
|
8751
|
+
cardinality: AddressRoleCardinalitySchema,
|
|
8752
|
+
/** What the role resolves to while the operator has flagged nothing. */
|
|
8753
|
+
default: /* @__PURE__ */ object({ follow: AddressRoleFollowSchema })
|
|
8754
|
+
})).readonly(), { auth: "admin" }) },
|
|
8755
|
+
vocabulary: { notOperatorFacing: NOT_A_DEVICE.INTERNAL }
|
|
8756
|
+
};
|
|
8757
8757
|
var MediaItemKindSchema = /* @__PURE__ */ _enum([
|
|
8758
8758
|
"series",
|
|
8759
8759
|
"movie",
|
|
@@ -8963,7 +8963,20 @@ var mediaLibraryCapability = {
|
|
|
8963
8963
|
name: "media-library",
|
|
8964
8964
|
scope: "system",
|
|
8965
8965
|
mode: "singleton",
|
|
8966
|
-
role: { feature: "media" },
|
|
8966
|
+
role: { feature: "media.library" },
|
|
8967
|
+
features: [{
|
|
8968
|
+
id: "media.library",
|
|
8969
|
+
app: "media",
|
|
8970
|
+
label: {
|
|
8971
|
+
key: "feature.media.library",
|
|
8972
|
+
fallback: "Media library"
|
|
8973
|
+
},
|
|
8974
|
+
description: {
|
|
8975
|
+
key: "feature.media.library.description",
|
|
8976
|
+
fallback: "Browse the media library."
|
|
8977
|
+
},
|
|
8978
|
+
defaultRoles: ["admin", "viewer"]
|
|
8979
|
+
}],
|
|
8967
8980
|
methods: {
|
|
8968
8981
|
/** Series, sorted by title. */
|
|
8969
8982
|
listSeries: /* @__PURE__ */ method(PageInputSchema, MediaItemPageSchema, { caller: "required" }),
|
|
@@ -9076,7 +9089,8 @@ function customAction(input, output, options) {
|
|
|
9076
9089
|
kind: options?.kind ?? "query",
|
|
9077
9090
|
auth: options?.auth ?? "protected",
|
|
9078
9091
|
scope: options?.scope ?? { kind: "system" },
|
|
9079
|
-
...options?.caller ? { caller: "required" } : {}
|
|
9092
|
+
...options?.caller ? { caller: "required" } : {},
|
|
9093
|
+
...options?.feature !== void 0 ? { feature: options.feature } : {}
|
|
9080
9094
|
};
|
|
9081
9095
|
}
|
|
9082
9096
|
//#endregion
|
|
@@ -9162,7 +9176,7 @@ function buildPluginApp(version) {
|
|
|
9162
9176
|
version
|
|
9163
9177
|
},
|
|
9164
9178
|
reach: { kind: "hub" },
|
|
9165
|
-
adminOnly:
|
|
9179
|
+
adminOnly: false,
|
|
9166
9180
|
nav: [],
|
|
9167
9181
|
takesSharedSearch: false,
|
|
9168
9182
|
settings: null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dominevo/addon-media-library",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "The self-hosted media library: a catalogue built from the arr apps and plain folders, probed files, per-user progress, direct play with Range and a native /media app in the viewer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dominevo",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
],
|
|
60
60
|
"requires": {
|
|
61
|
-
"server": ">=0.1.
|
|
61
|
+
"server": ">=0.1.73"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"files": [
|