Fix Added bug in torrent

This commit is contained in:
Mukhtar Akere
2025-08-28 03:26:43 +01:00
parent d76ca032ab
commit aff12c2e4b
4 changed files with 7 additions and 3 deletions

View File

@@ -372,6 +372,7 @@ func (r *RealDebrid) addTorrent(t *types.Torrent) (*types.Torrent, error) {
t.Id = data.Id
t.Debrid = r.name
t.MountPath = r.MountPath
t.Added = time.Now().Format(time.RFC3339)
return t, nil
}
@@ -407,6 +408,7 @@ func (r *RealDebrid) addMagnet(t *types.Torrent) (*types.Torrent, error) {
t.Id = data.Id
t.Debrid = r.name
t.MountPath = r.MountPath
t.Added = time.Now().Format(time.RFC3339)
return t, nil
}
@@ -488,7 +490,6 @@ func (r *RealDebrid) UpdateTorrent(t *types.Torrent) error {
t.Links = data.Links
t.MountPath = r.MountPath
t.Debrid = r.name
t.Added = data.Added
t.Files, _ = r.getSelectedFiles(t, data) // Get selected files
return nil
@@ -520,6 +521,7 @@ func (r *RealDebrid) CheckStatus(t *types.Torrent) (*types.Torrent, error) {
t.Status = status
t.Debrid = r.name
t.MountPath = r.MountPath
t.Added = data.Added
if status == "waiting_files_selection" {
t.Files = r.getTorrentFiles(t, data)
if len(t.Files) == 0 {