- Fix symlinks % bug

- A cleaner settings page
- More bug fixes
This commit is contained in:
Mukhtar Akere
2025-04-25 12:36:12 +01:00
parent 267430e6fb
commit 07f1d0f28d
22 changed files with 1351 additions and 1140 deletions

View File

@@ -177,16 +177,17 @@ func (q *QBit) createSymlinksWebdav(debridTorrent *debrid.Torrent, rclonePath, t
// Check which files exist in this batch
for _, entry := range entries {
if file, exists := remainingFiles[entry.Name()]; exists {
fullFilePath := filepath.Join(rclonePath, file.Name)
filename := entry.Name()
if file, exists := remainingFiles[filename]; exists {
fullFilePath := filepath.Join(rclonePath, filename)
fileSymlinkPath := filepath.Join(symlinkPath, file.Name)
if err := os.Symlink(fullFilePath, fileSymlinkPath); err != nil && !os.IsExist(err) {
q.logger.Debug().Msgf("Failed to create symlink: %s: %v", fileSymlinkPath, err)
} else {
q.logger.Info().Msgf("File is ready: %s", file.Name)
filePaths = append(filePaths, fileSymlinkPath)
delete(remainingFiles, file.Name)
delete(remainingFiles, filename)
q.logger.Info().Msgf("File is ready: %s", file.Name)
}
}
}