Skip to content

Commit

Permalink
Add flag for force_set_played due to double trakt play issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwalton3 committed May 15, 2022
1 parent 0396789 commit d0fc03f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ Other miscellaneous configuration options. You probably won't have to change the
- `lang_filter_audio` - Apply the language filter to audio selection. Default: `False`
- `screenshot_dir` - Sets where screenshots go.
- Default is the desktop on Windows and unset (current directory) on other platforms.
- `force_set_played` - This forcibly sets items as played when MPV playback finished.
- If you have files with malformed timestamps that don't get marked as played, enable this.

### MPV Configuration

Expand Down
1 change: 1 addition & 0 deletions jellyfin_mpv_shim/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class Settings(SettingsBase):
lang_filter: str = "und,eng,jpn,mis,mul,zxx"
lang_filter_sub: bool = False
lang_filter_audio: bool = False
force_set_played: bool = False
screenshot_dir: Optional[str] = get_default_sdir()

def __get_file(self, path: str, mode: str = "r", create: bool = True):
Expand Down
3 changes: 2 additions & 1 deletion jellyfin_mpv_shim/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,8 @@ def finished_callback(self, has_lock: bool):
self.pause_ignore = False
return

self._video.set_played()
if settings.force_set_played:
self._video.set_played()
if self._video.parent.has_next and settings.auto_play:
if has_lock:
log.debug("PlayerManager::finished_callback starting next episode")
Expand Down

0 comments on commit d0fc03f

Please sign in to comment.