mirror of
https://github.com/TeamPiped/sponsorblock-mirror.git
synced 2024-12-14 14:20:36 +05:30
Actually use the videoID regex
This commit is contained in:
parent
bfc215e492
commit
29d1d12dab
@ -77,8 +77,9 @@ pub async fn skip_segments_by_id(
|
|||||||
db: Db,
|
db: Db,
|
||||||
) -> content::RawJson<String> {
|
) -> content::RawJson<String> {
|
||||||
|
|
||||||
if videoID.is_empty() {
|
// Check if ID matches ID regex
|
||||||
return content::RawJson("videoID is missing".to_string());
|
if !ID_RE.is_match(&videoID) {
|
||||||
|
return content::RawJson("videoID does not match format requirements".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
let sponsors = find_skip_segments(VideoName::ByID(videoID.clone()), categories, db).await;
|
let sponsors = find_skip_segments(VideoName::ByID(videoID.clone()), categories, db).await;
|
||||||
|
Loading…
Reference in New Issue
Block a user