mirror of
				https://github.com/recloudstream/cloudstream.git
				synced 2024-08-15 01:53:11 +00:00 
			
		
		
		
	Fix duration regex, returning null on first checker (#218)
This commit is contained in:
		
							parent
							
								
									a8f3d18c2e
								
							
						
					
					
						commit
						9bca7a0780
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -1143,9 +1143,9 @@ fun getDurationFromString(input: String?): Int? { | |||
|         if (values.size == 3) { | ||||
|             val hours = values[1].toIntOrNull() | ||||
|             val minutes = values[2].toIntOrNull() | ||||
|             return if (minutes != null && hours != null) { | ||||
|                 hours * 60 + minutes | ||||
|             } else null | ||||
|             if (minutes != null && hours != null) { | ||||
|                 return hours * 60 + minutes | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     Regex("([0-9]*)m").find(cleanInput)?.groupValues?.let { values -> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue