Refactor file type functions
This commit is contained in:
@@ -2,7 +2,6 @@ package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -138,8 +137,3 @@ type PlaylistTrackRepository interface {
|
||||
DeleteAll() error
|
||||
Reorder(pos int, newPos int) error
|
||||
}
|
||||
|
||||
func IsValidPlaylist(filePath string) bool {
|
||||
extension := strings.ToLower(filepath.Ext(filePath))
|
||||
return extension == ".m3u" || extension == ".m3u8" || extension == ".nsp"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user