1 Commits

Author SHA1 Message Date
Alexander Heldt
d01b6d3f18 Move all code into musicplayer module 2025-11-22 19:03:49 +01:00
14 changed files with 22 additions and 22 deletions

View File

@@ -1,8 +1,8 @@
import gleam/erlang/process.{type Name} import gleam/erlang/process.{type Name}
import input/input.{type Listener} import musicplayer/input/input.{type Listener}
import input/key.{type Key} import musicplayer/input/key.{type Key}
import mpv/mpv import musicplayer/mpv/mpv
pub fn main() -> Nil { pub fn main() -> Nil {
let exit = process.new_subject() let exit = process.new_subject()

View File

@@ -2,7 +2,7 @@ import gleam/erlang/process.{type Name, type Subject}
import gleam/list import gleam/list
import gleam/option.{type Option, None, Some} import gleam/option.{type Option, None, Some}
import input/key.{type Key} import musicplayer/input/key.{type Key}
pub type Listener { pub type Listener {
InputListener(final: Subject(Key), tap: Option(Subject(List(String)))) InputListener(final: Subject(Key), tap: Option(Subject(List(String))))

View File

@@ -3,7 +3,7 @@ import gleam/erlang/process.{type Subject}
import gleam/list import gleam/list
import gleam/string import gleam/string
import input/internal as internal_input import musicplayer/input/internal as internal_input
pub type Key { pub type Key {
Char(String) Char(String)

View File

@@ -2,10 +2,10 @@ import gleam/json
import gleam/result import gleam/result
import gleam/string import gleam/string
import input/key.{type Key} import musicplayer/input/key.{type Key}
import mpv/internal as internal_control import musicplayer/mpv/internal as internal_control
import tcp/reason.{type Reason} import musicplayer/tcp/reason.{type Reason}
import tcp/tcp.{type Socket} import musicplayer/tcp/tcp.{type Socket}
pub type Control { pub type Control {
TogglePlayPause TogglePlayPause

View File

@@ -5,11 +5,11 @@ import gleam/otp/actor
import gleam/result import gleam/result
import gleam/string import gleam/string
import input/input.{type Listener, InputListener} import musicplayer/input/input.{type Listener, InputListener}
import input/key.{type Key} import musicplayer/input/key.{type Key}
import mpv/control.{type Control} import musicplayer/mpv/control.{type Control}
import tcp/reason import musicplayer/tcp/reason
import tcp/tcp.{type Socket} import musicplayer/tcp/tcp.{type Socket}
type State(socket, exit) { type State(socket, exit) {
State(socket: Socket, exit: Subject(Nil)) State(socket: Socket, exit: Subject(Nil))

View File

@@ -2,7 +2,7 @@ import gleam/bit_array
import gleam/erlang/atom import gleam/erlang/atom
import gleam/result import gleam/result
import tcp/reason.{type Reason} import musicplayer/tcp/reason.{type Reason}
pub type Socket pub type Socket

View File

@@ -4,8 +4,8 @@ import gleam/otp/actor
import gleam/result import gleam/result
import gleam/string import gleam/string
import tcp/reason.{type Reason} import musicplayer/tcp/reason.{type Reason}
import tcp/tcp import musicplayer/tcp/tcp
pub type Message { pub type Message {
Shutdown Shutdown

View File

@@ -1,7 +1,7 @@
import gleam/list import gleam/list
import gleeunit import gleeunit
import input/key.{type Key, Char, csi, esc, input_introducer as ii} import musicplayer/input/key.{type Key, Char, csi, esc, input_introducer as ii}
pub fn main() -> Nil { pub fn main() -> Nil {
gleeunit.main() gleeunit.main()

View File

@@ -1,9 +1,9 @@
import gleam/list import gleam/list
import gleeunit import gleeunit
import input/key.{type Key, Char} import musicplayer/input/key.{type Key, Char}
import mpv/control.{type Control} import musicplayer/mpv/control.{type Control}
import mpv/internal as control_internal import musicplayer/mpv/internal as control_internal
pub fn main() -> Nil { pub fn main() -> Nil {
gleeunit.main() gleeunit.main()

View File

@@ -3,7 +3,7 @@ import gleeunit
import simplifile import simplifile
import echo_server import echo_server
import tcp/tcp import musicplayer/tcp/tcp
pub fn main() -> Nil { pub fn main() -> Nil {
gleeunit.main() gleeunit.main()