mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-07 05:07:59 +02:00
feat: extension runtime and provider improvements
This commit is contained in:
@@ -12,7 +12,14 @@ enum DownloadStatus {
|
||||
skipped,
|
||||
}
|
||||
|
||||
enum DownloadErrorType { unknown, notFound, rateLimit, network, permission }
|
||||
enum DownloadErrorType {
|
||||
unknown,
|
||||
notFound,
|
||||
rateLimit,
|
||||
network,
|
||||
permission,
|
||||
verificationRequired,
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class DownloadItem {
|
||||
@@ -94,6 +101,8 @@ class DownloadItem {
|
||||
return 'Connection failed, check your internet';
|
||||
case DownloadErrorType.permission:
|
||||
return 'Cannot write to folder, check storage permission';
|
||||
case DownloadErrorType.verificationRequired:
|
||||
return 'Verification required. Open the extension and complete the security check.';
|
||||
default:
|
||||
return error ?? 'An error occurred';
|
||||
}
|
||||
|
||||
@@ -58,4 +58,5 @@ const _$DownloadErrorTypeEnumMap = {
|
||||
DownloadErrorType.rateLimit: 'rateLimit',
|
||||
DownloadErrorType.network: 'network',
|
||||
DownloadErrorType.permission: 'permission',
|
||||
DownloadErrorType.verificationRequired: 'verificationRequired',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user