From 8a4c6e35016c46b00b0423052e71a92ca7cdf886 Mon Sep 17 00:00:00 2001 From: Marvin Alexander Krebber Date: Thu, 21 Nov 2024 13:27:54 +0100 Subject: [PATCH] 1.1.52 --- AuthorHours.json | 2 +- chrome/manifest.json | 2 +- chrome/popup/popup.html | 2 +- chrome/popup/settings.html | 9 ++++++--- chrome/skipper.js | 30 +++++++++++++++++------------- firefox/manifest.json | 2 +- firefox/popup/popup.html | 2 +- firefox/popup/settings.html | 7 +------ firefox/skipper.js | 2 +- package.json | 2 +- 10 files changed, 31 insertions(+), 29 deletions(-) diff --git a/AuthorHours.json b/AuthorHours.json index fb2cc63a..d87ab444 100644 --- a/AuthorHours.json +++ b/AuthorHours.json @@ -1 +1 @@ -{"time":"501h37m14s"} \ No newline at end of file +{"time":"504h38m11s"} \ No newline at end of file diff --git a/chrome/manifest.json b/chrome/manifest.json index fc07c53d..5349b2ac 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "__MSG_extensionName__", "description": "__MSG_extensionDescription__", - "version": "1.1.51", + "version": "1.1.52", "homepage_url": "https://github.com/Dreamlinerm/Netflix-Prime-Auto-Skip", "icons": { diff --git a/chrome/popup/popup.html b/chrome/popup/popup.html index 77b529f8..9bf20335 100644 --- a/chrome/popup/popup.html +++ b/chrome/popup/popup.html @@ -32,7 +32,7 @@

pageTitle

-

v.1.1.51

+

v.1.1.52

pageTitle

-

v.1.1.51

+

v.1.1.52

ImportSettings

Changelog

-

1.1.51

+

1.1.52

    +
  • Disney improved ad skip
  • +
  • Disney fixed Bug first ad is not skipped
  • +
  • TMDB refresh new movie ratings every day
  • Netflix wrong TMDB ratings for movies with dash
-

1.1.51

+

1.1.51

  • implemented GarbageCollection for DBcache, which deletes ratings older than 30 days
diff --git a/chrome/skipper.js b/chrome/skipper.js index 84775e61..d9da3c7b 100644 --- a/chrome/skipper.js +++ b/chrome/skipper.js @@ -32,7 +32,7 @@ const isEdge = /edg/i.test(ua); const htmlLang = document.documentElement.lang; const date = new Date(); const today = date.toISOString().split("T")[0]; -const version = "1.1.51"; +const version = "1.1.52"; if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO) { /* eslint-env root:true */ // global variables in localStorage @@ -205,6 +205,10 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO else if (isDisney || isHotstar) { if (isHotstar) Hotstar_doubleClick(); DisneyObserver.observe(document, config); + setInterval(function () { + let video = Array.from(document.querySelectorAll("video")).find((v) => v.checkVisibility()); + if (settings.Disney?.skipAd) Disney_skipAd(video); + }, 300); } else if (isCrunchyroll) startCrunchyroll(settings.Crunchyroll); else if (isHBO) HBOObserver.observe(document, config); if (settings?.Video?.playOnFullScreen) startPlayOnFullScreen(); @@ -370,8 +374,8 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO const diffInReleaseDate = // vote count is under 80 inaccurate rating vote_count < 100 && - // did not refresh rating in the last 2 days - getDiffInDays(DBCache[title].date, date) > 2 && + // did not refresh rating in the last 0 days + getDiffInDays(DBCache[title].date, date) > 0 && // release date is in the last 50 days after not many people will getDiffInDays(DBCache[title]?.release_date, date) <= 50; @@ -579,8 +583,8 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO // Disney Observers const DisneyObserver = new MutationObserver(Disney); function Disney() { - let video = document.querySelector("video"); - if (!video) video = document.querySelector("disney-web-player")?.shadowRoot?.firstChild?.firstChild; + // first ad not first video + let video = Array.from(document.querySelectorAll("video")).find((v) => v.checkVisibility()); const time = video?.currentTime; if (settings.Disney?.skipIntro) Disney_Intro(video, time); Disney_skipCredits(time); @@ -591,22 +595,22 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO if (settings.Disney?.selfAd) Disney_selfAd(video, time); } if (settings.Video?.scrollVolume) Disney_scrollVolume(video); - if (settings.Disney?.skipAd) Disney_skipAd(video); } async function Disney_skipAd(video) { if (video) { const adTimeText = document.querySelector("div.overlay_interstitials__content_time_display"); if (adTimeText) { const adTime = parseAdTime(adTimeText.textContent); - if (adTime >= 1 && !lastAdTimeText) { - lastAdTimeText = adTime; - resetLastATimeText(100); + if (adTime >= 1 && lastAdTimeText != video.currentTime) { + if (lastAdTimeText == 0) { + log("Disney Ad skipped, length:", adTime, "s"); + settings.Statistics.DisneyAdTimeSkipped += adTime; + increaseBadge(); + } + lastAdTimeText = video.currentTime; video.currentTime += adTime; - log("Disney Ad skipped, length:", adTime, "s"); - settings.Statistics.DisneyAdTimeSkipped += adTime; - increaseBadge(); } - } + } else lastAdTimeText = 0; // remove das video wird nach der pause fortgesetzt text after skipping ad const continueText = document.querySelector("p.toast-notification__text[aria-hidden='true']"); if (continueText?.checkVisibility()) { diff --git a/firefox/manifest.json b/firefox/manifest.json index a8dd0f7c..ade5a32a 100644 --- a/firefox/manifest.json +++ b/firefox/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_extensionName__", "description": "__MSG_extensionDescription__", - "version": "1.1.51", + "version": "1.1.52", "homepage_url": "https://github.com/Dreamlinerm/Netflix-Prime-Auto-Skip", "icons": { "16": "icons/NetflixAmazon Auto-Skip.svg", diff --git a/firefox/popup/popup.html b/firefox/popup/popup.html index 68d17d8b..2e47855e 100644 --- a/firefox/popup/popup.html +++ b/firefox/popup/popup.html @@ -32,7 +32,7 @@

pageTitle

-

v.1.1.51

+

v.1.1.52

pageTitle

-

v.1.1.51

+

v.1.1.52

1.1.52
  • Disney improved ad skip
  • Disney fixed Bug first ad is not skipped
  • TMDB refresh new movie ratings every day
  • - - -
    -

    1.1.51

    -
    • Netflix wrong TMDB ratings for movies with dash
    diff --git a/firefox/skipper.js b/firefox/skipper.js index 5cfb3d54..c1d9a008 100644 --- a/firefox/skipper.js +++ b/firefox/skipper.js @@ -32,7 +32,7 @@ const isEdge = /edg/i.test(ua); const htmlLang = document.documentElement.lang; const date = new Date(); const today = date.toISOString().split("T")[0]; -const version = "1.1.51"; +const version = "1.1.52"; if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO) { /* eslint-env root:true */ // global variables in localStorage diff --git a/package.json b/package.json index c7931f94..8317bc67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "streaming-enhanced", - "version": "1.1.51", + "version": "1.1.52", "description": "Automatically skip Ads, Intros, Credits and add Speed Control, etc. on Netflix, Prime video, Disney+ & Hotstar and Crunchyroll.", "scripts": { "start": "web-ext run --keep-profile-changes --firefox-profile=test --profile-create-if-missing",