MaximeWack / seriestracker

A series tracker for emacs
GNU General Public License v3.0
20 stars 2 forks source link

Episode information #2

Closed danielfleischer closed 2 years ago

danielfleischer commented 2 years ago

Fetching from TVMaze, you can now see a short plot summary or a frame snapshot for any episode; press i to get a menu.

MaximeWack commented 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:

danielfleischer commented 2 years ago

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.

danielfleischer commented 2 years ago

Committed some changes including:

  1. JSON fetching and parsing is now done in a single function.
  2. Using seriestracker--with-episode binding, as you suggested.
  3. Removed the transient code; now pressing i opens a buffer with episode description and an image as depicted below.
Screen Shot 2022-05-01 at 9 16 37

As to moving to another API provider, it's up to you; querying the episode data is really fast.

MaximeWack commented 2 years ago

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!

danielfleischer commented 2 years ago

Thank you, sounds good.