Closed Robbot closed 1 year ago
I think it is, I am not sure how they implement that features but I guess they use: https://trakt.docs.apiary.io/#reference/shows/collection-progress/get-show-collection-progress
Sorry I didn't see your message earlier :/
Yes thats a nice feature i want that also.
Another request for this :) would be awesome.
(Correcte me if I am wrong) The problem is that the feature is not built in on trakt. I will try to reproduce it using a best effort approach but I am not sure the algorithm behind it since I don't use it myself. Can you tell me exactly what up to next gives you ?
Sorry for confusing you. The feature which I thought about is just the "Progress". You can find it here https://trakt.tv/users/{your_username}/progress
Interesting, I didn't find it on Apiary: https://trakt.docs.apiary.io/#reference/users/. Thank you for the route I will check this ASAP.
I think you have to look at this: https://trakt.docs.apiary.io/#reference/shows/watched-progress/get-show-watched-progress
The issue is that I have to give a show id but which show should I select with this route ?
Maybe you can create a list with Get Watchlist
Hey there! Any update on this request? I'd love to display that in my homeassistant dashboard. I took a look at @SBerg1980 suggestion, and indeed, get watchlist, iterate on each shows to use the id and get the "next_episode" would be the best approach :) Thanks a lot for your work!
According to https://trakt.docs.apiary.io/#reference/lists/list-items/get-items-on-a-list, I still don't know how to get watchlist :/.
With this api: https://api.trakt.tv/lists/*****/items/show U have to use your Client ID:
And on you have to fill in your list id you have to make your list public, you can find it when you share the list en copy the link: example: https://trakt.tv/lists/
So, if I understand correctly, the idea will be to use:
https://trakt.docs.apiary.io/#reference/sync/get-watchlist/get-watchlist (a GET on https://api.trakt.tv/sync/watchlist/shows
)
then iterate on each shows and use the trakt id to call https://trakt.docs.apiary.io/#reference/shows/watched-progress/get-show-watched-progress (https://api.trakt.tv/shows/<the id from the loop>/progress/watched
), you should have access to next_episode
and integrate that with your current code
Is it helpful?
@dylandoamaral I've a branch ready for you to test, and improve, because I can't figure out why I can't have "past" episodes showing up in the upcoming-media-card BUT I'm able to retrieve the collection progress. I don't have permission to push that branch, could you help on that?
You have to fork this project and create a pull request. I am sorry I am a bit busy these days.
@dylandoamaral ok, perfect! In the meantime I managed to make it work perfectly, so I'll try to do the fork and the pr later today or tonight. Hopefully it will also work on your side ^^
As soon as you add the PR I will try my best to review it and test it as fast as possible. Thank you for your contribution !
Thanks in advanced that sounds good.
@Anrolosia how can i test your fork, i have downloaded it and put it on my home assistant, do i have to make a change in my configuration.yaml
@SBerg1980 with the latest commit, just add a new sensor "next_to_watch" in your configuration.yaml file
trakt_tv:
language: fr # Prefered language for movie/show title
timezone: America/Montreal
sensors:
next_to_watch:
show:
max_medias: 40
trakt_tv: language: fr # Prefered language for movie/show title timezone: America/Montreal sensors: next_to_watch: show: max_medias: 40
Thanks i will give it a try And it works you are amazing
Morning @dylandoamaral and @SBerg1980 , I pushed a new commit to give user ability to filter out some shows (old tv show, never finished, etc.) by adding a new key (exclude
) in configuration.yml. This key will contain an array of slugs from trakt.tv website. Let me know if you think it could be helpful :)
trakt_tv:
language: fr # Prefered language for movie/show title
timezone: America/Montreal
sensors:
next_to_watch:
show:
max_medias: 40
exclude:
- veep
- the-original
- the-real-l-word
That's a good addition. I'm curious when @dylandoamaral updates his Github I have it installed from yours now.
For the key exclude, the issue is for the user to know what exactly they have to put for a particular show.
For the key exclude, the issue is for the user to know what exactly they have to put for a particular show.
I went with the simplest way => go on trakt.tv, search for a show, clic on it, notice the url slug, copy/paste it. So, if I want to hide "Friends", I'll do the steps mentioned above, then land on https://trakt.tv/shows/friends, I'll just have to copy/paste the last part, friends, that's it
I know I ask you a lot but can you also update the README in your PR and add this tips to retrieve the slug ?
I know I ask you a lot but can you also update the README in your PR and add this tips to retrieve the slug ?
Will do!
I pushed a commit to fix your comments @dylandoamaral and add info to the README file, let me know if it's ok
Thank again @Anrolosia, the version 0.5.0 close the issue.
Anytime, it was a pleasure to help (it was actually my first contribution to a HA plugin ^^) Continue your hard work and thanks again for this awesome plugin!
Thanks for the great work.
@dylandoamaral - thank you for this awesome update! It is very useful for me.
One suggestion. I am not sure if I should open new topic. Is it possible to include only already aired episodes? Or otherwise, to exclude future airdates. No need to have future premieres in next_to_watch. I think, for that there is sensor upcoming premieres. Thank you!
If @dylandoamaral is ok with me doing it, I could try to do it tomorrow and submit a PR for him to review. Cheers,
Yes you can do it if you want !
@Anrolosia As you see, I did not read whole discussion properly. Also thank you very much!
Maybe we should add an option because I guess some people also want future aired date ?
Hey! A new sensor you mean? Because I already did the option yesterday (you've an open PR). I added an option only_aired
which is a boolean
Hey @dylandoamaral , just check in here, is there any issue with the PR? Thanks
No I am sorry I just didn't see the PR, it is merged thank you !
Any chance to add trakt’s " Up next to watch" to this integration?