Giter Site home page Giter Site logo

tundra's Introduction

Tundra

Rust Build Status GNU GPL v3 licensed

Tundra is an open-source MyAnimeList scrobbler application for Linux. It automatically detects media players running on your computer, checks for any anime videos playing, and marks them as watched on you MAL profile.

Screenshot of Tundra

Download

Flatpak

Download on Flathub

AUR

For Arch Linux users, there are two packages in AUR to choose from:

Usage

GUI

The usage is very simple:

  1. First, you need to sign in to your MyAnimeList account with your MAL username and password.
  2. Make sure that the title you are about to watch is marked as "watching" or "plan to watch" on your MAL account.
  3. Then, you need to run an MPRIS-enabled media player and play a local anime video file. Its title, poster picture and episode number will appear after a few seconds in Tundra window.
  4. The episode will be scrobbled after you watch over half of the video. You will know once you see the notification!

CLI

Tundra has CLI interface as well. First, you need to authenticate:

tundra authenticate

This will display a URL which you will need to open and then sign in to your MyAnimeList account. Then, you can run Tundra as a daemon:

tundra daemon

This way, Tundra will periodically check for players running and scrobble any anime videos to your MAL account, just like the GUI version.

Building

Requirements

How to build

Make sure you have executed git clone --recursive, so the submodules are cloned as well. Tundra uses Cargo as its package manager and build system. It can be built by executing cargo build in the project root directory. For the release version, execute cargo build --release.

Flatpak

After you have installed Flatpak Builder execute flatpak-builder --install repo moe.tundra.Tundra.json --force-clean --user -y in the project root directory to build and install the Flatpak package.

Flathub repo can be found here: flathub/moe.tundra.Tundra.

pre-commit

We encourage contributors to use predefined pre-commit hooks — to install them in your local repo, make sure you have pre-commit installed and run:

Localization

Tundra translation is being done on the Transifex platform. See the Tundra project on Transifex webpage if you would like to contribute a translation for a language you know.

Currently offered languages:

  • English
  • Japanese
  • Polish
pre-commit install

Related projects

tundra's People

Contributors

abrarsl avatar dependabot[bot] avatar m4tx avatar seqre avatar transifex-integration[bot] 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

Watchers

 avatar  avatar  avatar

tundra's Issues

Add browser window title detection too

I watch anime online in my browser instead of locally. It would be nice if Tundra could detect Firefox/Chromium running and monitor the current tab name. I know that not all websites will change the title depending on the episode, but most do.

Package does not build when using custom Cargo target directory

The installation breaks when building tundra from AUR when a user has custom defined Cargo target directory.

AUR error:

error: failed to run custom build command for `tundra v0.4.0 (/home/seqre/.cache/paru/clone/tundra/src/tundra-0.4.0)`

Caused by:
  process didn't exit successfully: `/home/seqre/.cargo/target/release/build/tundra-be22d1479b53597a/build-script-build` (exit status: 101)
  --- stdout
  Creating directory: "target/locale"

  --- stderr
  thread 'main' panicked at 'Could not create translations directory: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:19:32
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'tundra-0.4.0-1': 
error: packages failed to build: tundra-0.4.0-1

Example .cargo/config.toml to recreate issue:

[build]
target-dir = ".cargo/target"

It does no build on arch linux.

