mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
YT: do not try to get info again for current download
This commit is contained in:
@@ -893,9 +893,14 @@ class ClapperWidget extends Gtk.Grid
|
|||||||
if(!this.player.ytClient)
|
if(!this.player.ytClient)
|
||||||
this.player.ytClient = new YouTube.YouTubeClient();
|
this.player.ytClient = new YouTube.YouTubeClient();
|
||||||
|
|
||||||
|
const { ytClient } = this.player;
|
||||||
|
|
||||||
/* Speed up things by prefetching new video info before drop */
|
/* Speed up things by prefetching new video info before drop */
|
||||||
if(!this.player.ytClient.compareLastVideoId(videoId))
|
if(
|
||||||
this.player.ytClient.getVideoInfoPromise(videoId).catch(debug);
|
!ytClient.compareLastVideoId(videoId)
|
||||||
|
&& ytClient.downloadingVideoId !== videoId
|
||||||
|
)
|
||||||
|
ytClient.getVideoInfoPromise(videoId).catch(debug);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDataDrop(dropTarget, value, x, y)
|
_onDataDrop(dropTarget, value, x, y)
|
||||||
|
Reference in New Issue
Block a user