✨ Get video title from file name
This commit is contained in:
1 parent
44b2c5ebf3
commit
fc1769e8f7
3 files changed
+11
-1
No files matched your search
@@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -43,3 +44,9 @@ func RandomStage() string {
|
||||
state := base64.URLEncoding.EncodeToString(b)
|
||||
return state
|
||||
}
|
||||
|
||||
func GetFileName(file string) string {
|
||||
base := filepath.Base(file)
|
||||
fileName := base[:len(base)-len(filepath.Ext(base))]
|
||||
return fileName
|
||||
}
|
||||
Reference in new issue
Block a user