fix: accept user-specific playlist ids (LL, WL)
This commit is contained in:
parent
cf498e4a8f
commit
97c3f30d18
3 changed files with 5 additions and 2 deletions
|
|
@ -71,8 +71,9 @@ pub fn channel_id<S: AsRef<str>>(channel_id: S) -> Result<(), Error> {
|
|||
/// assert!(validate::playlist_id("Abcd").is_err());
|
||||
/// ```
|
||||
pub fn playlist_id<S: AsRef<str>>(playlist_id: S) -> Result<(), Error> {
|
||||
let id = playlist_id.as_ref();
|
||||
check(
|
||||
util::PLAYLIST_ID_REGEX.is_match(playlist_id.as_ref()),
|
||||
util::PLAYLIST_ID_REGEX.is_match(id) || util::USER_PLAYLIST_IDS.contains(&id),
|
||||
"invalid playlist id",
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue