mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add a fast path for original quality
This commit is contained in:
parent
2551d5071b
commit
750f9da9e8
@ -29,6 +29,13 @@ func NewDownloader() *Downloader {
|
||||
}
|
||||
|
||||
func (d *Downloader) GetOffline(path string, quality Quality) (<-chan struct{}, string, error) {
|
||||
if quality == Original {
|
||||
// no need to do anything for original quality
|
||||
done := make(chan struct{})
|
||||
close(done)
|
||||
return done, path, nil
|
||||
}
|
||||
|
||||
key := Key{path, quality}
|
||||
d.lock.Lock()
|
||||
defer d.lock.Unlock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user