Skip to content

Commit c449a90

Browse files
committed
Fix regression with cache reloading after download
Make sure we reload new media after new YouTube download
1 parent 5b772c6 commit c449a90

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

data/download.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,12 @@ func (d *Download) DownloadYoutube() {
145145
d.mut.Lock()
146146
d.Completed = true
147147
d.Success = true
148-
d.mut.Unlock()
149148

149+
Downloads.downloadsMutex.Lock()
150+
Downloads.loadFile(d.Elem.Path, false)
151+
Downloads.downloadsMutex.Unlock()
152+
153+
d.mut.Unlock()
150154

151155
close(d.Stop)
152156
return

0 commit comments

Comments
 (0)