GithubHelp home page GithubHelp logo

afonsojramos / discrakt Goto Github PK

View Code? Open in Web Editor NEW
75.0 6.0 10.0 1.66 MB

The Trakt ๐ŸŽฅ Plex โ–ถ๏ธ Discord ๐ŸŽฎ Rich Presence that you didn't know you needed.

Home Page: https://github.com/afonsojramos/discrakt/releases/latest

License: MIT License

Rust 100.00%
trakt discord rich-presence plex discord-presence rust

discrakt's Introduction

Discrakt - Easy to Use Trakt/Plex Discord Rich Presence

A simple app that acts as a bridge between Discord and Trakt (and maybe even Plex), allowing for the display of the watch status as Discord's Rich Presence. Essentially, it's a Trakt/Plex Discord Rich Presence.

Profile Status

Protip: If you are already using Plex, and would like to link it with Trakt, you can use the Plex-Trakt-Scrobbler plugin.

If you already know Trakt and how awesome it is this is definitely the best option, as it works more reliably and with some extra benefits over the other implementations, such as registering your watch status wherever you are watching (TV, phone, across the world, etc.), in whatever app you are watching on (Netflix, Roku, Plex, HBO Max), as long as you have a single device running Discord and Discrakt.

Plex Rich Presence alternatives:

Setup

  1. Create an API Application on Trakt.tv (with scrobble capabilities and urn:ietf:wg:oauth:2.0:oob as the redirect uri)
  2. Edit the credentials.ini file with the required Trakt username.
  3. Run the respective executable, and you're ready to start sharing your progress!

P.S. Discord needs to be running on the machine Discrakt is running on. P.P.S. Place the credentials.ini file in the same directory as the executable.

Running executables

Running the executables is as easy as clicking the provided executables in the latest release. That's it!

Optionally, after you ensure that everything is running correctly, you can also set the executable to run on startup, so that you don't have to run it manually every time you want to start sharing your watch status.

Linux/MacOS

Create a script that runs the executable silently and set it to run on startup in Unix/MacOS.

#!/bin/sh
nohup ./discrakt > /dev/null &

Windows

You can now use the silent Windows executable, and now you only need to follow this guide to run it on startup.

Scoop

You can install Discrakt in Scoop via the Extras bucket:

scoop bucket add extras # Ensure bucket is added first
scoop install discrakt

Development

Make sure you've installed Rust. You can install Rust and its package manager, cargo by following the instructions on rustup.rs. After installing the requirements below, simply run cargo run.

Thank You

movie and tv icons by iconixar

discrakt's People

Contributors

afonsojramos avatar deepsourcebot avatar dependabot[bot] avatar lluni avatar sitiom avatar xbiei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

discrakt's Issues

(BAN-B310) Audit required: Use of an insecure method method from `urllib` detected

Description

urllib not only opens http:// or https:// URLs, but also ftp:// and file://. With this it might be possible to open local files on the executing machine which might be a security risk if the URL to open can be manipulated by an external user. Correct way: ```python # Validate โ€ฆ

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource โ†’ deepsource.io/gh/afonsojramos/discrakt/issue/BAN-B310/occurrences/

Update Windows naming to match other OSs

๐Ÿ“ Provide a description of the new feature

Even though the .exe already reveals that it is a Windows binary, it should still match the naming used for other OSs.

discrakt.exe -> discrakt_win64.exe
discrakt_silent.exe -> discrakt_silent_win64.exe

โž• Additional Information

No response

False Positive on Windows Security

๐Ÿ“ Provide detailed reproduction steps (if any)

  1. Launch .exe
  2. Almost immediately flagged by Windows Security.

โœ”๏ธ Expected result

Program runs as normal.

โŒ Actual result

image

Failed to connect to Discord, retrying in 15 seconds.

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

I have entered the trakt clientID and username into credentials.ini.
I have entered the ApplicationID from the discord application into credientials.ini.

