mirror of
https://github.com/TeamPiped/sponsorblock-mirror.git
synced 2024-12-12 21:30: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,
|
||||
) -> content::RawJson<String> {
|
||||
|
||||
if videoID.is_empty() {
|
||||
return content::RawJson("videoID is missing".to_string());
|
||||
// Check if ID matches ID regex
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user