Merge pull request #100 from stephenb10/loginBug

Filter device name
This commit is contained in:
aiden vigue 2021-06-30 02:46:03 -04:00 committed by GitHub
commit f8478a8fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -53,8 +53,8 @@ final class SessionManager {
let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
var deviceName = UIDevice.current.name
deviceName = deviceName.folding(options: .diacriticInsensitive, locale: .current)
deviceName = deviceName.removeRegexMatches(pattern: "[^\\w\\s]")
deviceName = String(deviceName.unicodeScalars.filter {CharacterSet.urlQueryAllowed.contains($0) })
var header = "MediaBrowser "
#if os(tvOS)
header.append("Client=\"SwiftFin tvOS\", ")