Compare commits

...

9 Commits

Author SHA1 Message Date
Ajay Ramachandran
b858971b66 Increase version number 2021-02-24 21:10:05 -05:00
Ajay Ramachandran
383fe59bc0 Lower retry frequency
(cherry picked from commit 3927fe5630)
2021-02-24 21:08:54 -05:00
Ajay Ramachandran
27fe2ca8f0 Increase version number 2021-02-03 18:43:16 -05:00
Ajay Ramachandran
54b4681fc3 Fix invidious support
Fixes https://github.com/ajayyy/SponsorBlock/issues/636
2021-02-03 18:28:50 -05:00
Ajay Ramachandran
318d00a9c4 Increase version number 2021-01-31 12:04:25 -05:00
Ajay Ramachandran
44571a67d9 Fix segments being deleted 2021-01-31 12:03:54 -05:00
Ajay Ramachandran
83955fc746 readme license fix 2021-01-30 15:01:43 -05:00
Ajay Ramachandran
647d46b7b4 license 2021-01-30 15:00:54 -05:00
Ajay Ramachandran
4f50ead08d Log returned data when video info failed to load 2021-01-27 22:27:23 -05:00
5 changed files with 16 additions and 6 deletions

View File

@@ -101,3 +101,8 @@ Icons made by:
* <a href="https://www.flaticon.com/authors/gregor-cresnar" title="Gregor Cresnar">Gregor Cresnar</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and are licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>
* <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and are licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>
* <a href="https://iconmonstr.com/about/#creator">Alexander Kahlkopf</a> from <a href="https://iconmonstr.com/">iconmonstr.com</a> and are licensed by <a href="https://iconmonstr.com/license/">iconmonstr License</a>
### License
This project is licensed under GNU GPL v3

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "2.0.12",
"version": "2.0.12.4",
"default_locale": "en",
"description": "__MSG_Description__",
"content_scripts": [{

View File

@@ -594,6 +594,9 @@
"adblockerIssue": {
"message": "It seems that something is blocking SponsorBlock's ability to get video data. This is probably your ad blocker. Please check https://github.com/ajayyy/SponsorBlock/wiki/Fix-Ad-Blocker-Blocking-SponsorBlock's-Requests"
},
"adblockerIssueUnlistedVideosInfo": {
"message": "If you are unable to resolve this, then disable the setting 'Ignore unlisted/private videos', as SponsorBlock is unable to retrieve the visibility information for this video"
},
"itCouldBeAdblockerIssue": {
"message": "If this keeps occuring, it could be caused by your ad blocker. Please check https://github.com/ajayyy/SponsorBlock/wiki/Fix-Ad-Blocker-Blocking-SponsorBlock's-Requests"
},

View File

@@ -250,7 +250,7 @@ const Config: SBObject = {
function encodeStoredItem<T>(data: T): T | UnencodedSegmentTimes {
// if data is SBMap convert to json for storing
if(!(data instanceof SBMap)) return data;
return Array.from(data.entries()).filter((element) => element[1] === []); // Remove empty entries
return Array.from(data.entries()).filter((element) => element[1].length > 0); // Remove empty entries
}
/**

View File

@@ -258,7 +258,7 @@ async function videoIDChange(id) {
try {
await utils.wait(() => !!videoInfo, 5000, 1);
} catch (err) {
alert(chrome.i18n.getMessage("adblockerIssue"));
alert(chrome.i18n.getMessage("adblockerIssue") + "\n\n" + chrome.i18n.getMessage("adblockerIssueUnlistedVideosInfo"));
}
if (isUnlisted()) {
@@ -647,12 +647,12 @@ async function sponsorsLookup(id: string) {
sponsorLookupRetries = 0;
} else if (response?.status === 404) {
retryFetch(id);
} else if (sponsorLookupRetries < 90 && !recheckStarted) {
} else if (sponsorLookupRetries < 15 && !recheckStarted) {
recheckStarted = true;
//TODO lower when server becomes better (back to 1 second)
//some error occurred, try again in a second
setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000);
setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000 + 5000 * sponsorLookupRetries);
sponsorLookupRetries++;
}
@@ -719,6 +719,7 @@ async function getVideoInfo(): Promise<void> {
const decodedData = decodeURIComponent(result.responseText).match(/player_response=([^&]*)/)[1];
if (!decodedData) {
console.error("[SB] Failed at getting video info from YouTube.");
console.error("[SB] Data returned from YouTube: " + result.responseText);
return;
}
@@ -1527,7 +1528,8 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string {
}
function addHotkeyListener(): boolean {
const videoRoot = document.getElementById("movie_player") as HTMLDivElement;
let videoRoot = document.getElementById("movie_player") as HTMLDivElement;
if (onInvidious) videoRoot = document.getElementById("player-container") as HTMLDivElement;
if (!videoRootsWithEventListeners.includes(videoRoot)) {
videoRoot.addEventListener("keydown", hotkeyListener);