elgatito / plugin.video.elementum

Elementum add-on for Kodi. Development of this addon has been stopped!
http://elementum.surge.sh
MIT License
484 stars 159 forks source link

[Request] Trakt Progress page #46

Closed hoshsadiq closed 6 years ago

hoshsadiq commented 6 years ago

On Trakt you have a TV show progress section (https://trakt.tv/users/<user>/progress/watched/activity) that tells you what the next episode of your unfinished shows is. Would be cool to have this. I think this has already been implemented in this PR: https://github.com/scakemyer/quasar/pull/40 but I imagine some changes will be required as I've seen some major refactoring in elementum.

burekas7 commented 6 years ago

But look on my comments here: https://github.com/scakemyer/plugin.video.quasar/issues/580

The best implement of this category is in SALTS.

hoshsadiq commented 6 years ago

I saw that thread too. Regarding the difference you asked about on that thread. On the trakt website by the default shows by default shows all shows. Including the ones you have finished etc. It's possible to filter these out. I'm not sure how salts works, but in Exodus, shows that you were up to date on (i.e. next episode is in the future or there is no next episode), it would filter them out. Otherwise the show was shown, and if you opened it, it would list all next shows to watch. If after the next episode to watch, there were more episodes and they were not aired yet, they would be greyed out. I think that's more than enough usability.

hoshsadiq commented 6 years ago

Actually, I think you're mistaking this feature request with what was already implemented. The PR I linked to is what you were asking for.

elgatito commented 6 years ago

You are welcome to try 0.0.35 with Progress page.

hoshsadiq commented 6 years ago

When I go to TV Shows > Trakt, the following notification comes up:

<bold>Elementum</bold>
Not Found

kodi.log

elgatito commented 6 years ago

Oh. You have cached list. Can delete cache.db or wait

burekas7 commented 6 years ago

Thanks @elgatito ! When I asked for it in Quasar, he didn't implement it well.

But I have some improvement requests (Regarding the SALTS addon that also implemented it):

  1. Colorize the air date and the aired/not aired episode title in different color for distinction will be nice also. For example:
    • This is how it shown in Elementum: progresselementum
  1. Add an options (In the Settings) for sorting this progress list:

    • By Date
    • By Title (Name)
    • Recently collected
  2. Add an option (In the Settings) for setting the date format as you like (For example: %d-%m-%y or %y-%m-%d)

Bug?

Thanks.

hoshsadiq commented 6 years ago

Great! It works. Life will be much better with this. Thank you so much!

I think one other cool thing would be to separate episodes into a new page. I.e. when going into Progress, you see each individual show on your progress list, and what the next episode would be. Then when you click it, it shows a list of all the unwatched episodes. The video in "new episodes" is good enough IMO.

hoshsadiq commented 6 years ago

By the way, I'm happy to help with stuff, however, I need some guidance on setting up a dev environment as I mentioned in #48

burekas7 commented 6 years ago

@hoshsadiq I think it's good as it now, all the 'next episodes' in the same page. If you want to see all the next episodes separated by TV shows just go to your collection. 'Progress' should show only the next episode for each TV Show.

elgatito commented 6 years ago

I think one other cool thing would be to separate episodes into a new page. I.e. when going into Progress, you see each individual show on your progress list, and what the next episode would be. Then when you click it, it shows a list of all the unwatched episodes. The video in "new episodes" is good enough IMO.

You can open "History" page, which shows the same order of the same shows, which you can enter and select the episode and so on.

elgatito commented 6 years ago

By the way, I'm happy to help with stuff, however, I need some guidance on setting up a dev environment as I mentioned in #48

I remember. I will make some docs when I finish with basic stuff and it becomes more stable.

elgatito commented 6 years ago

Colorize the air date and the aired/not aired episode title in different color for distinction will be nice also.

I will not color anything. People have different skins and colors. Forcing colors is a bad idea. I don't like the idea of coloring anything in the lists at all.

Add an options (In the Settings) for sorting this progress list

We get list of shows from Trakt sorted by "last watched". Custom sorting of items is done by Kodi, not the plugin.

Why in Elementum it doesn't take the episode's name like it does in SALTS image? "Episode 1" instead of "Eden".

We get information about names from TMDB. You can edit information there, it's open for changes.

burekas7 commented 6 years ago
elgatito commented 6 years ago

What is the purpose actually of this setting: "Use Trakt information if available"?

Use original Trakt movies/episodes when browsing Trakt lists, by default we always use TMDB for information.

burekas7 commented 6 years ago

Use original Trakt movies/episodes when browsing Trakt lists, by default we always use TMDB for information.

I have enabled it, but the info is still taken from TMDB instead of Trakt. The episode name in 'Progress' (Trakt) is still "Episode 1" instead of "Eden", also the thumbnails, fanart and dates are not from Trakt.

hoshsadiq commented 6 years ago

Both history and collections is not what I'm looking for, the way I've described it earlier (listening only the shows, then going into episodes) is how Kodi acts, hence why imo it should be a seamless experience.. Progress is meant to hide everything that you've already fully watched. I've realised today that this is not the case. It shows future episodes.

burekas7 commented 6 years ago

I think instead of "Progress", it should be called "My next episodes".

@hoshsadiq He implemented exactly what you said on your first comment, and it also like what I wanted. I also don't understand what do you mean. Why do you need the lone way of TV show and then the episode? Why do not see all the next episodes in one place (page) like here? which is better.

hoshsadiq commented 6 years ago

Because you're not necessarily up to date with the shows. If you have a show that is on season 2 episode 5 for example, and you've only seen season 1, you've got 5 episodes left. The way it's implemented, you watch an episode, then you have to wait for it to refresh (which actually, oddly takes longer than all other menus) then you can watch the next episode.

2 more things IMO the list should be ordered by airdate of the next episode you're meant to watch. Finally, I'm confused why future episodes should be included in the list. You can't do anything with them since they won't be out yet, so why have it in the list?

elgatito commented 6 years ago

Progress is meant to hide everything that you've already fully watched.

You don't see a show when there is no unwatched episode in the queue.

IMO the list should be ordered by airdate of the next episode you're meant to watch.

No. If you want to start watching old show - you won't see it in the list because air date was too long ago. Other side you want to watch new show - you will see only old shows with earlier air dates. I like the way it's on Trakt, and did the same way in Elementum. If you want some show - you see the next episode there in the first place, then goes the second-watched show and so on. I don't see any reason why I want to see list of watched shows but not wanting the next episode of that show.

If you want to see list of episodes on the show - it's what Kodi does for you in the library.

burekas7 commented 6 years ago

I'm also agree with @elgatito , the content of this list is correct and this is how it should be. It's ok to see unaired episodes also in this list, this is one of the advantages here, on this way you also know when your tv show comes from a break or renew.

One thing I agree is about the sorting issue as I mentioned before, It should be sorted by air date by default. It can has other option of sorting like this:

And I think it's important and would be nice to mention the air date in the start of the title, because all the point in this list is to see the air dates.

Thanks.

hoshsadiq commented 6 years ago

You don't see a show when there is no unwatched episode in the queue.

Sorry, I think you misunderstood me, the next sentence was part of it too. It seems that episodes that are not aired yet (but are listed on trakt as a future episode), are also listed in progress. For example, I have The Flash in my watch list, which currently I'm up to date on. Last episode aired was 4x11, which aired on Jan 24. When I go to progress, it shows The Flash with next episode being 4x11. Now I watched that episode yesterday, and now it shows 4x12, which hasn't been aired yet (airs tomorrow), and is therefore not possible to watch. These should be filtered out from the list.

hoshsadiq commented 6 years ago

I just looked at the docs for that endpoint. The documentation says:

Note: Only aired episodes are used to calculate progress. Episodes in the future or without an air date are ignored.

However, when doing the request I get the following:

$ curl --header "Content-Type: application/json" --header "Authorization: Bearer <bearer token>" --header "trakt-api-version: 2" --header "trakt-api-key:  <api-key>" 'https://api.trakt.tv/shows/the-flash-2014/progress/watched?extended=full' | jq
{
  "aired": 80,
  "completed": 80,
  "last_watched_at": "2018-01-25T23:57:26.000Z",
  "seasons": [
    ...
    {
      "number": 4,
      "aired": 11,
      "completed": 11,
      "episodes": [
        ...
        {
          "number": 10,
          "completed": true,
          "last_watched_at": "2018-01-17T20:57:15.000Z"
        },
        {
          "number": 11,
          "completed": true,
          "last_watched_at": "2018-01-25T23:57:26.000Z"
        }
      ]
    }
  ],
  "hidden_seasons": [],
  "next_episode": {
    "season": 4,
    "number": 12,
    "title": "Honey, I Shrunk Team Flash",
    "ids": {...},
    "number_abs": 81,
    "overview": "...",
    "rating": 7.53846,
    "votes": 13,
    "comment_count": 1,
    "first_aired": "2018-01-31T01:00:00.000Z",
    "updated_at": "2018-01-30T18:29:38.000Z",
    "available_translations": [...],
    "runtime": 44
  },
  "last_episode": {
    "season": 4,
    "number": 11,
    "title": "The Elongated Knight Rises",
    "ids": {...},
    "number_abs": 80,
    "overview": "...",
    "rating": 7.68019,
    "votes": 1676,
    "comment_count": 8,
    "first_aired": "2018-01-24T01:00:00.000Z",
    "updated_at": "2018-01-30T20:15:16.000Z",
    "available_translations": [...],
    "runtime": 42
  }
}

with the following headers

HTTP/2 200
date: Tue, 30 Jan 2018 20:50:20 GMT
content-type: application/json; charset=utf-8
last-modified: Thu, 25 Jan 2018 23:57:26 GMT

Based on the docs, next_episode should be null, as next_episode.first_aired is in the future (based on date in the headers).

This explains my previous comment. I'm trying to find a place where I can report this as a bug to see if their devs can look into it.

burekas7 commented 6 years ago

which hasn't been aired yet (airs tomorrow), and is therefore not possible to watch. These should be filtered out from the list.

I don't think so. It's good to know in this list also if there are future episodes and their air dates. There is a date info attached to each item so you should know if you can play it or not. If it so annoying you, he can add a new setting in the settings to filter out the unaired episodes. But I think it's necessary that they are also there.

This is an a example of the settings in SALTS addon regarding the My Next Episode feature ('Progress' here) salts

elgatito commented 6 years ago

Based on the docs, next_episode should be null, as next_episode.first_aired is in the future (based on date in the headers).

Yes, it should have been set to null. I will add a check there to skip those items.

This explains my previous comment. I'm trying to find a place where I can report this as a bug to see if their devs can look into it.

Not sure where to report. There is a Google+ community for Trakt API, but not sure if that is the right place.

Still it's so much slow, you need to get list of shows, then request each show and only after that you know how much of them have available episodes. One more thing is that Trakt can have empty TMDB link or link to wrong TMDB item, so we fetch the show and it does not exist and we skip it's output, so the list is again broken (not filling right number of items).

burekas7 commented 6 years ago

For me it's not a bug so I hope they won't fix that :) There are some people like me that wants to know also about future episodes and their airdates, instead of checking all the time all kind of sites with TV Shows renew/cancel lists.