When trying to run the app, it is unable to connect to discord. Am I missing something?

๐Ÿชœ Steps To Reproduce

It behaves as though the discordClientID is not correct.

โ„น System Info

Fedora 35.  Project version latest.

๐Ÿ“ธ Screenshots

No response

Unable to use my own keys anymore

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

Previously I was able to use my own keys for Discord and TMDB, and I wish to continue to do so but recent changes, seem to have disabled that. That to me is a bug.

๐Ÿชœ Steps To Reproduce

  1. Pull current latest release
  2. Set Discord and TMDB API things in credentials.ini
  3. See that those are not being used.

โ„น System Info

OS: Gentoo
Project version: v2.5.0

๐Ÿ“ธ Screenshots

No response

Create Releases for other OSs

Create releases for other OSs

If possible, it would be good to have an automated way of creating these releases, if it makes sense.


If you'd like to see this feature implemented, add a ๐Ÿ‘ reaction to this post.

Restart Project

This has proven to have worked well enough for most users, however, it seems that the cross-platform compatibility of these Python executables generated by pyinstaller are not bullet proof (MacOS running problems).

As such, this issue wants to promote a restructure of this project in Rust with nickofolas/discord-rich-presence. This should be very easy to do as the business logic will essentially be the same, except with a different language. We will also benefit from a more performant executable with a smaller footprint as it does not need to be bundled with Python.

RPC not being cleared

RPC not being cleared after a user stops watching a show.

This was likely a bug introduced by accident.

thread 'main' panicked at src/trakt.rs:126:34:

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

discrakt crashes with: thread 'main' panicked at src/trakt.rs:126:34:

terminal output:

2024-03-11T01:32:59Z : Nothing is being played
2024-03-11T01:33:14Z : Nothing is being played
2024-03-11T01:33:29Z : Nothing is being played
2024-03-11T01:33:44Z : Nothing is being played
2024-03-11T01:33:59Z : Nothing is being played
2024-03-11T01:34:14Z : Nothing is being played
2024-03-11T01:34:29Z : Nothing is being played
thread 'main' panicked at src/trakt.rs:126:34:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

i'm guessing something changed with either trakt or tmdb

๐Ÿชœ Steps To Reproduce

  1. run discrakt (use the command line version to see error)
  2. start video
  3. wait for video to begin scrobbling
  4. observe discrakt crash

i'm not sure if this happens with every video, but i've observed it happening with: Dark Side of the Ring - S05E01

โ„น System Info

Windows: 10
discrakt: v2.4.0

๐Ÿ“ธ Screenshots

No response

Everything configured and does not work on MacOS

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

Hello, sorry for dumb issue post. I just dont know how to run it :D . I configured credentials.ini, made chmod +x arm64 file and if I ./file its not executing, if I do exec file , terminal window closes and its not working at all.
Can you help me resolve the issue?

๐Ÿชœ Steps To Reproduce

chmod +x file_arm64
./file_arm64 doesnt work
exec file_arm64 (terminal window closes and its not working)

โ„น System Info

MacOS
M2 Max chip

๐Ÿ“ธ Screenshots

No response

Create a user friendly way of installing/running executable

๐Ÿ“ Provide a description of the new feature

Currently, the executable is composed of a single binary directly compiled from Rust. However, this is not the most user friendly way of installing/running for non-developers, especially in MacOS, as it can be seen in some comments in this reddit post.

Therefore, we should implement a way of generating some sort of app such as .dmg to facilitate its use in MacOS.

Potential solutions are many, however, one thing that might pose the biggest obstacle is signing the executable with an Apple Developer Account - example 1 / example 2.

Suggestion: Dynamic image

Hi, there is a project called "premid" and they found a way to use a dynamic cover in YTM and sound cloud, I hope we can implement it. I think they use URLs in place of imageKey

Their code

Thanks

image

Update

Even Netflix that's would be cool

Code

image

Support for private trakt profile

๐Ÿ“ Provide a description of the new feature

