Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Few fixes
Browse files Browse the repository at this point in the history
Closed #28, Closed #29, Closed #31.
  • Loading branch information
lesterrry authored May 9, 2021
1 parent f3c792c commit 136faec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension String {
}

var isCyrillic: Bool {
let set = "абвгдежзийклмнопрстуфхцчшщьюя,.!?- "
let set = "абвгдежзийклмнопрстуфхцчшщьъыэюя,.!?- "

for c in self.map({ String($0) }) {
if !set.contains(c.lowercased()) {
Expand Down
2 changes: 1 addition & 1 deletion SFX Processor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SFX {

public static func composeAndSpeak(track: String, artist: String) -> (Bool, String?) {
if synth.isSpeaking { return (false, "already speaking") }
let a = Int.random(in: 1...8)
let a = Int.random(in: 1...7)
if a == 1 || a == 2 {
let s = AutomneAxioms.trackNarratives.randomElement()
let d = a == 1 ? track : artist
Expand Down
8 changes: 4 additions & 4 deletions ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ class ViewController: NSViewController{
"mediaType": MPMediaType.music,
"albumTitle": (ViewController.setFrequency?.name) ?? "Deepwave",
"artist": (track?.user?.username) ?? "Unknown",
"title": (track?.title) ?? "Unknown",
"title": ((track!.deepWave ?? false) ? "🌀 " : "") + ((track?.title) ?? "Unknown"),
"playbackDuration": TimeInterval(exactly: track!.duration! / 1000)!,
"bookmarkTime": TimeInterval(exactly: 0.0)!,
MPNowPlayingInfoPropertyIsLiveStream: 0.0,
Expand All @@ -861,7 +861,7 @@ class ViewController: NSViewController{
DispatchQueue.main.asyncAfter(deadline: .now() + 4.0, execute: { ViewController.player.play() })
} else {
ViewController.player.play()
if ViewController.defaults.integer(forKey: "verbose") == 1 {
if ViewController.defaults.integer(forKey: "log") == 1 {
tprint("WARN: (synth) \(a.1 ?? "nil")")
}
}
Expand All @@ -871,8 +871,8 @@ class ViewController: NSViewController{

let b = ViewController.defaults.integer(forKey: "deepwave")
if b != 0 && !isStream && !(track!.deepWave ?? false) {
let c = Int.random(in: 1...(10 - (b * 2)))
if c == 1 {
let c = Int.random(in: 0...(10 - (b * 2)))
if c == 0 || c == 1 {
initDeepwave(with: track!, add: true)
}
}
Expand Down

0 comments on commit 136faec

Please sign in to comment.