@opentabs-dev/opentabs-plugin-netflix 0.0.82 → 0.0.83
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 +2 -3
- package/dist/adapter.iife.js +30 -40
- package/dist/adapter.iife.js.map +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/tools/get-title-details.d.ts.map +1 -1
- package/dist/tools/get-title-details.js +31 -8
- package/dist/tools/get-title-details.js.map +1 -1
- package/dist/tools/schemas.js +1 -1
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools.json +5 -73
- package/package.json +3 -3
- package/dist/tools/get-notifications.d.ts +0 -12
- package/dist/tools/get-notifications.d.ts.map +0 -1
- package/dist/tools/get-notifications.js +0 -33
- package/dist/tools/get-notifications.js.map +0 -1
package/README.md
CHANGED
|
@@ -19,15 +19,14 @@ npm install -g @opentabs-dev/opentabs-plugin-netflix
|
|
|
19
19
|
1. Open [netflix.com](https://www.netflix.com/browse) in Chrome and log in
|
|
20
20
|
2. Open the OpenTabs side panel — the Netflix plugin should appear as **ready**
|
|
21
21
|
|
|
22
|
-
## Tools (
|
|
22
|
+
## Tools (18)
|
|
23
23
|
|
|
24
|
-
### Account (
|
|
24
|
+
### Account (2)
|
|
25
25
|
|
|
26
26
|
| Tool | Description | Type |
|
|
27
27
|
|---|---|---|
|
|
28
28
|
| `get_current_user` | Get current Netflix user info | Read |
|
|
29
29
|
| `list_profiles` | List all Netflix profiles | Read |
|
|
30
|
-
| `get_notifications` | Get Netflix notifications | Read |
|
|
31
30
|
|
|
32
31
|
### Browse (9)
|
|
33
32
|
|
package/dist/adapter.iife.js
CHANGED
|
@@ -14149,7 +14149,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14149
14149
|
is_original: t.isOriginal ?? t.summary?.isOriginal ?? false,
|
|
14150
14150
|
maturity_rating: t.contentAdvisory?.certificationValue ?? "",
|
|
14151
14151
|
maturity_description: t.contentAdvisory?.maturityDescription ?? "",
|
|
14152
|
-
synopsis: t.contextualSynopsis?.text ?? t.synopsis?.value ??
|
|
14152
|
+
synopsis: t.contextualSynopsis?.text ?? t.synopsis?.value ?? "",
|
|
14153
14153
|
genres: t.textEvidence?.[0]?.text ?? "",
|
|
14154
14154
|
watch_status: t.watchStatus ?? "NOT_WATCHED",
|
|
14155
14155
|
is_in_my_list: t.isInPlaylist ?? t.isInRemindMeList ?? false,
|
|
@@ -14296,34 +14296,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14296
14296
|
}
|
|
14297
14297
|
});
|
|
14298
14298
|
|
|
14299
|
-
// src/tools/get-notifications.ts
|
|
14300
|
-
var notificationSchema = external_exports.object({
|
|
14301
|
-
type: external_exports.string().describe("Notification type"),
|
|
14302
|
-
title: external_exports.string().describe("Notification title text"),
|
|
14303
|
-
message: external_exports.string().describe("Notification message body"),
|
|
14304
|
-
image_url: external_exports.string().describe("Notification image URL"),
|
|
14305
|
-
video_id: external_exports.number().int().describe("Related video ID (0 if none)")
|
|
14306
|
-
});
|
|
14307
|
-
var getNotifications = defineTool({
|
|
14308
|
-
name: "get_notifications",
|
|
14309
|
-
displayName: "Get Notifications",
|
|
14310
|
-
description: "Get the Netflix notification list for the current profile. Returns new release notifications, recommendations, and other alerts. Also returns the unread count.",
|
|
14311
|
-
summary: "Get Netflix notifications",
|
|
14312
|
-
icon: "bell",
|
|
14313
|
-
group: "Account",
|
|
14314
|
-
input: external_exports.object({}),
|
|
14315
|
-
output: external_exports.object({
|
|
14316
|
-
notifications: external_exports.array(notificationSchema).describe("Notification entries"),
|
|
14317
|
-
unread_count: external_exports.number().int().describe("Number of unread notifications")
|
|
14318
|
-
}),
|
|
14319
|
-
handle: async () => {
|
|
14320
|
-
const unreadCount = getPageGlobal("netflix.falcorCache.notifications.unreadCount") ?? 0;
|
|
14321
|
-
const count = typeof unreadCount === "object" ? unreadCount.value ?? 0 : unreadCount;
|
|
14322
|
-
const notifications = [];
|
|
14323
|
-
return { notifications, unread_count: count };
|
|
14324
|
-
}
|
|
14325
|
-
});
|
|
14326
|
-
|
|
14327
14299
|
// src/tools/get-seasons.ts
|
|
14328
14300
|
var getSeasons = defineTool({
|
|
14329
14301
|
name: "get_seasons",
|
|
@@ -14427,8 +14399,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14427
14399
|
maturity_description: external_exports.string().describe("Description of the maturity rating"),
|
|
14428
14400
|
content_reasons: external_exports.array(external_exports.string()).describe('Content advisory reasons (e.g., "violence", "language")'),
|
|
14429
14401
|
genres: external_exports.string().describe("Genre tags"),
|
|
14430
|
-
cast: external_exports.array(external_exports.string()).describe("Cast member names"),
|
|
14431
|
-
creators: external_exports.array(external_exports.string()).describe("Creator/director names"),
|
|
14402
|
+
cast: external_exports.array(external_exports.string()).describe("Cast member names (may be empty \u2014 not always available from the cache)"),
|
|
14403
|
+
creators: external_exports.array(external_exports.string()).describe("Creator/director names (may be empty \u2014 not always available from the cache)"),
|
|
14432
14404
|
is_original: external_exports.boolean().describe("Whether this is a Netflix Original"),
|
|
14433
14405
|
playback_badges: external_exports.array(external_exports.string()).describe("Quality badges (e.g., VIDEO_ULTRA_HD, AUDIO_FIVE_DOT_ONE)"),
|
|
14434
14406
|
watch_status: external_exports.string().describe("Watch status"),
|
|
@@ -14441,8 +14413,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14441
14413
|
var getTitleDetails = defineTool({
|
|
14442
14414
|
name: "get_title_details",
|
|
14443
14415
|
displayName: "Get Title Details",
|
|
14444
|
-
description: "Get comprehensive details about a Netflix title including
|
|
14445
|
-
summary: "Get full details including
|
|
14416
|
+
description: "Get comprehensive details about a Netflix title including content advisory, quality badges, and user rating. More detailed than get_title \u2014 use this when you need content advisories or playback badges.",
|
|
14417
|
+
summary: "Get full details including advisories and badges",
|
|
14446
14418
|
icon: "info",
|
|
14447
14419
|
group: "Browse",
|
|
14448
14420
|
input: external_exports.object({
|
|
@@ -14469,25 +14441,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14469
14441
|
];
|
|
14470
14442
|
await pe.get.bind(pe)(...paths);
|
|
14471
14443
|
}
|
|
14444
|
+
if (apolloClient?.cache) {
|
|
14445
|
+
const cacheData = apolloClient.cache.extract();
|
|
14446
|
+
apolloData = cacheData[`Movie:{"videoId":${videoId}}`] ?? cacheData[`Show:{"videoId":${videoId}}`] ?? null;
|
|
14447
|
+
}
|
|
14448
|
+
if (!apolloData) apolloData = readApolloTitle(params.video_id);
|
|
14472
14449
|
}
|
|
14473
14450
|
const contentAdvisory = apolloData?.contentAdvisory;
|
|
14474
14451
|
const reasons = contentAdvisory?.reasons ?? [];
|
|
14475
14452
|
const playbackBadges = apolloData?.playbackBadges ?? [];
|
|
14476
|
-
|
|
14453
|
+
let genres = "";
|
|
14454
|
+
if (apolloData) {
|
|
14455
|
+
for (const k of Object.keys(apolloData)) {
|
|
14456
|
+
if (k.startsWith("textEvidence(") || k.startsWith("textEvidence")) {
|
|
14457
|
+
const tags = apolloData[k];
|
|
14458
|
+
if (tags?.[0]?.text) {
|
|
14459
|
+
genres = tags[0].text;
|
|
14460
|
+
break;
|
|
14461
|
+
}
|
|
14462
|
+
}
|
|
14463
|
+
}
|
|
14464
|
+
}
|
|
14465
|
+
const contextualSynopsis = apolloData?.contextualSynopsis;
|
|
14466
|
+
const synopsisField = apolloData?.synopsis;
|
|
14467
|
+
const synopsis = contextualSynopsis?.text ?? synopsisField?.value ?? "";
|
|
14477
14468
|
return {
|
|
14478
14469
|
title: {
|
|
14479
14470
|
video_id: params.video_id,
|
|
14480
14471
|
title: apolloData?.title ?? titleVal ?? "",
|
|
14481
14472
|
type: apolloData?.__typename?.toLowerCase() ?? "",
|
|
14482
14473
|
year: apolloData?.latestYear ?? 0,
|
|
14483
|
-
synopsis
|
|
14474
|
+
synopsis,
|
|
14484
14475
|
maturity_rating: contentAdvisory?.certificationValue ?? "",
|
|
14485
14476
|
maturity_description: contentAdvisory?.maturityDescription ?? "",
|
|
14486
14477
|
content_reasons: reasons.map((r) => r.text ?? "").filter(Boolean),
|
|
14487
|
-
genres
|
|
14478
|
+
genres,
|
|
14488
14479
|
cast: [],
|
|
14489
14480
|
creators: [],
|
|
14490
|
-
is_original: false,
|
|
14481
|
+
is_original: apolloData?.isOriginal ?? false,
|
|
14491
14482
|
playback_badges: playbackBadges,
|
|
14492
14483
|
watch_status: apolloData?.watchStatus ?? "NOT_WATCHED",
|
|
14493
14484
|
is_in_my_list: apolloData?.isInPlaylist ?? false,
|
|
@@ -15098,7 +15089,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15098
15089
|
listGenreTitles,
|
|
15099
15090
|
rateTitle,
|
|
15100
15091
|
listProfiles,
|
|
15101
|
-
getNotifications,
|
|
15102
15092
|
navigateToTitle,
|
|
15103
15093
|
navigateToGenre,
|
|
15104
15094
|
playTitle
|
|
@@ -15110,7 +15100,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15110
15100
|
};
|
|
15111
15101
|
var src_default = new NetflixPlugin();
|
|
15112
15102
|
|
|
15113
|
-
// dist/
|
|
15103
|
+
// dist/_adapter_entry_cb550809-29ad-4c37-a70a-b3686f6ae892.ts
|
|
15114
15104
|
if (!globalThis.__openTabs) {
|
|
15115
15105
|
globalThis.__openTabs = {};
|
|
15116
15106
|
} else {
|
|
@@ -15326,5 +15316,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15326
15316
|
};
|
|
15327
15317
|
delete src_default.onDeactivate;
|
|
15328
15318
|
}
|
|
15329
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["netflix"]){var a=o.adapters["netflix"];a.__adapterHash="
|
|
15319
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["netflix"]){var a=o.adapters["netflix"];a.__adapterHash="a608823a434b86bec9c85b3fd8623fa9626e72d8a7b5b85c565dc9cfe4a3686f";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"netflix",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15330
15320
|
//# sourceMappingURL=adapter.iife.js.map
|