forked from recloudstream/cloudstream
		
	soled append problem and small text fix
This commit is contained in:
		
							parent
							
								
									3e2836f462
								
							
						
					
					
						commit
						208747492f
					
				
					 2 changed files with 8 additions and 7 deletions
				
			
		|  | @ -105,7 +105,7 @@ class SearchFragment : Fragment() { | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 builder.setTitle("Search Providers") |                 builder.setTitle("Search Providers") | ||||||
|                 builder.setNegativeButton("Cancel") { _, _ -> } |                 builder.setNegativeButton("Ok") { _, _ -> } | ||||||
|                 builder.show() |                 builder.show() | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -448,7 +448,11 @@ object VideoDownloadManager { | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             val newFileUri = if (resume && currentExistingFile != null) currentExistingFile else { |             var appendFile = false | ||||||
|  |             val newFileUri = if (resume && currentExistingFile != null) { | ||||||
|  |                 appendFile = true | ||||||
|  |                 currentExistingFile | ||||||
|  |             } else { | ||||||
|                 val contentUri = |                 val contentUri = | ||||||
|                     MediaStore.Downloads.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) // USE INSTEAD OF MediaStore.Downloads.EXTERNAL_CONTENT_URI |                     MediaStore.Downloads.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) // USE INSTEAD OF MediaStore.Downloads.EXTERNAL_CONTENT_URI | ||||||
| 
 | 
 | ||||||
|  | @ -456,10 +460,7 @@ object VideoDownloadManager { | ||||||
|                     put(MediaStore.MediaColumns.DISPLAY_NAME, displayName) |                     put(MediaStore.MediaColumns.DISPLAY_NAME, displayName) | ||||||
|                     put(MediaStore.MediaColumns.TITLE, name) |                     put(MediaStore.MediaColumns.TITLE, name) | ||||||
|                     put(MediaStore.MediaColumns.MIME_TYPE, "video/mp4") |                     put(MediaStore.MediaColumns.MIME_TYPE, "video/mp4") | ||||||
|                     put( |                     put(MediaStore.MediaColumns.RELATIVE_PATH, relativePath) | ||||||
|                         MediaStore.MediaColumns.RELATIVE_PATH, |  | ||||||
|                         relativePath |  | ||||||
|                     ) |  | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 cr.insert( |                 cr.insert( | ||||||
|  | @ -468,7 +469,7 @@ object VideoDownloadManager { | ||||||
|                 ) ?: return ERROR_MEDIA_STORE_URI_CANT_BE_CREATED |                 ) ?: return ERROR_MEDIA_STORE_URI_CANT_BE_CREATED | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             fileStream = cr.openOutputStream(newFileUri, "w") |             fileStream = cr.openOutputStream(newFileUri, "w" + (if (appendFile) "a" else "")) | ||||||
|                 ?: return ERROR_CONTENT_RESOLVER_CANT_OPEN_STREAM |                 ?: return ERROR_CONTENT_RESOLVER_CANT_OPEN_STREAM | ||||||
|         } else { |         } else { | ||||||
|             // NORMAL NON SCOPED STORAGE FILE CREATION |             // NORMAL NON SCOPED STORAGE FILE CREATION | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue