mirror of
https://github.com/TeamPiped/sponsorblock-mirror.git
synced 2024-08-14 23:57:05 +00:00
Actually use the videoID regex
This commit is contained in:
parent
bfc215e492
commit
29d1d12dab
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue