mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 05:23:28 +01:00 
			
		
		
		
	Bugfix in automatic source selection for URL input
This commit is contained in:
		| @@ -734,11 +734,15 @@ class SourceProvider { | ||||
|     } | ||||
|     AppSource? source; | ||||
|     for (var s in sources.where((element) => element.hosts.isNotEmpty)) { | ||||
|       if (RegExp( | ||||
|               '://${s.allowSubDomains ? '([^\\.]+\\.)*' : '(www\\.)?'}(${getSourceRegex(s.hosts)})(/|\\z)?') | ||||
|           .hasMatch(url)) { | ||||
|         source = s; | ||||
|         break; | ||||
|       try { | ||||
|         if (RegExp( | ||||
|                 '^${s.allowSubDomains ? '([^\\.]+\\.)*' : '(www\\.)?'}(${getSourceRegex(s.hosts)})\$') | ||||
|             .hasMatch(Uri.parse(url).host)) { | ||||
|           source = s; | ||||
|           break; | ||||
|         } | ||||
|       } catch (e) { | ||||
|         // Ignore | ||||
|       } | ||||
|     } | ||||
|     if (source == null) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user