├── README.md
├── imdb.mutliple.user.js
├── imdb.single.alternative.user.js
├── imdb.single.user.css
├── imdb.single.user.js
├── img
├── imdb
│ ├── multiple.png
│ ├── single.alternative.jpg
│ ├── single.png
│ └── single_old.png
├── tmdb
│ └── single.jpg
└── trakt
│ └── single.jpg
├── tmdb.single.user.js
└── trakt.single.user.js
/README.md:
--------------------------------------------------------------------------------
1 | # srrextra
2 |
3 | Collection of userscripts designed to integrate on various websites for easy scene release lookup using [srrDB API](https://www.srrdb.com/help#api)
4 |
5 | ## Compatible Websites
6 |
7 | ### [IMDb](https://www.imdb.com)
8 | Screenshots
9 |
10 | #### Single page
11 | 
12 |
13 | #### (Old design)
14 | 
15 |
16 | #### Single page - Alternative
17 | 
18 |
19 | #### Multiple page
20 | 
21 |
22 |
23 | ### [Trakt](https://trakt.tv)
24 | Screenshots
25 |
26 | #### Single Movie
27 | 
28 |
29 |
30 | ### [TMDB](https://www.themoviedb.org)
31 | Screenshots
32 |
33 | #### Single Movie
34 | 
35 |
36 |
37 | ## Installation
38 |
39 | Install your preferred userscript manager extension in your browser and add the desired scripts.
40 |
41 | ### Userscript manager extensions
42 | - [Violentmonkey](https://violentmonkey.github.io/)⭐️
43 | - [Google Chrome](https://chrome.google.com/webstore/detail/violent-monkey/jinjaccalgkegednnccohejagnlnfdag)
44 | - [Mozilla Firefox](https://addons.mozilla.org/firefox/addon/violentmonkey/)
45 | - [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/eeagobfjdenkkddmbclomhiblgggliao)
46 | - [Tampermonkey](https://www.tampermonkey.net/)
47 | - [Google Chrome](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo)
48 | - [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/)
49 | - [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/tampermonkey/iikmkjmpaadaobahmlepeloendndfphd)
50 | - [Safari](https://apps.apple.com/us/app/tampermonkey/id1482490089)
51 | - [Opera](https://addons.opera.com/en/extensions/details/tampermonkey-beta/)
52 |
53 | The scripts may also be compatible with other browsers and plugins; if you find any additional compatibility, please let us know.
--------------------------------------------------------------------------------
/imdb.mutliple.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name Srrdb release lister for IMDB (multiple / search)
3 | // @icon https://imdb.com/favicon.ico
4 | // @namespace https://srrdb.com/
5 | // @version 0.1.1
6 | // @description Lists releases from srrdb.com on imdb.com
7 | // @author Skalman
8 | // @match https://imdb.com/search/title/*
9 | // @match https://*.imdb.com/search/title/*
10 | // @grant none
11 | // ==/UserScript==
12 |
13 | /*global $*/
14 |
15 | //https://www.imdb.com/search/title/?count=100&groups=top_1000&sort=user_rating
16 | //https://www.imdb.com/search/title/?groups=top_1000&sort=num_votes,desc
17 | //https://www.imdb.com/search/title/?num_votes=100000,&sort=num_votes,desc
18 |
19 | (function () {
20 | 'use strict';
21 |
22 | console.clear();
23 | var objs = [];
24 | var toRun = $("div.lister-item.mode-advanced");
25 | var idPattern = /\d{7}/;
26 |
27 | //run complete
28 | function printSummary() {
29 | //console.clear();
30 | //console.log(objs);
31 | }
32 |
33 | $("div.lister-item.mode-advanced").each(function (index) {
34 | var title = $(this).find(".lister-item-header a").text();
35 | var imdbUrl = $(this).find(".lister-item-header a").attr("href");
36 | var imdbId = idPattern.exec(imdbUrl);
37 |
38 | var year = parseInt($(this).find(".lister-item-year").text().substring(1, 5));
39 | var rating = parseFloat($(this).find(".ratings-imdb-rating strong").text().replace(",", "."));
40 | var votes = $(this).find(".sort-num_votes-visible span:nth-child(2)").data("value");
41 |
42 | var parentDiv = $(this).find(".lister-item-content");
43 |
44 | $(parentDiv).append(`
93 |
94 |
95 | Loading releases...
96 |
97 |
98 |
99 |
101 |
102 | `;
103 | $(html).prependTo($("button[data-testid='tm-box-wl-button']").parent().parent());
104 |
105 | $.ajax({
106 | dataType: "json",
107 | url: url
108 | }).done(function (data) {
109 | var releases = data.results;
110 |
111 | resolutions.forEach(resolution => {
112 | groupedReleases[resolution] = releases.filter(item => item.release.toLowerCase().includes(resolution.toLowerCase()));
113 | });
114 |
115 | if(showOther) {
116 | groupedReleases['Other'] = [];
117 |
118 | releases.forEach(release => {
119 | let isOrphaned = true;
120 | resolutions.forEach(resolution => {
121 | if (groupedReleases[resolution].includes(release)) {
122 | isOrphaned = false;
123 | }
124 | });
125 |
126 | if (isOrphaned) {
127 | groupedReleases['Other'].push(release);
128 | }
129 | });
130 | }
131 |
132 | if (releases.length > 0) {
133 | $("#release-loading").remove();
134 | } else {
135 | $("#release-loading").text(`No ${resolutions.join(' / ')} release found...`);
136 | }
137 |
138 | $.each(groupedReleases, function(resolution, releases) {
139 | if (releases.length > 0) {
140 |
141 | let htmlBlock = `