Restructure mpv/internal package
This commit is contained in:
@@ -2,7 +2,7 @@ import gleam/erlang/process.{type Subject}
|
||||
import gleam/otp/actor
|
||||
import gleam/string
|
||||
|
||||
import mpv/internal.{type Key, Char}
|
||||
import mpv/key.{type Key, Char}
|
||||
import tcp/reason.{type Reason}
|
||||
import tcp/tcp.{type Socket}
|
||||
|
||||
@@ -30,7 +30,7 @@ pub fn new(exit: Subject(Nil)) -> Result(Nil, String) {
|
||||
Error("Could not start actor: " <> string.inspect(start_error))
|
||||
Ok(actor.Started(data:, ..)) -> {
|
||||
echo "waiting for input"
|
||||
internal.start_raw_shell()
|
||||
key.start_raw_shell()
|
||||
process.spawn(fn() { read_input(data) })
|
||||
Ok(Nil)
|
||||
}
|
||||
@@ -60,7 +60,7 @@ fn handle_message(
|
||||
}
|
||||
|
||||
fn read_input(subject: Subject(Message)) -> Nil {
|
||||
internal.read_input_until_key([]) |> KeyPress |> process.send(subject, _)
|
||||
key.read_input_until_key([]) |> KeyPress |> process.send(subject, _)
|
||||
|
||||
read_input(subject)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user