Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show mark unplayed even if video in progress #228

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/windows/episodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,11 @@ def optionsButtonClicked(self, from_item=False):
if len(mli.dataSource.media) > 1:
options.append({'key': 'play_version', 'display': T(32451, 'Play Version...')})

if mli.dataSource.isWatched and not mli.dataSource.viewOffset.asInt():
options.append({'key': 'mark_unwatched', 'display': T(32318, 'Mark Unplayed')})
else:
inProgress = mli.dataSource.viewOffset.asInt()
if not mli.dataSource.isWatched or inProgress:
options.append({'key': 'mark_watched', 'display': T(32319, 'Mark Played')})
if mli.dataSource.isWatched or inProgress:
Copy link
Contributor

@ruuk ruuk Jul 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be an else:

The correct behavior for an item that is unplayed or played but in progress is to mark watched - otherwise mark unwatched.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm no, that's what this PR is about. PlexWeb now shows both Mark Played/Unplayed for in progress items (which makes sense).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and it's always bugged me that that wasn't the case before)

options.append({'key': 'mark_unwatched', 'display': T(32318, 'Mark Unplayed')})

# if True:
# options.append({'key': 'add_to_playlist', 'display': '[COLOR FF808080]Add To Playlist[/COLOR]'})
Expand Down
7 changes: 4 additions & 3 deletions lib/windows/preplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,11 @@ def optionsButtonClicked(self):
if len(self.video.media) > 1:
options.append({'key': 'play_version', 'display': T(32451, 'Play Version...')})

if self.video.isWatched and not self.video.viewOffset.asInt():
options.append({'key': 'mark_unwatched', 'display': T(32318, 'Mark Unplayed')})
else:
inProgress = self.video.viewOffset.asInt()
if not self.video.isWatched or inProgress:
options.append({'key': 'mark_watched', 'display': T(32319, 'Mark Played')})
if self.video.isWatched or inProgress:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

options.append({'key': 'mark_unwatched', 'display': T(32318, 'Mark Unplayed')})

options.append(dropdown.SEPARATOR)

Expand Down