ensure we create our token folder on login
This commit is contained in:
parent
92b54d04c5
commit
6abcaf82c2
|
@ -20,6 +20,15 @@ extension Seanut {
|
|||
var password: String?
|
||||
|
||||
mutating func run() async {
|
||||
let seanutCacheFolder = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".seanut/")
|
||||
if !FileManager.default.fileExists(atPath: seanutCacheFolder.absoluteString) {
|
||||
do {
|
||||
try FileManager.default.createDirectory(at: seanutCacheFolder, withIntermediateDirectories: false)
|
||||
} catch {
|
||||
fatalError("could not create seanut token cache folder. quitting...")
|
||||
}
|
||||
}
|
||||
|
||||
let client = JellyfinClient(
|
||||
configuration: Seanut.generateJellyfinConfiguration(url: options.domain.toURL()!)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue