Compare commits

...

9 Commits
5.1.5 ... 5.1.7

Author SHA1 Message Date
Ajay Ramachandran
ec12c1d324 bump version 2022-11-22 17:29:46 -05:00
Ajay
4447ff3142 Fix issues with mutes ending when highlights start 2022-11-09 12:45:11 -05:00
Ajay
00ef3856ca Fix race condition causing full video label not to display 2022-11-08 13:50:56 -05:00
Ajay
cd7d74fb33 Fix category pill text on new YouTube layout 2022-11-08 13:38:19 -05:00
Ajay
ce3f77ed20 Better key moments check by not importing when no 0 second chapter 2022-11-07 21:15:04 -05:00
Ajay Ramachandran
d347f4e575 bump version 2022-11-06 13:19:56 -05:00
Ajay Ramachandran
1c5802a5e2 New Crowdin updates (#1574) 2022-11-06 13:19:35 -05:00
Ajay Ramachandran
4bc7ce7cd0 Merge pull request #1577 from caneleex/patch/outro-end-time
Don't overwrite endcards time upon submitting
2022-11-06 13:18:14 -05:00
caneleex
3c6989f67d Don't overwrite endcards time upon submitting 2022-11-06 19:15:59 +01:00
10 changed files with 82 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "5.1.5",
"version": "5.1.7",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",

View File

@@ -116,6 +116,9 @@
"connectionError": {
"message": "একটি সংযোগ ত্রুটি ঘটেছে. ভুল সংকেত: "
},
"segmentsStillLoading": {
"message": "সেগমেন্ট এখনো লোড হচ্ছে..."
},
"clearTimes": {
"message": "বিভাগগুলি পরিষ্কার করুন"
},
@@ -842,6 +845,12 @@
"hideForever": {
"message": "চিরকালের জন্য এই বিষয়বস্তু লুকান"
},
"questionButton": {
"message": "আমার একটি প্রশ্ন আছে"
},
"warningConfirmButton": {
"message": "আমি কারণ বুঝেছি"
},
"Donate": {
"message": "অনুদান"
},
@@ -914,6 +923,9 @@
"LearnMore": {
"message": "আরও জানুন"
},
"FullDetails": {
"message": "সম্পূর্ণ বিস্তারিত"
},
"CopyDownvoteButtonInfo": {
"message": "ডাউনভোট করে আপনার জন্য পুনরায় জমা দেওয়ার জন্য একটি স্থানীয় অনুলিপি তৈরি করে"
},
@@ -938,6 +950,12 @@
"hideSegment": {
"message": "অংশ আড়াল করুন"
},
"skipSegment": {
"message": "সেগমেন্ট এড়িয়ে যান"
},
"playChapter": {
"message": "অধ্যায় চালু করুন"
},
"SponsorTimeEditScrollNewFeature": {
"message": "দ্রুত সময়টি পরিবর্কতন করতে সম্পাদনা বাক্সে ঘুরে দেখার সময় আপনার মাউস এর হুইয়িলটি ব্যবহার করুন। কন্ট্রল বা শিফট কী এর সংমিশ্রণগুলি পরিবর্তনগুলি আরো নিখুতভাবে টিউন করতে ব্যবহার করা যেতে পারে।"
},
@@ -994,5 +1012,33 @@
},
"openOptionsPage": {
"message": "বিকল্প পাতা খুলুন"
},
"resetToDefault": {
"message": "সেটিংস ডিফল্টে ফিরিয়ে নিন"
},
"exportSegments": {
"message": "সেগমেন্ট রপ্তানি করুন"
},
"importSegments": {
"message": "সেগমেন্ট আমদানী করুন"
},
"Import": {
"message": "আমদানী",
"description": "Button to initiate importing segments. Appears under the textbox where they paste in the data"
},
"chooseACountry": {
"message": "দেশ নির্বাচন করুন"
},
"videosSingular": {
"message": "ভিডিও",
"description": "Example: You currently have 3 unsubmitted segments on 1 *video*"
},
"videosPlural": {
"message": "ভিডিওগুলি",
"description": "Example: You currently have 12 unsubmitted segments on 5 *videos*"
},
"clearUnsubmittedSegments": {
"message": "সকল সেগমেন্ট পরিস্কার করুন",
"description": "Label for a button in settings"
}
}

View File

@@ -116,6 +116,9 @@
"connectionError": {
"message": "Ein Verbindungsfehler ist aufgetreten. Fehlermeldung: "
},
"segmentsStillLoading": {
"message": "Segmente werden noch geladen..."
},
"clearTimes": {
"message": "Alle Segmente löschen"
},
@@ -1243,5 +1246,8 @@
},
"exportSegmentsAsURL": {
"message": "Als URL teilen"
},
"segmentFetchFailureWarning": {
"message": "Warnung: Der Server hat noch nicht mit Segmenten geantwortet. Möglicherweise gibt es bereits Segmente zu diesem Video, aber du hast sie aufgrund von Problemen mit dem Server noch nicht erhalten."
}
}

View File

