初始提交:短剧库源码(含转码优化 ultrafast)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package app
|
||||
|
||||
import "strings"
|
||||
|
||||
func playbackHistoryIdentity(id string) (string, string, bool) {
|
||||
id = strings.TrimSpace(id)
|
||||
if id == "" || len(id) > 512 || strings.ContainsAny(id, "\x00\r\n\t /\\?#") {
|
||||
return "", "", false
|
||||
}
|
||||
if source, sourceID, ok := splitProviderDramaID(id); ok {
|
||||
return providerDramaID(source, sourceID), source, true
|
||||
}
|
||||
if !strings.Contains(id, ":") {
|
||||
return id, "cloudfront", true
|
||||
}
|
||||
return "", "", false
|
||||
}
|
||||
Reference in New Issue
Block a user