discrakt could detect if the user has manually checked-in an episode or movie and show it on Discord just like how a usual scrobble is displayed. For example when watching a movie on a DVD there is no way to scrobble it so the manual check-in function can be used instead.

โž• Additional Information

No response

Crash when TMDB is not reacheable

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

Application seems to crash if TMDB is not reacheable.

thread 'main' panicked at src/trakt.rs:130:22:
TMDB API call failed: Transport(Transport { kind: Io, message: None, url: Some(Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.themoviedb.org")), port: None, path: "/3/tv/106379/season/1/images", query: Some("api_key=21b815a75fec5f1e707e3da1b9b2d7e3"), fragment: None }), source: Some(Custom { kind: HostUnreachable, error: Transport(Transport { kind: Io, message: Some("Error encountered in the status line"), url: None, source: Some(Os { code: 65, kind: HostUnreachable, message: "No route to host" }) }) }) })

๐Ÿชœ Steps To Reproduce

  1. Start the app
  2. Have it running without issues for a while
  3. TMDB has some hiccup and it crashes

โ„น System Info

OS: Darwin (MacOS 14.4.1)
Project: 1.5.0.

๐Ÿ“ธ Screenshots

No response

Windows non-silent binary in the releases is silent

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

https://github.com/afonsojramos/discrakt/releases/download/v2.2.4/discrakt_win64.exe and https://github.com/afonsojramos/discrakt/releases/download/v2.2.4/discrakt_win64_silent.exe are the same exact files (checked with the hash: 8eeb71ba6c5720d932bbf720b3989a20104eeb05e05865081b693922f9184de6). Can you fix this and publish the actual non-silent discrakt binary?

๐Ÿชœ Steps To Reproduce

  1. Download https://github.com/afonsojramos/discrakt/releases/download/v2.2.4/discrakt_win64.exe
  2. Run the program and notice it run silently
  3. Download https://github.com/afonsojramos/discrakt/releases/download/v2.2.4/discrakt_win64_silent.exe
  4. Compare hashes with previous executable and see it matching

โ„น System Info

Windows 11 22H2

๐Ÿ“ธ Screenshots

No response

Sleep crashes Discrakt

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

Putting system to sleep crashes Discrakt due to DNS (?) issues.

๐Ÿชœ Steps To Reproduce

  1. Run Discrakt
  2. Put system to Sleep
  3. Awake system
  4. Find that Discrakt is no longer running

โ„น System Info

Windows 11
Possibly also happening on other platforms.

๐Ÿ“ธ Screenshots

thread 'main' panicked at 'called Result::unwrap() on an Err value: Transport(Transport { kind: Dns, message: Some("resolve dns name 'api.trakt.tv:443'"), url: Some(Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.trakt.tv")), port: None, path: "/users/afonsojramos/watching", query: None, fragment: None }), source: Some(Os { code: 11001, kind: Uncategorized, message: "No such host is known." }) })', src\trakt.rs:85:14

IMDb and Trakt Buttons not working

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

I've installed the latest version of Rust and ran cargo run on the main branch of Discrakt. Everything is working fine regarding the app itself and rich presence, but the IMDb and Trakt buttons are not doing anything when you click on them in Discord.

๐Ÿชœ Steps To Reproduce

  1. Install Rust
  2. Open Terminal in Discrakt directory
  3. Run cargo run
  4. Play an episode of a show or a movie
  5. Click on IMDb or Trakt buttons on Discord Rich Presence

โ„น System Info

Windows 10 x64 (v2006)

๐Ÿ“ธ Screenshots

No response

Discrakt should find `credentials.ini` relative to executable path and instead of the current working directory

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

I have added discrakt.exe in my PATH but running it gave me this error:

> discrakt
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "couldn't open credentials.ini: The system cannot find the file specified. (os error 2)"', src\utils.rs:13:36
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The credentials.ini file is inside the discrakt folder, and indeed changing my directory to that folder works. Discrakt should try to find credentials.ini relative to the executable path and instead on the current working directory.

๐Ÿชœ Steps To Reproduce

  1. Configure credentials.ini
  2. Add discrakt.exe to the PATH
  3. Running discrakt will fail anywhere except in the executable directory

โ„น System Info

Windows 11 22H2
Discrakt v2.2.4

Note: Compiled it myself because of #45

๐Ÿ“ธ Screenshots

No response

Dynamic Movie/Show Images from TMDB Is not working for me

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

I'm not sure what I'm doing wrong, but the dynamic images are not working for me at all.

My credentials are as follows:

[Trakt API]
traktClientID = Client ID from trakt
traktUser = My trakt username

[Discord]
discordClientID = APPLICATION ID from discord

[TMDB API]
tmdbToken = API Key (v3 auth) from themoviedb

note:

I tried both API Key (v3 auth) and API Read Access Token (v4 auth) for tmdbToken

๐Ÿชœ Steps To Reproduce

Fill up the credentials file and run the discrakt_win64.exe.

โ„น System Info

Edition	Windows 11 Pro
Version	22H2
OS build	22621.1555
Experience	Windows Feature Experience Pack 1000.22640.1000.0

๐Ÿ“ธ Screenshots

Screenshot 2023-05-08 223651

Built-in client IDs / API keys for Trakt, Discord, and TMDB

๐Ÿ“ Provide a description of the new feature

It would be more convenient if Discrakt used preset client IDs for Trakt and Discord. You would not need to do the Setup process. Just setup the Trakt user (or a --user flag for a no-config process) and run the application.

โž• Additional Information

Related to #24

Nothing is being played...

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

Set up my discord and trakt application and configured my file and have executed the run file, yet discord is not showing any activity. Activity status is enabled, and both applications are running on the same machine.

Output

Lucky@Luckys-Mac discrakt-main % chmod +x ./discrakt_darwin
Lucky@Luckys-Mac discrakt-main % ./discrakt_darwin
2022-04-27T01:50:55Z : Nothing is being played
2022-04-27T01:51:10Z : Nothing is being played
2022-04-27T01:51:25Z : Nothing is being played
2022-04-27T01:51:40Z : Nothing is being played

๐Ÿชœ Steps To Reproduce

N/A

โ„น System Info

Running on MacOS 

discrakt_darwin v2.2.4

๐Ÿ“ธ Screenshots

No response

Discord Rich Presence not showing up

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

I have created the API per Setup instructions and configured my .ini file (added traktClientID, traktUser and traktClientSecret).
Executable and .ini file in the same folder.
I run the executable and terminal is showing and updating what I am watching.
Discord Rich Presence not showing up on my profile.

๐Ÿชœ Steps To Reproduce

  1. run discrakt (discrakt_win64.exe)
  2. no Discord Rich Presence

โ„น System Info

Windows 10
discrakt_win64.exe
v2.5.0

๐Ÿ“ธ Screenshots

Screenshot 2024-05-07 205709

image

IMDB and Trakt buttons does not do anything

๐Ÿ” Is there already an issue for your problem?

  • I have checked older issues, open and closed

๐Ÿ“ Description

There was a older issue #40
When I click on buttons nothing is happening
I also tried clicking those buttons from different accounts from different clients, same issue

๐Ÿชœ Steps To Reproduce

I just executed LATEST (2.4.0) amr64_darwin file
everything looks working, console looks normal (screenshot) but buttons does not do anything

โ„น System Info

MacOS

๐Ÿ“ธ Screenshots

Sniฬmek obrazovky 2024-03-06 vย 18 27 52 https://streamable.com/xjuwju

Bug on scrobbling a Movie

Hey, I tryed both Exe file and the python project and ending obtaining tha same result.

When i play a Series, everything is fine:
image

But when i play a movie, nothing is presented on Discord:
image

But is well presented on the log:

image

Can you please check what's happening?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.