Skip to content

Commit

Permalink
feat(youtube/sponsorblock): skip to video highlight (ReVanced#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios authored and oSumAtrIX committed Apr 21, 2023
1 parent fbb1763 commit 83747b7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/main/resources/sponsorblock/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<string name="sb_segments_selfpromo_sum">Similar to \'Sponsor\' except for unpaid or self promotion. Includes sections about merchandise, donations, or information about who they collaborated with</string>
<string name="sb_segments_interaction">Interaction Reminder (Subscribe)</string>
<string name="sb_segments_interaction_sum">A short reminder to like, subscribe or follow them in the middle of content. If it is long or about something specific, it should instead be under self promotion</string>
<string name="sb_segments_highlight">Highlight</string>
<string name="sb_segments_highlight_sum">The part of the video that most people are looking for</string>
<string name="sb_segments_intro">Intermission/Intro Animation</string>
<string name="sb_segments_intro_sum">An interval without actual content. Could be a pause, static frame, or repeating animation. Does not include transitions containing information</string>
<string name="sb_segments_outro">Endcards/Credits</string>
Expand All @@ -56,9 +58,11 @@
<string name="sb_segments_nomusic_sum">Only for use in music videos. Sections of music videos without music, that aren\'t already covered by another category</string>

<string name="sb_skip_button_compact">Skip</string>
<string name="sb_skip_button_compact_highlight">Highlight</string>
<string name="sb_skip_button_sponsor">Skip sponsor</string>
<string name="sb_skip_button_selfpromo">Skip promo</string>
<string name="sb_skip_button_interaction">Skip interact</string>
<string name="sb_skip_button_highlight">Skip to highlight</string>
<string name="sb_skip_button_intro_beginning">Skip intro</string>
<string name="sb_skip_button_intro_middle">Skip intermission</string>
<string name="sb_skip_button_intro_end">Skip intermission</string>
Expand All @@ -73,6 +77,7 @@
<string name="sb_skipped_sponsor">Skipped sponsor</string>
<string name="sb_skipped_selfpromo">Skipped self promotion</string>
<string name="sb_skipped_interaction">Skipped annoying reminder</string>
<string name="sb_skipped_highlight">Skipped to highlight</string>
<string name="sb_skipped_intro_beginning">Skipped intro</string>
<string name="sb_skipped_intro_middle">Skipped intermission</string>
<string name="sb_skipped_intro_end">Skipped intermission</string>
Expand Down Expand Up @@ -119,14 +124,15 @@
<string name="sb_new_segment_choose_category">Choose the segment category</string>
<string name="sb_new_segment_disabled_category">Category is disabled in settings. Enable category to submit.</string>
<string name="sb_new_segment_title">New SponsorBlock segment</string>
<string name="sb_new_segment_mark_time_as_question" formatted="false">Set %02d:%02d:%04d as the start or end of a new segment?</string>
<string name="sb_new_segment_mark_time_as_question" formatted="false">Set %02d:%02d:%03d as the start or end of a new segment?</string>
<string name="sb_new_segment_mark_start">start</string>
<string name="sb_new_segment_mark_end">end</string>
<string name="sb_new_segment_now">now</string>
<string name="sb_new_segment_time_start">Time the segment begins at</string>
<string name="sb_new_segment_time_end">Time the segment ends at</string>
<string name="sb_new_segment_confirm_title">Are the times correct?</string>
<string name="sb_new_segment_confirm_content" formatted="false">The segment lasts from %02d:%02d to %02d:%02d (%d minutes %02d seconds)\nIs it ready to submit?</string>
<string name="sb_new_segment_start_is_before_end">Start must be before the end</string>
<string name="sb_new_segment_mark_locations_first">Mark two locations on the time bar first</string>
<string name="sb_new_segment_preview_segment_first">Preview the segment, and ensure it skips smoothly</string>
<string name="sb_new_segment_edit_by_hand_title">Edit timing of segment manually</string>
Expand Down
18 changes: 15 additions & 3 deletions src/main/resources/sponsorblock/layout/inline_sponsor_overlay.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<app.revanced.integrations.sponsorblock.ui.NewSegmentLayout
android:id="@+id/sb_new_segment_view"
<app.revanced.integrations.sponsorblock.ui.SkipSponsorButton
android:id="@+id/sb_skip_highlight_button"
android:contentDescription="@string/sb_skip_button_compact_highlight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/brand_interaction_default_bottom_margin"
android:layout_marginBottom="@dimen/inline_controls_bottom_bar_height"
android:focusable="true"
android:visibility="gone" />

<app.revanced.integrations.sponsorblock.ui.SkipSponsorButton
android:id="@+id/sb_skip_sponsor_button"
android:contentDescription="@string/sb_skip_button_compact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/inline_controls_bottom_bar_height"
android:focusable="true"
android:visibility="gone" />

<app.revanced.integrations.sponsorblock.ui.NewSegmentLayout
android:id="@+id/sb_new_segment_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/brand_interaction_default_bottom_margin"
android:focusable="true"
android:visibility="gone" />
</merge>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
android:layout_width="wrap_content"
android:layout_height="32dp"
android:layout_gravity="center_vertical"
android:contentDescription="@string/sb_skip_button_compact"
android:orientation="horizontal"
android:padding="8dp">

Expand Down

0 comments on commit 83747b7

Please sign in to comment.