hoshsadiq commented 6 years ago

@elgatito So I got a reply:

Next episode will be populated, even if it airs in the future. The note in the docs is saying that only aired episodes are used in the progress count and calculations. next_episode is just for informational use in your app and isn't related to the calculations. In this case, you've watched 100%, so next_episode would show the next episode in the future (as long as we have that info) so you know there will be something to watch.


I will add a check there to skip those items.

Thanks. This is very helpful.

Still it's so much slow, you need to get list of shows, then request each show and only after that you know how much of them have available episodes.

Agreed. I am happy to contact the devs and request this endpoint if you'd like. It would be nice to improve the speed of this page.

Lastly, apparently the G+ community you mentioned before is the right place for such questions. I've asked if it makes more sense to have a Github community.

burekas7 commented 6 years ago

@elgatito

Yes, it should have been set to null. I will add a check there to skip those items.

Can you add it as an option in the Settings? Because there are some other that want it as it's working now (Without skip those items)

hoshsadiq commented 6 years ago

@burekas7 maybe I'm misunderstanding your use case, but going to TV Shows > Calendars > My Shows, shows you all episodes that are upcoming in much the same way as the progress page. Is this perhaps what you're looking for?

burekas7 commented 6 years ago

@hoshsadiq No. This path shows me only one episode there, this is what was done wrong in Quasar. He didn't implement what I meant. Basically, Calendar shows the next episode that currently should be aired but not your next episodes. So TV Shows that not active right now won't be shown in this category.

