mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-11 02:08:44 +02:00
fix: permission error message and Android 13+ storage permission
- Fixed download showing 'Song not found' when actually permission error - Added permission error type detection in Go backend - Android 13+ now requests both MANAGE_EXTERNAL_STORAGE and READ_MEDIA_AUDIO - MANAGE_EXTERNAL_STORAGE opens Settings (system-level) - READ_MEDIA_AUDIO shows dialog (app-level, resets on clear data) - Proper permission check before showing 'granted' status
This commit is contained in:
6 files changed
+104
-19
No files matched your search
@@ -991,6 +991,12 @@ func errorResponse(msg string) (string, error) {
|
||||
strings.Contains(lowerMsg, "try using vpn") ||
|
||||
strings.Contains(lowerMsg, "change dns") {
|
||||
errorType = "isp_blocked"
|
||||
} else if strings.Contains(lowerMsg, "permission") ||
|
||||
strings.Contains(lowerMsg, "operation not permitted") ||
|
||||
strings.Contains(lowerMsg, "access denied") ||
|
||||
strings.Contains(lowerMsg, "failed to create file") ||
|
||||
strings.Contains(lowerMsg, "failed to create directory") {
|
||||
errorType = "permission"
|
||||
} else if strings.Contains(lowerMsg, "not found") ||
|
||||
strings.Contains(lowerMsg, "not available") ||
|
||||
strings.Contains(lowerMsg, "no results") ||
|
||||
|
||||
Reference in new issue
Block a user