[package]
name = "radio-player"
version = "0.4.18"
edition = "2021"
description = "G Radio Player — reproductor y herramientas de programación"
license = "GPL-3.0-or-later"
readme = "README.md"

[lib]
name = "grpautaje"
path = "src/lib.rs"

# ── Binario principal: interfaz GTK4 ──────────────────────────────────────────
[[bin]]
name = "radio-player"
path = "src/main.rs"

# ── Binario auxiliar: programador de comerciales/eventos (segundo :58) ────────
[[bin]]
name = "comercial-scheduler"
path = "src/comercial_scheduler.rs"

# ── Binario auxiliar: relleno automático del playlist (cada 5 s) ─────────────
[[bin]]
name = "playlist-refill"
path = "src/playlist_refill.rs"

# ── Buscador de audio ─────────────────────────────────────────────────────────
[[bin]]
name = "gr-buscador"
path = "src/gr_buscador.rs"

# ── Editor de playlists .gradio ───────────────────────────────────────────────
[[bin]]
name = "gr-playlist"
path = "src/gr_playlist.rs"

# ── Grabador de audio ─────────────────────────────────────────────────────────
[[bin]]
name = "gr-record"
path = "src/gr_record.rs"

# ── Módulos de gr-pautaje ─────────────────────────────────────────────────────
[[bin]]
name = "gr-pautaje"
path = "src/bin/gr-pautaje.rs"

[[bin]]
name = "gr-parrilla"
path = "src/bin/gr-parrilla.rs"

[[bin]]
name = "gr-botonera"
path = "src/bin/gr-botonera.rs"

[[bin]]
name = "gr-visor"
path = "src/bin/gr-visor.rs"

# ── Reportería de audios emitidos ────────────────────────────────────────────
[[bin]]
name = "gr-reportes"
path = "src/gr_reportes.rs"

[dependencies]
# GTK4 GUI
gtk4  = { version = "0.9", features = ["v4_6", "v4_8"] }
cairo-rs = { version = "0.20", features = ["png", "pdf"] }
glib  = "0.20"
glib-macros = "0.20"

# GStreamer
gstreamer         = "0.23"
gstreamer-audio   = "0.23"
gstreamer-player  = "0.23"
gstreamer-pbutils = "0.23"
gstreamer-app     = "0.23"
gdk4 = { version = "0.9", features = ["v4_6"] }
gdk-pixbuf = "0.20"

# Async runtime
tokio = { version = "1", features = ["full"] }

# Utilidades compartidas
rand       = "0.8"
chrono     = { version = "0.4", features = ["clock"] }
dirs       = "5"
serde      = { version = "1", features = ["derive"] }
serde_json = "1"
anyhow           = "1"
zip              = "2"
tokio-tungstenite = { version = "0.24", features = ["native-tls"] }
futures-util     = "0.3"
native-tls       = "0.2"
sha2             = "0.10"
log        = "0.4"
env_logger = "0.11"

# Validación de audio (decodificación pure-Rust) — usado por playlist-refill
# para descartar archivos corruptos antes de meterlos en la cola.
# Defaults: flac, mkv, ogg, pcm, vorbis, wav. Agregamos mp3, aac e isomp4.
symphonia  = { version = "0.5", features = ["mp3", "aac", "isomp4"] }
