mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-09 00:23:20 +01:00
32 lines
877 B
Swift
32 lines
877 B
Swift
import Foundation
|
|
|
|
enum LyricsError: Error, CustomStringConvertible {
|
|
case noCurrentTrack
|
|
case musixmatchRestricted
|
|
case invalidMusixmatchToken
|
|
case decodingError
|
|
case noSuchSong
|
|
case unknownError
|
|
case invalidSource
|
|
|
|
// swift 5.8 compatible
|
|
var description: String {
|
|
switch self {
|
|
case .noSuchSong:
|
|
return "no_such_song".localized
|
|
case .musixmatchRestricted:
|
|
return "musixmatch_restricted".localized
|
|
case .invalidMusixmatchToken:
|
|
return "invalid_musixmatch_token".localized
|
|
case .decodingError:
|
|
return "decoding_error".localized
|
|
case .noCurrentTrack:
|
|
return "no_current_track".localized
|
|
case .unknownError:
|
|
return "unknown_error".localized
|
|
case .invalidSource:
|
|
return ""
|
|
}
|
|
}
|
|
}
|