Browse Source

GoogleDrive: fix the downloading progress bar that does not showing

Pierre SAGASPE 5 years ago
parent
commit
401b6d6826
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Sources/VLCGoogleDriveController.m

+ 1 - 1
Sources/VLCGoogleDriveController.m

@@ -315,7 +315,7 @@
                 self->_lastStatsUpdate = [NSDate timeIntervalSinceReferenceDate];
                 self->_lastStatsUpdate = [NSDate timeIntervalSinceReferenceDate];
             }
             }
 
 
-            CGFloat progress = (CGFloat)weakFetcher.downloadedLength / (CGFloat)[file.size unsignedLongValue];
+            CGFloat progress = (CGFloat)totalBytesWritten / (CGFloat)[file.size unsignedLongValue];
             if ([self.delegate respondsToSelector:@selector(currentProgressInformation:)])
             if ([self.delegate respondsToSelector:@selector(currentProgressInformation:)])
                 [self.delegate currentProgressInformation:progress];
                 [self.delegate currentProgressInformation:progress];
         };
         };