Move all code into musicplayer module
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import gleam/erlang/process.{type Name}
|
||||
|
||||
import input/input.{type Listener}
|
||||
import input/key.{type Key}
|
||||
import mpv/mpv
|
||||
import musicplayer/input/input.{type Listener}
|
||||
import musicplayer/input/key.{type Key}
|
||||
import musicplayer/mpv/mpv
|
||||
|
||||
pub fn main() -> Nil {
|
||||
let exit = process.new_subject()
|
||||
|
||||
@@ -2,7 +2,7 @@ import gleam/erlang/process.{type Name, type Subject}
|
||||
import gleam/list
|
||||
import gleam/option.{type Option, None, Some}
|
||||
|
||||
import input/key.{type Key}
|
||||
import musicplayer/input/key.{type Key}
|
||||
|
||||
pub type Listener {
|
||||
InputListener(final: Subject(Key), tap: Option(Subject(List(String))))
|
||||
@@ -3,7 +3,7 @@ import gleam/erlang/process.{type Subject}
|
||||
import gleam/list
|
||||
import gleam/string
|
||||
|
||||
import input/internal as internal_input
|
||||
import musicplayer/input/internal as internal_input
|
||||
|
||||
pub type Key {
|
||||
Char(String)
|
||||
@@ -2,10 +2,10 @@ import gleam/json
|
||||
import gleam/result
|
||||
import gleam/string
|
||||
|
||||
import input/key.{type Key}
|
||||
import mpv/internal as internal_control
|
||||
import tcp/reason.{type Reason}
|
||||
import tcp/tcp.{type Socket}
|
||||
import musicplayer/input/key.{type Key}
|
||||
import musicplayer/mpv/internal as internal_control
|
||||
import musicplayer/tcp/reason.{type Reason}
|
||||
import musicplayer/tcp/tcp.{type Socket}
|
||||
|
||||
pub type Control {
|
||||
TogglePlayPause
|
||||
@@ -5,11 +5,11 @@ import gleam/otp/actor
|
||||
import gleam/result
|
||||
import gleam/string
|
||||
|
||||
import input/input.{type Listener, InputListener}
|
||||
import input/key.{type Key}
|
||||
import mpv/control.{type Control}
|
||||
import tcp/reason
|
||||
import tcp/tcp.{type Socket}
|
||||
import musicplayer/input/input.{type Listener, InputListener}
|
||||
import musicplayer/input/key.{type Key}
|
||||
import musicplayer/mpv/control.{type Control}
|
||||
import musicplayer/tcp/reason
|
||||
import musicplayer/tcp/tcp.{type Socket}
|
||||
|
||||
type State(socket, exit) {
|
||||
State(socket: Socket, exit: Subject(Nil))
|
||||
@@ -2,7 +2,7 @@ import gleam/bit_array
|
||||
import gleam/erlang/atom
|
||||
import gleam/result
|
||||
|
||||
import tcp/reason.{type Reason}
|
||||
import musicplayer/tcp/reason.{type Reason}
|
||||
|
||||
pub type Socket
|
||||
|
||||
@@ -4,8 +4,8 @@ import gleam/otp/actor
|
||||
import gleam/result
|
||||
import gleam/string
|
||||
|
||||
import tcp/reason.{type Reason}
|
||||
import tcp/tcp
|
||||
import musicplayer/tcp/reason.{type Reason}
|
||||
import musicplayer/tcp/tcp
|
||||
|
||||
pub type Message {
|
||||
Shutdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import gleam/list
|
||||
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 {
|
||||
gleeunit.main()
|
||||
@@ -1,9 +1,9 @@
|
||||
import gleam/list
|
||||
import gleeunit
|
||||
|
||||
import input/key.{type Key, Char}
|
||||
import mpv/control.{type Control}
|
||||
import mpv/internal as control_internal
|
||||
import musicplayer/input/key.{type Key, Char}
|
||||
import musicplayer/mpv/control.{type Control}
|
||||
import musicplayer/mpv/internal as control_internal
|
||||
|
||||
pub fn main() -> Nil {
|
||||
gleeunit.main()
|
||||
@@ -3,7 +3,7 @@ import gleeunit
|
||||
import simplifile
|
||||
|
||||
import echo_server
|
||||
import tcp/tcp
|
||||
import musicplayer/tcp/tcp
|
||||
|
||||
pub fn main() -> Nil {
|
||||
gleeunit.main()
|
||||
Reference in New Issue
Block a user