some constants
This commit is contained in:
parent
b43a8ac4d0
commit
931c7f5d2b
3 changed files with 8 additions and 4 deletions
|
@ -42,7 +42,7 @@ glib::wrapper! {
|
|||
impl Default for Application {
|
||||
fn default() -> Self {
|
||||
glib::Object::builder::<Application>()
|
||||
.property("application-id", "eu.callcc.audrey")
|
||||
.property("application-id", crate::APP_ID)
|
||||
.property("flags", gio::ApplicationFlags::default())
|
||||
.build()
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
pub const VERSION: &'static str = "0.1.0"; // AUDREY_VERSION
|
||||
pub const USER_AGENT: &'static str = "audrey/linux";
|
||||
pub const APP_ID: &'static str = "eu.callcc.audrey";
|
||||
|
||||
mod application;
|
||||
pub use application::Application;
|
||||
|
||||
|
@ -50,7 +54,7 @@ fn main() -> glib::ExitCode {
|
|||
// smol test for the subsonic client
|
||||
runtime().spawn(async {
|
||||
let keyring = oo7::Keyring::new().await.unwrap();
|
||||
let attributes = vec![("xdg:schema", "eu.callcc.audrey")];
|
||||
let attributes = vec![("xdg:schema", APP_ID)];
|
||||
let items = keyring.search_items(&attributes).await.unwrap();
|
||||
if !items.is_empty() {
|
||||
let item = &items[0];
|
||||
|
|
|
@ -71,7 +71,7 @@ impl Client {
|
|||
("t", token),
|
||||
("s", salt),
|
||||
("v", "1.16.1"),
|
||||
("c", "eu.callcc.audrey"),
|
||||
("c", crate::APP_ID),
|
||||
("f", "json"),
|
||||
],
|
||||
)
|
||||
|
@ -83,7 +83,7 @@ impl Client {
|
|||
|
||||
Ok(Client {
|
||||
client: reqwest::Client::builder()
|
||||
.user_agent("audrey/linux") // Audrey.Const.user_agent
|
||||
.user_agent(crate::USER_AGENT)
|
||||
.build()?,
|
||||
base_url,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue