Releases: iamkroot/trakt-scrobbler
Preview and fast pause functionality
New modes
This release adds new logic to the monitors to allow two new modes:
Preview mode
When the file being played starts with >80% progress, it usually means the file has been played/finished previously and because the player supports "save progress at exit" functionality, we resumed at that point. In such cases, we don't want the scrobble to happen, and in the previous version, this would lead to duplicate "watched" media on trakt.
New behaviour
Now, if the monitor notices that a file has started at >80%, it will enter a "preview" mode. This lasts for 60 seconds by default (can be configured using players.preview_duration
config parameter), and at the end of this, if the same file is still being played, it'll scrobble "start" and continue as if it is a normal session (all later scrobbles will happen instantly). However, if it detects that the media is changed within these 60 seconds, it'll assume that you didn't really want to watch it, and no scrobbles will be sent to trakt at all.
Configuration changes
Added:
players.preview_threshold
: min progress (in %) at which file should be opened for preview mode to get triggered. Default: 80players.preview_duration
: in seconds. How long the monitor should wait before sending scrobbles. Default: 60
Disabling
In case you want to disable this new behaviour, set the players.preview_threshold
config param to 100
. This way, the preview mode will never be triggered.
Fast pause mode
This feature is mainly for mpv, and other players where we get instant media events (as opposed to VLC, Plex and MPC-HC where we poll for events every 10 seconds). The step-forward
command in mpv allows the user to step through the media keyframes one-by-one. At every such event, mpv sends a 'play', immediately followed by 'pause' events, and this happens every time step-forward
is invoked. Previously the monitor was dumb, and would scrobble each of these events immediately, causing lots of unnecessary API requests to trakt.
New behaviour
Now, if the monitor notices that the player sent a 'play' followed by 'pause' within 1 second, it will scrobble this pause, and enter the "fast pause" mode. If the monitor gets a new 'play' event in this mode, it will wait for 5 seconds before scrobbling it. In those 5 seconds, if the player again sends a 'pause' (meaning the user invoked step-forward
once), it will nullify the earlier 'play' and the monitor won't scrobble anything. To exit the mode, the 'play' event has to last for >5 seconds (or you can always stop the file).
Configuration changes
Added:
players.fast_pause_threshold
: in seconds. Max time elapsed between a "play->pause" transition for fast pause mode to get triggered. Default: 1players.fast_pause_duration
: in seconds. How long the monitor should wait before sending scrobbles. Default: 5
Disabling
To disable this behaviour, set the players.fast_pause_threshold
config param to 0. This will cause the fast pause mode to never get triggered (assuming time never runs backward 😉).
Other changes
- Add timeouts to Trakt API requests, to handle cases when the server takes too long to respond. Should be mostly invisible to the user.
- #93 Fix incorrect season number for special eps (S00 format)
- Add
backlog purge
command to delete the backlog, without trying to sync with Trakt.
Installation
Since this is a beta version, to install this pre-release, use pipx upgrade --pip-args="--pre" trakt-scrobbler
Bug fixes
User filter for Plex
See #80.
Minor fixes
- Better error handling for updatable notifications in Linux
- More robust trakt token refresh flow
- Fix #82: Apply guess cleanup to media info from Plex
Stable Release
-
The installation method has been revamped to use python packaging instead of a homegrown install script, which was getting difficult to manage.
-
The
trakts
command allows the user to easily query and configure the scrobbler from the terminal. -
Lots of minor QoL improvements!