opt: sponsor block

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-12 14:16:54 +08:00
parent 60bdf07684
commit 81c88451bf
5 changed files with 99 additions and 14 deletions

View File

@@ -58,7 +58,7 @@ extension SegmentTypeExt on SegmentType {
'订阅提醒', //interaction
'开场', //intro
'片尾', //outro
'回顾', //preview
'预览', //preview
'非音乐', //music_offtopic
'精彩时刻', //poi_highlight
'闲聊', //filler
@@ -604,6 +604,12 @@ class VideoDetailController extends GetxController
if (GStorage.blockToast) {
_showBlockToast('已跳过${item.segmentType.shortTitle}片段');
}
if (GStorage.blockTrack) {
Request().post(
'${GStorage.blockServer}/api/viewedVideoSponsorTime',
queryParameters: {'UUID': item.UUID},
);
}
} catch (e) {
debugPrint('failed to skip: $e');
_showBlockToast('${item.segmentType.shortTitle}片段跳过失败');