Fix rar files, remove srt

This commit is contained in:
Mukhtar Akere
2024-12-27 22:30:36 +01:00
parent e9d3e120f3
commit eeb3a31b05
3 changed files with 13 additions and 9 deletions

View File

@@ -35,9 +35,11 @@ func GetTorrentFiles(data structs.RealDebridTorrentInfo) []TorrentFile {
files := make([]TorrentFile, 0) files := make([]TorrentFile, 0)
for _, f := range data.Files { for _, f := range data.Files {
name := filepath.Base(f.Path) name := filepath.Base(f.Path)
if (!common.RegexMatch(common.VIDEOMATCH, name) && if common.RegexMatch(common.SAMPLEMATCH, name) {
!common.RegexMatch(common.SUBMATCH, name) && // Skip sample files
!common.RegexMatch(common.MUSICMATCH, name)) || common.RegexMatch(common.SAMPLEMATCH, name) { continue
}
if !common.RegexMatch(common.VIDEOMATCH, name) && !common.RegexMatch(common.MUSICMATCH, name) {
continue continue
} }
fileId := f.ID fileId := f.ID

View File

@@ -167,9 +167,11 @@ func (r *Torbox) GetTorrent(id string) (*Torrent, error) {
files := make([]TorrentFile, 0) files := make([]TorrentFile, 0)
for _, f := range data.Files { for _, f := range data.Files {
fileName := filepath.Base(f.Name) fileName := filepath.Base(f.Name)
if (!common.RegexMatch(common.VIDEOMATCH, fileName) && if common.RegexMatch(common.SAMPLEMATCH, fileName) {
!common.RegexMatch(common.SUBMATCH, fileName) && // Skip sample files
!common.RegexMatch(common.MUSICMATCH, fileName)) || common.RegexMatch(common.SAMPLEMATCH, fileName) { continue
}
if !common.RegexMatch(common.VIDEOMATCH, fileName) && !common.RegexMatch(common.MUSICMATCH, fileName) {
continue continue
} }
file := TorrentFile{ file := TorrentFile{

View File

@@ -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) q.logger.Printf("Failed to create symlink: %s: %v\n", fullPath, err)
} }
// Check if the file exists // Check if the file exists
if !common.FileReady(fullPath) { //if !common.FileReady(fullPath) {
q.logger.Printf("Symlink not ready: %s\n", fullPath) // q.logger.Printf("Symlink not ready: %s\n", fullPath)
} //}
} }