Skip to content

Conversation

@sudoAlphaX
Copy link

@sudoAlphaX sudoAlphaX commented Jun 23, 2025

  • add autoplay mode handling in cli and in config
  • call new signal "finish" when player is closed after an "update"
  • handle the new finish signal in engine
  • add autoplay functionality in engine
  • add support for "finished" hook

Add new feature to autoplay next episode.

Testing and working for MPRIS and lsof. I couldn't get inotify based tracker to work at all, so i couldnt test that.

Inspiration

I've always wanted to use trackma to be my only anime watching app (as I download almost all of my anime using ani-cli, but also have an ani-cli hook in trackma, so I never really have a reason to not use it). But my only pain point is that it does not autoplay next episode, which is not helpful for "binging".

Of course I can use autoload.lua script for mpv, but I wanted a feature in trackma itself.

Working

I added a new signal called "finish". It is triggered whenever a player is closed after successfully watching an episode, i.e. when the player is open for atleast "tracker_update_wait_s" seconds.

Then I've added a new option called "autoplay_next" (defaults to false), which can be toggled at runtime.

The engine reacts to this signal, and plays the episode + 1 after checking runtime autoplay_next

Also added hook support for this finish signal.

TODO

The autoplay toggle is not yet ready for qt, gtk and curses interfaces. It is currently only available for the cli interface.

I prefer to have something like a switch in the interfaces below the play button (in the home page) to toggle autoplay on and off.

I do not know how to do this in the interfaces, I will need to look that up. In the meantime, if anyone is willing to help, it would be great.

Please let me know if i need to change anything in the code, or if you have any suggestions.

Created a new signal called "finish" which is called whenever a player
is closed (tested with mpris) whenever an update is due. This means if
an episode is just completed and it is needed to be updated, this signal
is called when that player is closed.

Intended to be used as a "episode completed" indicator for various uses
like autoplaying next episode
@sudoAlphaX
Copy link
Author

bump :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant