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

Last Watched Identifier #1492

Draft
wants to merge 4 commits into
base: nightly
Choose a base branch
from

Conversation

herby2212
Copy link
Contributor

@herby2212 herby2212 commented Aug 21, 2021

Description

Addition of an option to have the season and episode number listed for episodes in the Last Watched card on the home page.
This feature can be turned on/off in the settings. (enabled by default)

This feature is based on the issue #1490.

Screenshot

tautulli recently watched episode number
tautulli last watched identifier

Type of Change

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods

@JonnyWong16
Copy link
Contributor

I'm not sure I like the look of the S00E00 on the card there. And I don't think a new setting is necessary.

Also, this should be done in the UI (mako template) and not modifying the server side (python).

@herby2212
Copy link
Contributor Author

herby2212 commented Aug 25, 2021

I'm not sure I like the look of the S00E00 on the card there. And I don't think a new setting is necessary.

Also, this should be done in the UI (mako template) and not modifying the server side (python).

I implemented the setting so people can choose if they just want the longer clean name of the episode (like it is currently) or more informations by enabling this setting. It could be disabled by default if this is a pain point for you so only users actively seeking this function can activate it.
With this in mind I think it fits quite well at this point in the settings and it is better to give the user the option.

Thanks for the notice regarding the mako template. I looked at the documentation and will push a commit which transfers all logic to the templace. It would be great if you could have a look over it.

@JonnyWong16
Copy link
Contributor

Maybe because it's not consistent between movies and TV shows. There is a blank in that spot when it's a movie. What if it is filled in with the movie year? But then it's still not uniform across all rows.

There's also considerations for TV shows with custom season titles (f92ba45) or date-based TV shows (#1487) that don't use the S00E00 format (although nothing else in the UI accounts for date-based shows yet).

plexpy/config.py Outdated Show resolved Hide resolved
plexpy/datafactory.py Outdated Show resolved Hide resolved
data/interfaces/default/home_stats.html Show resolved Hide resolved
@herby2212
Copy link
Contributor Author

herby2212 commented Aug 25, 2021

Maybe because it's not consistent between movies and TV shows. There is a blank in that spot when it's a movie. What if it is filled in with the movie year? But then it's still not uniform across all rows.

There's also considerations for TV shows with custom season titles (f92ba45) or date-based TV shows (#1487) that don't use the S00E00 format (although nothing else in the UI accounts for date-based shows yet).

If a user activates this option to get more details about the series item I wouldn't add informations (like the year at a movie) just to fill the space. It may look inconsistent, but cleaner in my opinion.

I just tested the case with custom season titles and it will just show the index (which should give the user still a rough estimate about which season the media item is in) and I believe it should stay that way for now. A custom season title would be to long for this value field.

If date-based TV shows are coming this along other points would probably need to be re-visited. Currently I think a date-based identifier would still fit with a syntax something like S2021·11.8.21, but I would leave this topic for now regarding this PR.
Though I would be open to support you at this topic if you want.

I cleaned up the spots pointed out and will re-request a review.

@herby2212
Copy link
Contributor Author

@JonnyWong16 I looked at the issue with the missing episode number mentioned in #1487.
The index field in the xml of date based tv show elements is missing. I was thinking about the originallyAvailableAt field as alternative episode identifier. As this should always match the episode name/identifier.
From a UI perspective it could be checked if there is no index present and the library uses the new Plex TV Agent (as the older ones doesn't support this feature IIRC). The formatting could be done in a similar fashion to Plex.
I hope this helps as I don't know what the current status on this topic is from your site.

A picture for reference:
date based tv show sessions xml

@JonnyWong16
Copy link
Contributor

Yeah, I already know that. It's just a lot of places in the UI that need to change.

@herby2212
Copy link
Contributor Author

Yeah, I already know that. It's just a lot of places in the UI that need to change.

If you agree on the originallyAvailableAt I would open up a PR and start working on this.

@JonnyWong16
Copy link
Contributor

Yes, originallyAvailableAt is correct when episodes don't have an index. Please use ISO date format YYYY-MM-DD because Tautulli doesn't have date localization.

@herby2212 herby2212 marked this pull request as draft September 7, 2021 17:07
@herby2212
Copy link
Contributor Author

Marked as draft until Pull Request #1503 is done and merged.

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

Successfully merging this pull request may close these issues.

None yet

2 participants