1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//! Headless streaming player for the Deezer Connect protocol.
//!
//! **pleezer** is a library and application that implements the Deezer Connect protocol,
//! enabling remote-controlled audio playback of Deezer content. It provides:
//!
//! # Core Features
//!
//! * **Remote Control**: Acts as a receiver for Deezer Connect, allowing control from
//! official Deezer apps
//! * **Audio Playback**: High-quality audio streaming with gapless playback support
//! * **Format Support**: Handles MP3 and FLAC formats based on subscription level
//! * **Volume Normalization**: Optional audio leveling with configurable target gain
//!
//! # Architecture
//!
//! The library is organized into several key modules:
//!
//! * **Connection Management**
//! - [`http`]: Manages HTTP connections and cookies
//! - [`gateway`]: Handles API authentication and requests
//! - [`remote`]: Implements Deezer Connect protocol
//!
//! * **Audio Processing**
//! - [`decrypt`]: Handles encrypted content
//! - [`player`]: Controls audio playback and queues
//! - [`track`]: Manages track metadata and downloads
//!
//! * **Authentication**
//! - [`arl`]: ARL token management
//! - [`tokens`]: Session token handling
//!
//! * **Configuration**
//! - [`config`]: Application settings
//! - [`proxy`]: Network proxy support
//!
//! * **Protocol**
//! - [`events`]: Event system for state changes
//! - [`protocol`]: Deezer Connect message types
//!
//! * **Utilities**
//! - [`error`]: Error types and handling
//! - [`util`]: General helper functions
//! - [`uuid`]: UUID generation
//!
//! # Example
//!
//! ```rust,no_run
//! use pleezer::{config::Config, player::Player, remote::Client};
//!
//! async fn example() -> pleezer::error::Result<()> {
//! // Create player with configuration
//! let config = Config::new()?;
//! let player = Player::new(&config, "").await?;
//!
//! // Create and start client
//! let mut client = Client::new(&config, player)?;
//! client.start().await?;
//!
//! Ok(())
//! }
//! ```
//!
//! # Protocol Documentation
//!
//! For details on the Deezer Connect protocol implementation, see the
//! [`protocol`] and [`remote`] modules.
//!
//! # Error Handling
//!
//! Errors are handled through the types in the [`error`] module, with
//! most functions returning [`Result`](error::Result).
//!
//! # Concurrency
//!
//! The library uses async/await for concurrency and is designed to work with
//! the Tokio async runtime. Most operations are asynchronous and can run
//! concurrently.
extern crate log;
pub use Uuid;