@@ -1197,7 +1197,7 @@
"description": "Example: You currently have 12 unsubmitted segments on 5 videos"
},
"unsubmittedSegmentCountsZero": {
"message": "Actualmente no tiene segmentos no enviados",
"message": "Actualmente no tiene segmentos sin enviar",
"description": "Replaces 'unsubmittedSegmentCounts' string when there are no unsubmitted segments"
},
"unsubmittedSegmentsSingular": {

View File

@@ -153,7 +153,7 @@
"message": "提案数"
},
"savedPeopleFrom": {
"message": "みんなの時間をこれだけ節約しました: "
"message": "あなたが節約したみんなの時間: "
},
"viewLeaderboard": {
"message": "リーダーボード"
@@ -1246,5 +1246,8 @@
},
"exportSegmentsAsURL": {
"message": "URLとして共有"
},
"segmentFetchFailureWarning": {
"message": "警告: サーバーがまだセグメントで応答していません。この動画に対するセグメントはすでに提出されているものの、サーバーの問題によりそれが受信できていないだけという可能性があります。"
}
}

View File

@@ -140,16 +140,17 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
}
private openTooltip(): void {
const tooltipMount = document.querySelector("ytd-video-primary-info-renderer > #container") as HTMLElement;
const tooltipMount = document.querySelector("#above-the-fold") as HTMLElement;
if (tooltipMount) {
this.tooltip = new Tooltip({
text: this.getTitleText(),
referenceNode: tooltipMount,
bottomOffset: "70px",
bottomOffset: "0px",
opacity: 0.95,
displayTriangle: false,
showLogo: false,
showGotIt: false
showGotIt: false,
prependElement: tooltipMount.firstElementChild as HTMLElement
});
}
}

View File

@@ -595,7 +595,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
this.props.contentContainer().updateEditButtonsOnPlayer();
}
}
} else if (this.state.sponsorTimeEdits[1] === null && category === "outro") {
} else if (this.state.sponsorTimeEdits[1] === null && category === "outro" && !sponsorTimesSubmitting[this.props.index].segment[1]) {
sponsorTimesSubmitting[this.props.index].segment[1] = this.props.contentContainer().v.duration;
this.props.contentContainer().updateEditButtonsOnPlayer();
}

View File

@@ -1567,6 +1567,13 @@ function getStartTimes(sponsorTimes: SponsorTime[], includeIntersectingSegments:
const includedTimes: ScheduledTime[] = [];
const scheduledTimes: number[] = [];
const shouldIncludeTime = (segment: ScheduledTime ) => (minimum === undefined
|| ((includeNonIntersectingSegments && segment.scheduledTime >= minimum)
|| (includeIntersectingSegments && segment.scheduledTime < minimum && segment.segment[1] > minimum)))
&& (!hideHiddenSponsors || segment.hidden === SponsorHideType.Visible)
&& segment.segment.length === 2
&& segment.actionType !== ActionType.Poi;
const possibleTimes = sponsorTimes.map((sponsorTime) => ({
...sponsorTime,
scheduledTime: sponsorTime.segment[0]
@@ -1574,7 +1581,7 @@ function getStartTimes(sponsorTimes: SponsorTime[], includeIntersectingSegments:
// Schedule at the end time to know when to unmute and remove title from seek bar
sponsorTimes.forEach(sponsorTime => {
if (!possibleTimes.some((time) => sponsorTime.segment[1] === time.scheduledTime)
if (!possibleTimes.some((time) => sponsorTime.segment[1] === time.scheduledTime && shouldIncludeTime(time))
&& (minimum === undefined || sponsorTime.segment[1] > minimum)) {
possibleTimes.push({
...sponsorTime,
@@ -1584,13 +1591,7 @@ function getStartTimes(sponsorTimes: SponsorTime[], includeIntersectingSegments:
});
for (let i = 0; i < possibleTimes.length; i++) {
if ((minimum === undefined
|| ((includeNonIntersectingSegments && possibleTimes[i].scheduledTime >= minimum)
|| (includeIntersectingSegments && possibleTimes[i].scheduledTime < minimum && possibleTimes[i].segment[1] > minimum)))
&& (!hideHiddenSponsors || possibleTimes[i].hidden === SponsorHideType.Visible)
&& possibleTimes[i].segment.length === 2
&& possibleTimes[i].actionType !== ActionType.Poi) {
if (shouldIncludeTime(possibleTimes[i])) {
scheduledTimes.push(possibleTimes[i].scheduledTime);
includedTimes.push(possibleTimes[i]);
}

View File

@@ -43,8 +43,10 @@ export class CategoryPill {
this.root.render(<CategoryPillComponent ref={this.ref} vote={vote} />);
if (this.unsavedState) {
this.ref.current?.setState(this.unsavedState);
this.unsavedState = null;
GenericUtils.wait(() => this.ref.current).then(() => {
this.ref.current?.setState(this.unsavedState);
this.unsavedState = null;
});
}
if (onMobileYouTube) {

View File

@@ -71,8 +71,7 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
const chapters: SponsorTime[] = [];
// .ytp-timed-markers-container indicates that key-moments are present, which should not be divided
if (chaptersBox && !(getControls()?.parentElement?.parentElement
?.querySelector(".ytp-timed-markers-container")?.childElementCount > 0)) {
if (chaptersBox) {
let lastSegment: SponsorTime = null;
const links = chaptersBox.querySelectorAll("ytd-macro-markers-list-item-renderer > a");
for (const link of links) {
@@ -104,6 +103,11 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
}
}
if (chapters[0] && chapters[0].segment[0] !== 0) {
// This is key moments instead of chapters, don't import as they are not full sections
return [];
}
return chapters;
}