mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +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)
|
||||
this.player.ytClient = new YouTube.YouTubeClient();
|
||||
|
||||
const { ytClient } = this.player;
|
||||
|
||||
/* Speed up things by prefetching new video info before drop */
|
||||
if(!this.player.ytClient.compareLastVideoId(videoId))
|
||||
this.player.ytClient.getVideoInfoPromise(videoId).catch(debug);
|
||||
if(
|
||||
!ytClient.compareLastVideoId(videoId)
|
||||
&& ytClient.downloadingVideoId !== videoId
|
||||
)
|
||||
ytClient.getVideoInfoPromise(videoId).catch(debug);
|
||||
}
|
||||
|
||||
_onDataDrop(dropTarget, value, x, y)
|
||||
|
Reference in New Issue
Block a user