mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	commit
* rebase fixup, add null check * better ETA string * drop connection read timeout, for HSDPA networks * bump NPE version
This commit is contained in:
		| @@ -780,7 +780,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck | ||||
|  | ||||
|                 if (selectedStream.getFormat() == MediaFormat.M4A) { | ||||
|                     psName = Postprocessing.ALGORITHM_M4A_NO_DASH; | ||||
|                 } else if (selectedStream.getFormat() == MediaFormat.OPUS) { | ||||
|                 } else if (selectedStream.getFormat() == MediaFormat.WEBMA_OPUS) { | ||||
|                     psName = Postprocessing.ALGORITHM_OGG_FROM_WEBM_DEMUXER; | ||||
|                 } | ||||
|                 break; | ||||
|   | ||||
| @@ -228,7 +228,6 @@ public class DownloadMission extends Mission { | ||||
|  | ||||
|         // BUG workaround: switching between networks can freeze the download forever | ||||
|         conn.setConnectTimeout(30000); | ||||
|         conn.setReadTimeout(10000); | ||||
|  | ||||
|         if (rangeStart >= 0) { | ||||
|             String req = "bytes=" + rangeStart + "-"; | ||||
| @@ -316,7 +315,7 @@ public class DownloadMission extends Mission { | ||||
|     public synchronized void notifyError(int code, Exception err) { | ||||
|         Log.e(TAG, "notifyError() code = " + code, err); | ||||
|         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | ||||
|             if (err.getCause() instanceof ErrnoException) { | ||||
|             if (err != null && err.getCause() instanceof ErrnoException) { | ||||
|                 int errno = ((ErrnoException) err.getCause()).errno; | ||||
|                 if (errno == OsConstants.ENOSPC) { | ||||
|                     code = ERROR_INSUFFICIENT_STORAGE; | ||||
|   | ||||
| @@ -308,10 +308,10 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb | ||||
|                 etaStr = ""; | ||||
|             } else { | ||||
|                 long eta = (long) Math.ceil((length - done) / averageSpeed); | ||||
|                 etaStr = "  @ ".concat(Utility.stringifySeconds(eta)); | ||||
|                 etaStr = Utility.formatBytes((long) done) + "/" + Utility.stringifySeconds(eta) + "  "; | ||||
|             } | ||||
|  | ||||
|             h.size.setText(sizeStr.concat(speedStr).concat(etaStr)); | ||||
|             h.size.setText(sizeStr.concat(etaStr).concat(speedStr)); | ||||
|  | ||||
|             h.lastTimestamp = now; | ||||
|             h.lastDone = done; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 kapodamy
					kapodamy