Skip to content

Commit

Permalink
release: PDE v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkyr-JS committed Jun 18, 2024
1 parent 9738cad commit 97fa7e4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions plugins/PerformerDetailsExtended/PerformerDetailsExtended.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,17 +319,19 @@ var ItemMostFeaturedOn = function (_a) {
networks_1.push({ count: 1, data: network });
}
});
// Sort count from highest to lowest number of scenes.
networks_1.sort(sortHighToLow);
var topNetwork = networks_1[0];
var additionalNetworkDataValue = topNetwork.count + (topNetwork.count === 1 ? " scene" : " scenes");
var linkToNetwork = "/studios/".concat(topNetwork.data.id, "/scenes?c=(\"type\":\"performers\",\"value\":(\"items\":%5B(\"id\":\"").concat(performer.id, "\",\"label\":\"").concat(encodeURIComponent(performer.name), "\")%5D,\"excluded\":%5B%5D),\"modifier\":\"INCLUDES\")");
// Don't return the network unless it is different from the top studio.
if (topNetwork.data.id !== topStudio.data.id) {
itemMostFeaturedNetwork = (React.createElement(DetailItem_1.default, { collapsed: props.collapsed, id: "most-featured-network", title: "Most Featured On (Network)", value: React.createElement("a", { href: linkToNetwork }, topNetwork.data.name), wide: true, additionalData: {
id: "featured-network-scenes",
value: additionalNetworkDataValue,
} }));
if (networks_1.length > 0) {
// Sort count from highest to lowest number of scenes.
networks_1.sort(sortHighToLow);
var topNetwork = networks_1[0];
var additionalNetworkDataValue = topNetwork.count + (topNetwork.count === 1 ? " scene" : " scenes");
var linkToNetwork = "/studios/".concat(topNetwork.data.id, "/scenes?c=(\"type\":\"performers\",\"value\":(\"items\":%5B(\"id\":\"").concat(performer.id, "\",\"label\":\"").concat(encodeURIComponent(performer.name), "\")%5D,\"excluded\":%5B%5D),\"modifier\":\"INCLUDES\")");
// Don't return the network unless it is different from the top studio.
if (topNetwork.data.id !== topStudio.data.id) {
itemMostFeaturedNetwork = (React.createElement(DetailItem_1.default, { collapsed: props.collapsed, id: "most-featured-network", title: "Most Featured On (Network)", value: React.createElement("a", { href: linkToNetwork }, topNetwork.data.name), wide: true, additionalData: {
id: "featured-network-scenes",
value: additionalNetworkDataValue,
} }));
}
}
}
return (React.createElement(React.Fragment, null,
Expand Down Expand Up @@ -712,7 +714,7 @@ PluginApi.patch.after("PerformerDetailsPanel.DetailGroup", function (_a) {
},
});
var qAllStudios = GQL.useFindStudiosQuery({
variables: { filter: { sort: "id" } },
variables: { filter: { per_page: -1, sort: "id" } },
});
var qConfig = GQL.useConfigurationQuery();
var qStats = GQL.useStatsQuery();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Performer Details Extended
description: Displays metadata about frequent scene partners, most prominent tags, etc. in your library, on performer pages.
url: https://github.com/Valkyr-JS/performer-details-extended
version: 0.1.0
version: 0.2.1
ui:
javascript:
- PerformerDetailsExtended.js
Expand Down

0 comments on commit 97fa7e4

Please sign in to comment.