mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-25 11:53:45 +02:00
HTML Source Bugfix #288
This commit is contained in:
@@ -41,9 +41,14 @@ class HTML extends AppSource {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
// is relative
|
// is relative
|
||||||
}
|
}
|
||||||
var currPathSegments = uri.path.split('/');
|
var currPathSegments = uri.path
|
||||||
|
.split('/')
|
||||||
|
.where((element) => element.trim().isNotEmpty)
|
||||||
|
.toList();
|
||||||
if (e.startsWith('/') || currPathSegments.isEmpty) {
|
if (e.startsWith('/') || currPathSegments.isEmpty) {
|
||||||
return '${uri.origin}/$e';
|
return '${uri.origin}/$e';
|
||||||
|
} else if (e.split('/').length == 1) {
|
||||||
|
return '${uri.origin}/${currPathSegments.join('/')}/$e';
|
||||||
} else {
|
} else {
|
||||||
return '${uri.origin}/${currPathSegments.sublist(0, currPathSegments.length - 1).join('/')}/$e';
|
return '${uri.origin}/${currPathSegments.sublist(0, currPathSegments.length - 1).join('/')}/$e';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user