Fix: parse ss path and vendor movie dont check scheme

pull/31/head
zijiren233 1 year ago
parent fe2826944d
commit d7f52304a8

@ -94,7 +94,7 @@ func (m *BaseMovie) Validate() error {
return errors.New("unsupported scheme")
}
case !m.Live && !m.Proxy, m.Live && !m.Proxy && !m.RtmpSource:
if m.VendorInfo.Vendor != "" {
if m.VendorInfo.Vendor == "" {
u, err := url.Parse(m.Url)
if err != nil {
return err

@ -10,8 +10,8 @@ import (
var (
BVRegex = regexp.MustCompile(`^(?:https://www\.bilibili\.com/video/)?((?:bv|bV|Bv|BV)\w+)(?:[/\?].*)?$`)
ARegex = regexp.MustCompile(`^(?:https://www\.bilibili\.com/video/)?(?:av|aV|Av|AV)(\d+)(?:[/\?].*)?$`)
SSRegex = regexp.MustCompile(`^(?:https://www\.bilibili\.com/bangumi/play/)?(?:ss|sS|Ss|SS)(\d+)(?:\?.*)?$`)
EPRegex = regexp.MustCompile(`^(?:https://www\.bilibili\.com/bangumi/play/)?(?:ep|eP|Ep|EP)(\d+)(?:\?.*)?$`)
SSRegex = regexp.MustCompile(`^(?:https://www\.bilibili\.com/bangumi/play/)?(?:ss|sS|Ss|SS)(\d+)(?:[/\?].*)?$`)
EPRegex = regexp.MustCompile(`^(?:https://www\.bilibili\.com/bangumi/play/)?(?:ep|eP|Ep|EP)(\d+)(?:[/\?].*)?$`)
B23Regex = regexp.MustCompile(`^(https://)?b23\.tv/(\w+)$`)
)

Loading…
Cancel
Save