├── 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 | ![Single](img/imdb/single.png) 12 | 13 | #### (Old design) 14 | ![Single](img/imdb/single_old.png) 15 | 16 | #### Single page - Alternative 17 | ![Single](img/imdb/single.alternative.jpg) 18 | 19 | #### Multiple page 20 | ![Multiple](img/imdb/multiple.png) 21 |
22 | 23 | ### [Trakt](https://trakt.tv) 24 |
Screenshots 25 | 26 | #### Single Movie 27 | ![Single](img/trakt/single.jpg) 28 |
29 | 30 | ### [TMDB](https://www.themoviedb.org) 31 |
Screenshots 32 | 33 | #### Single Movie 34 | ![Single](img/tmdb/single.jpg) 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(`
`); 45 | 46 | var obj = { 47 | "title": title, 48 | "year": year, 49 | "imdbId": imdbId, 50 | "rating": rating, 51 | "votes": votes, 52 | "releases": [] 53 | }; 54 | //console.log(obj); 55 | 56 | var url = `https://api.srrdb.com/v1/search/imdb:${obj.imdbId}/foreign:no/category:x264/720/--internal/--hdtv/--subfix/--nfofix`; 57 | var self = $(this); 58 | 59 | $.ajax({ 60 | dataType: "json", 61 | url: url 62 | }).done(function (data) { 63 | obj.releases = data.results; 64 | objs.push(obj); 65 | 66 | var index = toRun.index(self); 67 | 68 | if (toRun.length === 0) { 69 | //printSummary(); 70 | } else { 71 | var toInsertInto = $(`#movie-${imdbId}`) 72 | 73 | if (obj.releases.length > 0) { 74 | $.each(obj.releases, function (index, value) { 75 | var releasename = value.release; 76 | var url = `https://www.srrdb.com/release/details/${releasename}`; 77 | 78 | $(toInsertInto).append(`

${releasename}

`); 79 | }); 80 | } else { 81 | $(toInsertInto).css("background-color", "#ffcfcf"); 82 | } 83 | 84 | $(toInsertInto).append(`

Show all...

`); 85 | } 86 | 87 | if (index > -1) { 88 | toRun.splice(index, 1); 89 | } 90 | }); 91 | }); 92 | })(); 93 | -------------------------------------------------------------------------------- /imdb.single.alternative.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name srrDB release lister for IMDB (single) - Alternative 3 | // @icon https://imdb.com/favicon.ico 4 | // @namespace https://srrdb.com/ 5 | // @downloadURL https://raw.githubusercontent.com/srrDB/srrextra/master/imdb.single.alternative.user.js 6 | // @updateURL https://raw.githubusercontent.com/srrDB/srrextra/master/imdb.single.alternative.user.js 7 | // @version 1.0 8 | // @description Lists releases from srrdb.com on imdb.com 9 | // @author Pro-Tweaker 10 | // @author Skalman 11 | // @author Lazur 12 | // @match https://imdb.com/title/* 13 | // @match https://*.imdb.com/title/* 14 | // @require https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/js/all.min.js 15 | // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js 16 | // @grant GM_addStyle 17 | // @grant GM_setClipboard 18 | // ==/UserScript== 19 | 20 | (function () { 21 | 'use strict'; 22 | 23 | GM_addStyle('.release { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }'); 24 | GM_addStyle('.release a { border-radius:3px; }'); 25 | GM_addStyle('.copy-release-name { display:inline-block; border-radius:3px; cursor:pointer; margin-right:5px; color:black; }'); 26 | GM_addStyle('.blink-text { animation: blinker 0.1s steps(2) 4; }'); 27 | GM_addStyle('@keyframes blinker { from { background-color:rgba(245,197,24,0); } to { color:#000; background-color:rgba(245,197,24,1); } }'); 28 | 29 | var idPattern = /\d{7,8}/; 30 | var imdbId = idPattern.exec(document.location.href); 31 | 32 | var url = `https://api.srrdb.com/v1/search/imdb:${imdbId}/foreign:no/category:x264/--internal/--hdtv/--subfix/--nfofix`; 33 | 34 | var html = ` 35 |
36 |
37 | 38 |

39 | Scene releases - srrDB 40 |