tried both packages. getting same error.

          /usr/bin/ld: /tmp/rustcNZXrKm/libring-53479741a03b805e.rlib(996b92d95a4b7917-x86_64-mont-elf.o): in function `bn_sqr8x_mont':
          /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/pregenerated/x86_64-mont-elf.S:788:(.text+0x8b7): undefined reference to `ring_core_0_17_8_OPENSSL_ia32cap_P'
          /usr/bin/ld: /tmp/rustcNZXrKm/libring-53479741a03b805e.rlib(996b92d95a4b7917-x86_64-mont5-elf.o):/home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/pregenerated/x86_64-mont5-elf.S:24: more undefined references to `ring_core_0_17_8_OPENSSL_ia32cap_P' follow
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

tundra daemon seems to exit after opening mpv?

I want to use tundra daemon instead of GUI for tracking anime and i have enabled it on startup but when i open mpv (via ani-cli), by the time the anime ends its gets exited and hence not able to track anime. I have to manually open tundra to track it.

Steps to reproduce, enable tundra daemon command on start up, then open anime (using mpv), by the time the anime ends the tundra daemon exits (can check with ps aux | grep tundra)

Add an option to automatically add an Anime to "Watching"

Tundra only scrobbles an anime when the user has it marked as "Watching" or "Plan to watch". It would be nice to add an option to recognize it even when it hasn't been marked as such before. It should be non-invasive though, so the user isn't prompted each time he/she watched a random tv series (infobar in the app UI?)

Dynamically download new anime relations

Anime relations seems to release new changes more often than Tundra does its releases (which contain those updates). It would be beneficial for Tundra to be able to grab those changes (on start, on user request, etc.) during runtime, not only during compilation during installation/update.

This has the apparent minus of requiring an Internet connection to grab that file during installation/update instead of being included in the binary, but the Internet connection is required for it, nevertheless.

The significant advantage is that the users will always have the newest relations available to them, no matter the Tundra version.

D-Bus error in daemon mode when there is no notification daemon running in the OS

I use arch linux with icewmi using tundra-git aur package, this is the mkv file Yamada-kun to Lv999 no Koi wo Suru - 01.mkv, I was running tundra daemon only
Error: Error { kind: Dbus(D-Bus error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. (org.freedesktop.DBus.Error.NoReply)) }

Cannot update MAL due to invalid field

I see the following errors

2024-01-28 14:02:23 [INFO] [tundra::app] Found an active player: SMPlayer, playing Hataraku Maou-sama season 1 episode 4
2024-01-28 14:02:23 [ERROR] [tundra::gtk_gui] Could not communicate with MAL: error decoding response body: unknown variant `cm`, expected one of `tv`, `ova`, `movie`, `special`, `ona`, `music`, `unknown` at line 1 column 4499
2024-01-28 14:02:23 [ERROR] [tundra::gtk_gui] error decoding response body: unknown variant `cm`, expected one of `tv`, `ova`, `movie`, `special`, `ona`, `music`, `unknown` at line 1 column 4499

Name of file: Hataraku_Maou-sama_-_04.mp4

Tundra version: 0.5.1

Since the error mentions "response body" I thought it might have updated MAL. But I have double checked MAL and the watched episode is still set to 3.

Support new MAL API

There's an official MyAnimeList API, which supports OAuth2 authentication. Tundra should eventually switch to that to ensure user's password safety, among other improvements.

Support for Ani-cli

It'd be great if Tundra supported ani-cli. Right now the anime I'm watching doesn't even show up on Tundra.

oauth2 request error despite successful authentication

it may or may not be an actual issue/bug, hence no bug/issue label (from my side)

I have no idea what to do, so kinda had to create an issue here

problem
after authenticating (successfully), nothing happens on Tundra , but after a few minutes, encountering below error:
Screenshot from 2024-03-24 15-34-55

log
I didn't find an actual log and honestly didn't know where to look except for journalctl -b | grep tundra :

مارس 24 15:28:24 zbook-g3 moe.tundra.Tundra.desktop[22729]: 2024-03-24 15:28:24 [INFO] [tundra::clients::oauth2_helper] Trying to start listening on addresses: [127.0.0.1:12177, 127.0.0.1:13326, 127.0.0.1:16474, 127.0.0.1:22626, 127.0.0.1:22823, 127.0.0.1:29728, 127.0.0.1:32600, 127.0.0.1:41100, 127.0.0.1:45186, 127.0.0.1:63355]
مارس 24 15:28:24 zbook-g3 moe.tundra.Tundra.desktop[22729]: 2024-03-24 15:28:24 [INFO] [tundra::clients::oauth2_helper] Server running on port 12177
مارس 24 15:28:24 zbook-g3 moe.tundra.Tundra.desktop[22729]: 2024-03-24 15:28:24 [INFO] [tundra::clients::oauth2_helper] OAuth2 code receiver server is running
مارس 24 15:28:24 zbook-g3 moe.tundra.Tundra.desktop[22729]: 2024-03-24 15:28:24 [INFO] [tundra::gtk_gui] Authentication URL: https://myanimelist.net/v1/oauth2/authorize?response_type=code&client_id=61c9c7ae268592c2bbe6196c4c1d8aea&state=srMSWwch9H4LYHVRIW-1uQ&code_challenge=XXgx2G6_TwTQjYEqiOZue09zCMOOIFambVW4JUsb2Fs&code_challenge_method=plain&redirect_uri=http%3A%2F%2F127.0.0.1%3A12177
مارس 24 15:28:31 zbook-g3 moe.tundra.Tundra.desktop[22729]: 2024-03-24 15:28:31 [INFO] [tundra::clients::oauth2_helper] OAuth2 code receiver server has been stopped

note:
systemd[1166]: Started app-flatpak-moe.tundra.Tundra-16908.scope.
is omitted
if I should look for other info , guide me to do so

very basic system info(in form of uname -a

Linux zbook-g3 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

thanks in advance

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.