Skip to content

Commit

Permalink
added TMDB to Hotstar
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Oct 29, 2023
1 parent b0e1480 commit 4538056
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file.
<h2>Changelog</h2>
<div>
<div class="line flex">
<h2>1.0.63</h2>
<h2>1.0.64</h2>
<ul>
<li>fixed Netflix ad skip: skips too far</li>
<li>added IMDB rating to Disney</li>
Expand Down
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.0.63",
"version": "1.0.64",

"homepage_url": "https://github.com/Dreamlinerm/Netflix-Prime-Auto-Skip",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion chrome/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" />
<div class="flex-center flex-col">
<h2 class="title" i18n>pageTitle</h2>
<p style="color: grey; font-size: 1em">v.1.0.63</p>
<p style="color: grey; font-size: 1em">v.1.0.64</p>
</div>
</div>
<a
Expand Down
10 changes: 8 additions & 2 deletions chrome/popup/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" />
<div class="flex-center flex-col">
<h2 class="title" i18n>pageTitle</h2>
<p style="font-size: 1em">v.1.0.63</p>
<p style="font-size: 1em">v.1.0.64</p>
</div>
</div>
<a
Expand Down Expand Up @@ -653,7 +653,13 @@ <h2 i18n>ImportSettings</h2>
<h2>Changelog</h2>
<div>
<div class="line flex">
<h2>1.0.63</h2>
<h2>1.0.64</h2>
<ul>
<li>added TMDB to Hotstar</li>
</ul>
</div>
<div class="line flex">
<p>1.0.63</p>
<ul>
<li>less TMDB calls on disney: bugfix for each works different on chrome</li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions chrome/skipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let isHotstar = /hotstar/i.test(hostname);

let isEdge = /edg/i.test(ua);
let isFirefox = /firefox/i.test(ua);
const version = "1.0.63";
const version = "1.0.64";
if (isPrimeVideo || isNetflix || isDisney || isHotstar) {
// global variables in localStorage
const defaultSettings = {
Expand Down Expand Up @@ -288,8 +288,8 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar) {
let title;
if (isNetflix) title = card?.children?.[1]?.firstChild?.textContent.split(" – ")[0];
// S2: E3 remove this part
else if (isDisney) title = card?.getAttribute("alt").replace(/(S\d+:\sE\d+\s)/g, "");
else if (isHotstar) title = card?.getAttribute("alt").replace(/(S\d+\sE\d+)/g, "");
else if (isDisney) title = card?.getAttribute("alt")?.replace(/(S\d+:\sE\d+\s)/g, "");
else if (isHotstar) title = card?.getAttribute("alt")?.replace(/(S\d+\sE\d+)/g, "");
// amazon
// remove everything after - in the title
else title = card.getAttribute("data-card-title").split(" - ")[0].split(" – ")[0];
Expand Down Expand Up @@ -422,7 +422,7 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar) {
div.textContent = "?";
}
if (isNetflix) card.appendChild(div);
else if (isDisney) card.parentElement.appendChild(div);
else if (isDisney || isHotstar) card.parentElement?.appendChild(div);
else card.firstChild.firstChild.appendChild(div);
}

Expand Down
2 changes: 1 addition & 1 deletion firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.0.63",
"version": "1.0.64",
"homepage_url": "https://github.com/Dreamlinerm/Netflix-Prime-Auto-Skip",
"icons": {
"16": "icons/NetflixAmazon Auto-Skip.svg",
Expand Down
2 changes: 1 addition & 1 deletion firefox/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" />
<div class="flex-center flex-col">
<h2 class="title" i18n>pageTitle</h2>
<p style="color: grey; font-size: 1em">v.1.0.63</p>
<p style="color: grey; font-size: 1em">v.1.0.64</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none" href="https://addons.mozilla.org/de/firefox/addon/netflix-prime-auto-skip/">
Expand Down
10 changes: 8 additions & 2 deletions firefox/popup/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" />
<div class="flex-center flex-col">
<h2 class="title" i18n>pageTitle</h2>
<p style="font-size: 1em">v.1.0.63</p>
<p style="font-size: 1em">v.1.0.64</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none" href="https://addons.mozilla.org/de/firefox/addon/netflix-prime-auto-skip/">
Expand Down Expand Up @@ -648,7 +648,13 @@ <h2 i18n>ImportSettings</h2>
<h2>Changelog</h2>
<div>
<div class="line flex">
<h2>1.0.63</h2>
<h2>1.0.64</h2>
<ul>
<li>added TMDB to Hotstar</li>
</ul>
</div>
<div class="line flex">
<p>1.0.63</p>
<ul>
<li>less TMDB calls on disney: bugfix for each works different on chrome</li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions firefox/skipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let isHotstar = /hotstar/i.test(hostname);

let isEdge = /edg/i.test(ua);
let isFirefox = /firefox/i.test(ua);
const version = "1.0.63";
const version = "1.0.64";
if (isPrimeVideo || isNetflix || isDisney || isHotstar) {
// global variables in localStorage
const defaultSettings = {
Expand Down Expand Up @@ -288,8 +288,8 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar) {
let title;
if (isNetflix) title = card?.children?.[1]?.firstChild?.textContent.split(" – ")[0];
// S2: E3 remove this part
else if (isDisney) title = card?.getAttribute("alt").replace(/(S\d+:\sE\d+\s)/g, "");
else if (isHotstar) title = card?.getAttribute("alt").replace(/(S\d+\sE\d+)/g, "");
else if (isDisney) title = card?.getAttribute("alt")?.replace(/(S\d+:\sE\d+\s)/g, "");
else if (isHotstar) title = card?.getAttribute("alt")?.replace(/(S\d+\sE\d+)/g, "");
// amazon
// remove everything after - in the title
else title = card.getAttribute("data-card-title").split(" - ")[0].split(" – ")[0];
Expand Down Expand Up @@ -422,7 +422,7 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar) {
div.textContent = "?";
}
if (isNetflix) card.appendChild(div);
else if (isDisney) card.parentElement.appendChild(div);
else if (isDisney || isHotstar) card.parentElement?.appendChild(div);
else card.firstChild.firstChild.appendChild(div);
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "streaming-enhanced",
"version": "1.0.63",
"version": "1.0.64",
"description": "Automatically skip Ads, Intros, Recaps, Credits, etc. on Netflix, Prime video and Disney+ & Hotstar.",
"scripts": {
"start": "web-ext run --source-dir ./firefox/",
Expand Down

0 comments on commit 4538056

Please sign in to comment.