Here in 'Progress' is exactly what I meant to (Like it is done in SALTS addon and calls there as 'My Next Episode'), when it shows all the next/future episodes of TV Shows that you are watching (Those that already aired and those that still not aired yet but has future air date). I don't know why it called here 'Progress', it should be called 'My next episodes'.

In SALTS by the way, as I show here, there is an option in their settings for filter out these unaired episodes, like what you need I guess.

elgatito commented 6 years ago

I will add a check there to skip those items. Thanks. This is very helpful.

I have used the existing "show unaired episodes" options to influence listing episodes in Progress with "Aired" being after now.

I would be fast if we just use paging and split to usual number per page. But. We are checking each trakt show with TMDB database and some items should be dropped off the list, then we check episode, which also can be not in the TMDB database, and then it can be in the future, so also drop off, so you see you are getting less then required items per page. If it's the first page - it's fine, if not first - it's too ugly.
Bad we can't get multiple episodes/shows/movies by one request :)

hoshsadiq commented 6 years ago

@elgatito I made a feature request on their G+ page: https://plus.google.com/104974452270599315078/posts/QpHJJ7y7n3t

elgatito commented 6 years ago

@hoshsadiq I have totally loose the point of this issue.

Can you describe how you see the desired progress page and what should be there? Now it's the same as Trakt's Progress page where you see Next episodes for each show that you watch, sorted by last watched time in descending order. ( https://trakt.tv/users/username/progress )

hoshsadiq commented 6 years ago

Yes, sorry, so I think I neglected to mention that I always have the below filter on. I think adding the additional airdate as @burekas7 mentioned, and hiding the items that have future airdates (possibly through an option considering there are people who want them in the list) is what my I had in mind. Having those two imo would be enough for this issue to be closed

image

elgatito commented 6 years ago

Changes in v0.0.54:

Closing this one. Let it be a separate issue if there is something else to do with the progress page.