41 |
42 |
43 |
44 | 47 |
48 |
49 | `; 50 | 51 | var beginning = $('div.ipc-page-grid').first().children().first(); 52 | var sections = $(beginning).find('section'); 53 | 54 | var has_awards = $('body').html().indexOf('StaticFeature_Awards'); 55 | if(has_awards >= 0) { 56 | $(html).insertBefore(sections.eq(1)); 57 | } else { 58 | $(html).insertBefore(sections.first()); 59 | } 60 | 61 | $.ajax({ 62 | dataType: "json", 63 | url: url 64 | }).done(function (data) { 65 | var releases = data.results; 66 | $("#release-loading").remove(); 67 | 68 | $.each(releases, function (index, value) { 69 | var releasename = value.release; 70 | var url = `https://www.srrdb.com/release/details/${releasename}`; 71 | 72 | var repeatHtml = `
  • ${releasename}
  • `; 73 | 74 | $("#release-lister").append(repeatHtml); 75 | }); 76 | }); 77 | 78 | $(document).on('click', '.copy-release-name', function (evt) { 79 | var select = $(this).next(); 80 | GM_setClipboard(select.text()); 81 | 82 | select.addClass('blink-text'); 83 | setTimeout(function () { select.removeClass('blink-text') }, 500); 84 | 85 | evt.preventDefault(); 86 | }); 87 | })(); 88 | -------------------------------------------------------------------------------- /imdb.single.user.css: -------------------------------------------------------------------------------- 1 | .gHKhNg { 2 | align-items: start; 3 | } 4 | .srrdb-releases { 5 | --highlight-default: rgb(255, 255, 180); 6 | --highlight-fix: rgb(240, 200, 20); 7 | --highlight-hdtv: rgb(255, 60, 60); 8 | --highlight-uncut: rgb(245, 150, 160); 9 | --highlight-proper: rgb(160, 250, 40); 10 | --highlight-foreign: rgb(127, 106, 252); 11 | --highlight-foreign: rgb(200, 160, 255); 12 | --highlight-internal: rgb(245, 140, 85); 13 | --highlight-internal: rgb(255, 130, 30); 14 | --highlight-remastered: rgb(80, 220, 210); 15 | background-color: rgba(0, 0, 0, 0.25); 16 | border-radius: var(--ipt-cornerRadius); 17 | padding: 4px 8px; 18 | border:1px solid rgba(255,255,255,0.15); 19 | } 20 | .srrdb-block + .srrdb-block { 21 | margin-top:0.5em; 22 | } 23 | .srrdb-block h4 { 24 | font-weight:600; 25 | user-select: none; 26 | -webkit-user-select: none; 27 | -ms-user-select: none; 28 | } 29 | .srrdb-block .srrdb-block h4 { 30 | font-size:10pt; 31 | color:rgba(255,255,255,0.5); 32 | } 33 | .srrdb-block h4 span { 34 | font-weight:200; 35 | } 36 | .srrdb-block ul { 37 | margin-left:0.5em; 38 | } 39 | .srrdb-block.collapsed > ul { 40 | display:none; 41 | } 42 | .srrdb-header { 43 | font-weight:bold; 44 | margin-bottom:0.5rem; 45 | } 46 | .srrdb-footer { 47 | font-weight: bold; 48 | margin-top:0.5rem; 49 | margin-bottom: 1rem; 50 | text-align: right; 51 | } 52 | .srrdb-header .fa-external-link-alt, 53 | .srrdb-footer .fa-external-link-alt { 54 | margin-left:0.25rem!important; 55 | scale:0.7; 56 | } 57 | .srrdb-header .svg-inline--fa, 58 | .srrdb-footer .svg-inline--fa { 59 | margin-left:0.25rem!important; 60 | scale:0.75!important; 61 | } 62 | .release { 63 | white-space: nowrap; 64 | overflow: hidden; 65 | text-overflow: ellipsis; 66 | font-size: 10pt; 67 | letter-spacing: -0.5px; 68 | display: block; 69 | } 70 | #release-loading { 71 | font-size: 10pt; 72 | letter-spacing: -0.5px; 73 | } 74 | .foreign-toggle, 75 | .resolution-toggle { 76 | cursor: pointer; 77 | user-select: none; 78 | -webkit-user-select: none; 79 | -ms-user-select: none; 80 | } 81 | .resolution-toggle:hover h4 { 82 | color:rgb(245, 197, 24); 83 | } 84 | .foreign-toggle:hover h4 { 85 | color:rgba(255,255,255,0.75); 86 | } 87 | .collapsed > span > h4 > .fa-square-minus { display:none; } 88 | .collapsed > span > h4 > .fa-square-plus { display:inline; } 89 | .expanded > span > h4 > .fa-square-minus { display:inline; } 90 | .expanded > span > h4 > .fa-square-plus { display:none; } 91 | .release a { 92 | display: inline; 93 | border-radius: 3px; 94 | padding:0 2px; 95 | } 96 | li:hover .highlight { 97 | text-decoration: underline; 98 | } 99 | .highlight { 100 | box-shadow: inset 0px 0px 2px 1px rgba(0,0,0,0.75); 101 | border-radius: 4px; 102 | border-style: solid; 103 | border-width: 1px 0; 104 | border-color: var(--highlight-default); 105 | text-shadow:0 0 1px rgba(0,0,0,0.5); 106 | } 107 | .highlight-border-none .highlight { border-style: none; box-shadow: none; } 108 | .highlight-border-solid .highlight { border-style: solid; } 109 | .highlight-border-dashed .highlight { border-style: dashed; } 110 | 111 | .highlight-keywords .highlight { color:var(--highlight-default); } 112 | 113 | .highlight-keywords .highlight-hdtv { color:var(--highlight-hdtv); } 114 | .highlight-keywords .highlight-fix { color:var(--highlight-fix); } 115 | .highlight-keywords .highlight-remastered { color:var(--highlight-remastered); } 116 | .highlight-keywords .highlight-proper { color:var(--highlight-proper); } 117 | .highlight-keywords .highlight-uncut { color:var(--highlight-uncut); } 118 | .highlight-keywords .highlight-foreign { color:var(--highlight-foreign); } 119 | .highlight-keywords .highlight-internal { color:var(--highlight-internal); } 120 | 121 | .highlight-hdtv { border-color: var(--highlight-hdtv); } 122 | .highlight-fix { border-color: var(--highlight-fix); } 123 | .highlight-remastered { border-color: var(--highlight-remastered); } 124 | .highlight-proper { border-color: var(--highlight-proper); } 125 | .highlight-uncut { border-color: var(--highlight-uncut); } 126 | .highlight-foreign { border-color: var(--highlight-foreign); } 127 | .highlight-internal { border-color: var(--highlight-internal); } 128 | 129 | .copy-release-name { 130 | display: inline-block; 131 | cursor: pointer; 132 | margin-right: 3px; 133 | color: #fff!important; 134 | } 135 | .have-release-check { 136 | color: rgb(103, 173, 75); 137 | margin-right: 1px; 138 | margin-left: 2px; 139 | } 140 | .blink-text { 141 | animation: blinker 0.1s steps(1) infinite; 142 | } 143 | .blink-text .highlight { 144 | background:none; 145 | border:none; 146 | box-shadow:none; 147 | } 148 | @keyframes blinker { 149 | 0% { 150 | color: #000; 151 | background-color: rgba(245, 197, 24, 1); 152 | } 153 | 50% { 154 | color: rgb(245, 197, 24); 155 | background-color: rgba(245, 197, 24, 0); 156 | } 157 | 100% { 158 | color: #000; 159 | background-color: rgba(245, 197, 24, 1); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /imdb.single.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name srrDB release lister for IMDB (single) 3 | // @icon https://imdb.com/favicon.ico 4 | // @namespace https://srrdb.com/ 5 | // @downloadURL https://github.com/srrDB/srrextra/raw/master/imdb.single.user.js 6 | // @updateURL https://github.com/srrDB/srrextra/raw/master/imdb.single.user.js 7 | // @version 1.0.1 8 | // @description Lists releases from srrdb.com on imdb.com 9 | // @author Skalman 10 | // @author Lazur 11 | // @match https://imdb.com/title/* 12 | // @match https://*.imdb.com/title/* 13 | // @require https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/js/all.min.js 14 | // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js 15 | // @resource CSS https://github.com/srrDB/srrextra/raw/master/imdb.single.user.css 16 | // @resource HAVE file:///C:\path\to\list_of_releases_you_have.txt 17 | // @grant GM_addStyle 18 | // @grant GM_setClipboard 19 | // @grant GM_getResourceText 20 | // ==/UserScript== 21 | 22 | /*global $,GM_addStyle,GM_setClipboard*/ 23 | /*jshint esversion: 6 */ 24 | 25 | (function () { 26 | 'use strict'; 27 | 28 | console.clear(); 29 | 30 | // Configuration ----------------------------------------------------------- 31 | const resolutions = ["720p", "1080p", "2160p"]; // Possible options: 720p, 1080p, 2160p, DVDRiP 32 | const autoExpand = ["720p"]; 33 | const showOther = true; // Anything that isn't defined in resolutions ends up in Other 34 | const groupedReleases = {}; 35 | 36 | const showInternal = true; 37 | const showHDTV = false; 38 | 39 | const highlightKeywords = true; 40 | const highlightBorderStyle = 'solid'; // Valid options: none, solid & dashed 41 | 42 | const highlightHDTV = true; 43 | const highlightReadNFO = true; 44 | const highlightFixes = true; 45 | const highlightUncut = false; // Includes UNCENSORED & UNRATED 46 | const highlightProper = true; // Includes REPACK & RERIP 47 | const highlightInternal = true; 48 | const highlightRemastered = true; 49 | 50 | const showForeign = true; 51 | const groupForeign = true; 52 | const autoExpandForeign = false; // If all releases for a resolution are foreign, they will be expanded even if set to false 53 | const considerMultiAsForeign = true; // Releases containing MULTI will be treated as foreign even if they are not on srrDB 54 | const highlightForeign = true; 55 | 56 | const languagesToHighlight = [ 57 | 'CZECH.DUAL', 'CZECH', 58 | 'DANISH', 59 | 'DUTCH', 60 | 'FiNNiSH', 61 | 'FRENCH.QC', 'SUBFRENCH', 'TRUEFRENCH', 'FRENCH', 62 | 'GERMAN.DL', 'GERMAN.DUBBED.DL', 'GERMAN', 63 | 'iTALiAN', 64 | 'MULTI', 65 | 'NORWEGiAN', 66 | 'POLISH', 'PL.DUAL', 'PLDUB.DUAL', 'PLDUB', 67 | 'LATiN.SPANiSH', 'SPANiSH', 68 | 'SWEDiSH', 69 | ]; 70 | // ------------------------------------------------------------------------- 71 | 72 | const haveText = GM_getResourceText("HAVE"); 73 | const haveList = haveText.split('\n').map(line => line.trim()).filter(line => line); 74 | 75 | const styles = GM_getResourceText("CSS"); 76 | GM_addStyle(styles); 77 | 78 | var searchForeign = showForeign ? '' : 'foreign:no/'; 79 | var searchInternal = showInternal ? '' : '--internal/'; 80 | var searchHDTV = showHDTV ? '' : '--hdtv/'; 81 | var idPattern = /\d{7,8}/; 82 | var imdbId = idPattern.exec(document.location.href); 83 | 84 | var url = `https://api.srrdb.com/v1/search/imdb:${imdbId}/${searchForeign}category:x264/${searchInternal}${searchHDTV}`; 85 | 86 | console.log(url); 87 | 88 | var html = ` 89 |
    90 |

    Scene releases from srrDB.com

    91 |
    92 |
    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 = `
    142 |

    ${resolution} (${releases.length})

    143 |
    `; 236 | 237 | $("#release-lister").append(htmlBlock); 238 | 239 | } 240 | 241 | }); 242 | 243 | }); 244 | 245 | $(document).on('click', '.resolution-toggle', function() { 246 | var resolution = $(this).data('resolution'); 247 | var parentClass = '.' + resolution + '-block'; 248 | $(parentClass).toggleClass('collapsed expanded'); 249 | }); 250 | 251 | $(document).on('click', '.foreign-toggle', function() { 252 | var resolution = $(this).data('foreign-resolution'); 253 | var parentClass = '.foreign-' + resolution + '-block'; 254 | $(parentClass).toggleClass('collapsed expanded'); 255 | }); 256 | 257 | $(document).on('click', '.copy-release-name', function (evt) { 258 | var select = $(this).nextAll('a').first(); 259 | GM_setClipboard(select.text().trim()); 260 | 261 | select.addClass('blink-text'); 262 | setTimeout(function () { select.removeClass('blink-text'); }, 300); 263 | 264 | evt.preventDefault(); 265 | }); 266 | 267 | })(); 268 | -------------------------------------------------------------------------------- /img/imdb/multiple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srrDB/srrextra/c26427257f676c5fd29c9d13f96ccfee71b9f560/img/imdb/multiple.png -------------------------------------------------------------------------------- /img/imdb/single.alternative.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srrDB/srrextra/c26427257f676c5fd29c9d13f96ccfee71b9f560/img/imdb/single.alternative.jpg -------------------------------------------------------------------------------- /img/imdb/single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srrDB/srrextra/c26427257f676c5fd29c9d13f96ccfee71b9f560/img/imdb/single.png -------------------------------------------------------------------------------- /img/imdb/single_old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srrDB/srrextra/c26427257f676c5fd29c9d13f96ccfee71b9f560/img/imdb/single_old.png -------------------------------------------------------------------------------- /img/tmdb/single.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srrDB/srrextra/c26427257f676c5fd29c9d13f96ccfee71b9f560/img/tmdb/single.jpg -------------------------------------------------------------------------------- /img/trakt/single.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srrDB/srrextra/c26427257f676c5fd29c9d13f96ccfee71b9f560/img/trakt/single.jpg -------------------------------------------------------------------------------- /tmdb.single.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name srrDB release lister for The Movie Database (TMDB) 3 | // @icon https://www.themoviedb.org/favicon.ico 4 | // @namespace https://srrdb.com/ 5 | // @match https://*.themoviedb.org/movie/* 6 | // @match https://www.themoviedb.org/movie/* 7 | // @version 1.0 8 | // @author Pro-Tweaker 9 | // @author Skalman 10 | // @author Lazur 11 | // @description Lists releases from srrdb.com on themoviedb.org 12 | // @require https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/js/all.min.js 13 | // @grant GM_addStyle 14 | // @grant GM_setClipboard 15 | // ==/UserScript== 16 | 17 | const TMDB_API_KEY = ""; // Don't forget to add your TMDB API key 18 | 19 | (function () { 20 | 'use strict'; 21 | 22 | console.clear(); 23 | 24 | GM_addStyle('.release { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }'); 25 | GM_addStyle('.release a { border-radius:3px; }'); 26 | GM_addStyle('.copy-release-name { display:inline-block; border-radius:3px; cursor:pointer; margin-right:5px; color:black; }'); 27 | GM_addStyle('.blink-text { animation: blinker 0.1s steps(2) 4; }'); 28 | GM_addStyle('@keyframes blinker { from { background-color:rgba(245,197,24,0); } to { color:#000; background-color:rgba(245,197,24,1); } }'); 29 | 30 | var id_regex = /\/(\d+)(?=-|$|\?)/; 31 | var id = id_regex.exec(document.location.href)[1]; 32 | 33 | getIMDbID(id, function (imdbId) { 34 | if (imdbId) { 35 | console.log('IMDb ID:', imdbId); 36 | 37 | insertIMDbLink(imdbId); 38 | 39 | var idPattern = /\d{7,8}/; 40 | var imdbId = idPattern.exec(imdbId); 41 | 42 | var url = `https://api.srrdb.com/v1/search/imdb:${imdbId}/foreign:no/category:x264/--internal/--hdtv/--subfix/--nfofix`; 43 | 44 | var html = ` 45 |
    46 |

    Scene releases - srrDB

    47 |
    48 | 51 |
    52 |
    53 |

    54 | Show more 55 |

    56 |
    57 | `; 58 | 59 | $(html).insertBefore($(".top_billed")); 60 | 61 | $.ajax({ 62 | dataType: "json", 63 | url: url 64 | }).done(function (data) { 65 | var releases = data.results; 66 | $("#release-loading").remove(); 67 | 68 | $.each(releases, function (index, value) { 69 | var releasename = value.release; 70 | var url = `https://www.srrdb.com/release/details/${releasename}`; 71 | var repeatHtml = `
  • ${releasename}
  • `; 72 | 73 | $("#release-lister").append(repeatHtml); 74 | }); 75 | }); 76 | 77 | $(document).on('click', '.copy-release-name', function (evt) { 78 | var select = $(this).next(); 79 | GM_setClipboard(select.text()); 80 | 81 | select.addClass('blink-text'); 82 | setTimeout(function () { select.removeClass('blink-text') }, 500); 83 | 84 | evt.preventDefault(); 85 | }); 86 | 87 | } else { 88 | console.log('Error fetching IMDb ID.'); 89 | } 90 | }); 91 | })(); 92 | 93 | function getIMDbID(movieID, callback) { 94 | const apiUrl = `https://api.themoviedb.org/3/movie/${movieID}?api_key=${TMDB_API_KEY}`; 95 | 96 | $.get(apiUrl, function (data) { 97 | const imdbId = data.imdb_id; 98 | callback(imdbId); 99 | }).fail(function (jqXHR, textStatus, errorThrown) { 100 | console.error('Request failed with status:', jqXHR.status); 101 | callback(null); 102 | }); 103 | } 104 | 105 | function insertIMDbLink(imdbID) { 106 | var html = ` 107 |
    108 | 109 | 110 | 111 |
    112 | `; 113 | 114 | if ($('div.social_links div').length > 0) { 115 | $(html).insertAfter($("div.social_links div:last-child")); 116 | } else { 117 | $("div.social_links").append(html); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /trakt.single.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name srrDB release lister for Trakt.tv (single) 3 | // @icon https://trakt.tv/favicon.ico 4 | // @namespace https://srrdb.com/ 5 | // @version 1.0 6 | // @description Lists releases from srrdb.com on trakt.tv 7 | // @author Pro-Tweaker 8 | // @author Skalman 9 | // @author Lazur 10 | // @match https://trakt.tv/movies/* 11 | // @grant GM_addStyle 12 | // @grant GM_setClipboard 13 | // ==/UserScript== 14 | 15 | (function () { 16 | 'use strict'; 17 | 18 | // Add styles 19 | GM_addStyle('.release { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }'); 20 | GM_addStyle('.release a { border-radius:3px; }'); 21 | GM_addStyle('.copy-release-name { display:inline-block; border-radius:3px; cursor:pointer; margin-right:5px; color:black; }'); 22 | GM_addStyle('.blink-text { animation: blinker 0.1s steps(2) 4; }'); 23 | GM_addStyle('@keyframes blinker { from { background-color:rgba(245,197,24,0); } to { color:#000; background-color:rgba(245,197,24,1); } }'); 24 | 25 | var link = ""; 26 | var links = $('.external').first().children().first().children(); 27 | 28 | for (let index = 0; index < links.length; ++index) { 29 | const element = links[index].href; 30 | 31 | if (element.indexOf("imdb") >= 0) { 32 | link = element; 33 | break; 34 | } 35 | } 36 | 37 | var idPattern = /\d{7,8}/; 38 | var imdbId = idPattern.exec(link); 39 | 40 | var url = `https://api.srrdb.com/v1/search/imdb:${imdbId}/foreign:no/category:x264/--internal/--hdtv/--subfix/--nfofix`; 41 | 42 | var html = ` 43 |
    44 |

    45 | Scene releases - srrDB 46 | 47 |
    48 | Show more 49 |
    50 |
    51 |
    52 |

    53 |
    54 | 57 |
    58 |
    59 | `; 60 | 61 | $(html).insertBefore($("#actors")); 62 | 63 | $.ajax({ 64 | dataType: "json", 65 | url: url 66 | }).done(function (data) { 67 | var releases = data.results; 68 | $("#release-loading").remove(); 69 | 70 | $.each(releases, function (index, value) { 71 | var releasename = value.release; 72 | var url = `https://www.srrdb.com/release/details/${releasename}`; 73 | 74 | var repeatHtml = `
  • ${releasename}
  • `; 75 | 76 | $("#release-lister").append(repeatHtml); 77 | }); 78 | }); 79 | 80 | $(document).on('click', '.copy-release-name', function (evt) { 81 | var select = $(this).next(); 82 | GM_setClipboard(select.text()); 83 | 84 | select.addClass('blink-text'); 85 | setTimeout(function () { select.removeClass('blink-text') }, 500); 86 | 87 | evt.preventDefault(); 88 | }); 89 | })(); 90 | --------------------------------------------------------------------------------