mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-04 22:24:14 -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) {
|
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}
|
key := Key{path, quality}
|
||||||
d.lock.Lock()
|
d.lock.Lock()
|
||||||
defer d.lock.Unlock()
|
defer d.lock.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user