Closed danielfleischer closed 2 years ago
Hi Daniel, thank you for your contribution!
Getting the plot summary is a feature I would have liked to integrate to the series search. This would have made it possible to differentiate between homonyms directly when adding a series.
However, I wasn't able to make it work across the zoo of completing-read
implementations, and having some kind of "detail view" available anyway seems like a good idea!
I have a few suggestions before accepting this PR:
seriestracker--getJSON
already to fetch and parse JSON from an url-buffer, please use it (although it would make sense to modify seriestracker--getJSON
to include the url retrieval, and fix the calling code accordingly)ideally, you should write the body of seriestracker--tvmaze-epsiode-data
wrapped in seriestracker--with-episode
, with all you let*
variables definitions in the lets
arg (see how it is used in seriestracker-remove
)
Tell me if these are acceptable changes to you, I'm happy to discuss!
Cheers,
Maxime
Hi Maxime, thanks for the thorough reply.
First I'll say that this feature is about episode specific summary and image. The need arose when I wasn't sure I've seen some episodes so I thought that a quick plot lookup will help me. episodate.com
didn't have episodes summaries but tvmaze.com
did. It's true, they use different IDs per shows but I feel like plot summary is a secondary goal and their search by name returns results by probability and it worked as expected on all the my shows.
Regarding the JSON parsing; I couldn't use your function, it didn't parse correctly so I wrote another one; definitely I can try to merge them to have a single function which works on both JSON outputs.
I used transient so to add just one key to the keymap instead of two but individual functions should be exposed.
Tvmaze offers plot summary and an image for the show as a whole and also offer airing times. We can move to this site for all the information in order to be consistent, but will have to change the code a bit since the results will have a somewhat different structure. Or we just query 2 APIs to get different pieces of information.
Committed some changes including:
seriestracker--with-episode
binding, as you suggested. i
opens a buffer with episode description and an image as depicted below. As to moving to another API provider, it's up to you; querying the episode data is really fast.
Hi Daniel, thanks for the contributions!
Sorry for the delay, I'm quite busy at the moment.
It looks like TVMaze could be a great source for everything, the fact that they use known identifiers (including the imdb id!) is nice, and licensing is CC-BY-SA.
However even though they know tvrage and thetvdb (that was used in the first dev version of this package ^^) as well as imdb, they don't seem to know episodate.
I'm willing to transition to TVMaze as a source, seeing as it brings some benefits, but I'm still wondering on how to go about it with users.
Two options:
We can start working on the conversion anyway, so I'm going to create a new TVMaze branch and accept the pull request as a starting point. I might not be able to contribute much for the next couple of months, but will be happy to review!
Thank you, sounds good.
Fetching from TVMaze, you can now see a short plot summary or a frame snapshot for any episode; press
i
to get a menu.