From 3e0e29998356a18a8c6192cb05bb2f90b4042fe9 Mon Sep 17 00:00:00 2001 From: BrutuZ Date: Sat, 5 Oct 2024 17:33:58 -0300 Subject: [PATCH] Set `Watching` activity type --- .github/workflows/release.yml | 5 +++-- Cargo.toml | 4 ++-- src/discord.rs | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cbe79e9..57231ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: Release on: + workflow_dispatch: release: types: [created] @@ -15,7 +16,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - targets: "aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl" + targets: 'aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl' - name: Build amd64 run: cargo build --release @@ -88,7 +89,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - targets: "aarch64-apple-darwin, x86_64-apple-darwin" + targets: 'aarch64-apple-darwin, x86_64-apple-darwin' - name: Build darwin run: cargo build --release --target=x86_64-apple-darwin diff --git a/Cargo.toml b/Cargo.toml index 3ad9bb0..45a6351 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "discrakt" -version = "2.2.3" +version = "2.2.4" edition = "2021" authors = ["afonsojramos"] description = "Easy to Use Trakt/Plex Discord Rich Presence" @@ -11,7 +11,7 @@ readme = "README.md" exclude = [".github/*", "images/*.psd", "credentials.ini", ".gitignore"] [dependencies] -discord-rich-presence = "0.2.4" +discord-rich-presence = "0.2.5" ureq = { version = "2.10.1", features = ["json"] } configparser = { version = "3.1.0", features = ["indexmap"] } serde = { version = "1.0.208", features = ["derive"] } diff --git a/src/discord.rs b/src/discord.rs index 80da418..fb4aecb 100644 --- a/src/discord.rs +++ b/src/discord.rs @@ -137,7 +137,8 @@ impl Discord { .buttons(vec![ Button::new("IMDB", &payload_data.link_imdb), Button::new("Trakt", &payload_data.link_trakt), - ]); + ]) + .activity_type(discord_rich_presence::activity::ActivityType::Watching); log(&format!( "{} - {} | {}",