Fix rar files, remove srt
This commit is contained in:
@@ -35,9 +35,11 @@ func GetTorrentFiles(data structs.RealDebridTorrentInfo) []TorrentFile {
|
||||
files := make([]TorrentFile, 0)
|
||||
for _, f := range data.Files {
|
||||
name := filepath.Base(f.Path)
|
||||
if (!common.RegexMatch(common.VIDEOMATCH, name) &&
|
||||
!common.RegexMatch(common.SUBMATCH, name) &&
|
||||
!common.RegexMatch(common.MUSICMATCH, name)) || common.RegexMatch(common.SAMPLEMATCH, name) {
|
||||
if common.RegexMatch(common.SAMPLEMATCH, name) {
|
||||
// Skip sample files
|
||||
continue
|
||||
}
|
||||
if !common.RegexMatch(common.VIDEOMATCH, name) && !common.RegexMatch(common.MUSICMATCH, name) {
|
||||
continue
|
||||
}
|
||||
fileId := f.ID
|
||||
|
||||
@@ -167,9 +167,11 @@ func (r *Torbox) GetTorrent(id string) (*Torrent, error) {
|
||||
files := make([]TorrentFile, 0)
|
||||
for _, f := range data.Files {
|
||||
fileName := filepath.Base(f.Name)
|
||||
if (!common.RegexMatch(common.VIDEOMATCH, fileName) &&
|
||||
!common.RegexMatch(common.SUBMATCH, fileName) &&
|
||||
!common.RegexMatch(common.MUSICMATCH, fileName)) || common.RegexMatch(common.SAMPLEMATCH, fileName) {
|
||||
if common.RegexMatch(common.SAMPLEMATCH, fileName) {
|
||||
// Skip sample files
|
||||
continue
|
||||
}
|
||||
if !common.RegexMatch(common.VIDEOMATCH, fileName) && !common.RegexMatch(common.MUSICMATCH, fileName) {
|
||||
continue
|
||||
}
|
||||
file := TorrentFile{
|
||||
|
||||
@@ -105,7 +105,7 @@ func (q *QBit) createSymLink(path string, torrentMountPath string, file debrid.T
|
||||
q.logger.Printf("Failed to create symlink: %s: %v\n", fullPath, err)
|
||||
}
|
||||
// Check if the file exists
|
||||
if !common.FileReady(fullPath) {
|
||||
q.logger.Printf("Symlink not ready: %s\n", fullPath)
|
||||
}
|
||||
//if !common.FileReady(fullPath) {
|
||||
// q.logger.Printf("Symlink not ready: %s\n", fullPath)
|
||||
//}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user