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

Add support for TV Shows #1

Closed
z-vap opened this issue Feb 16, 2021 · 8 comments
Closed

Add support for TV Shows #1

z-vap opened this issue Feb 16, 2021 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@z-vap
Copy link

z-vap commented Feb 16, 2021

I would love if there was support added for television shows. Airdate and DVD order choices. Thanks for a great tool

@fracpete fracpete self-assigned this Feb 19, 2021
@fracpete fracpete added the enhancement New feature or request label Feb 19, 2021
@fracpete
Copy link
Owner

fracpete commented Nov 6, 2021

NFO for episodes:
https://kodi.wiki/view/NFO_files/Episodes

The Expanse URL:
https://www.imdb.com/title/tt3230854/

Whether episodes are available: <a href="episodes/?ref_=tt_ov_epl" ...

The URL for overview of seasons (append /episodes/ to URL):
https://www.imdb.com/title/tt3230854/episodes/
The season numbers are available from select with id bySeason

The URL for season 1:
https://www.imdb.com/title/tt3230854/episodes?season=1

Details:

  • The div element with class="info" itemprop="episodes" encapsulates the episode information and links.
  • <meta itemprop="episodeNumber" content="1"/> contains the episode number (i.e., content).
  • <a href="/title/tt3982200/?ref_=ttep_ep1" title="Dulcinea" itemprop="name">Dulcinea</a> contains link to episode and name of episode.
  • <div class="airdate"> encapsulates air date (DD MMM. YYYY).
  • <div class="item_description" itemprop="description"> contains the episode description.
  • <span class="ipl-rating-star__rating"> contains rating value.
  • <span class="ipl-rating-star__total-votes"> contains number of votes.

Example XML:

<episodedetails>
  <title>Dulcinea</title>
  <plot>In the asteroid belt near Saturn, James Holden and the crew of the ice freighter Canterbury, on its way to Ceres Station, investigate a distress call from an unknown derelict ship, the Scopuli.</plot>
  <uniqueid type="imdb" default="true">tt3982200</uniqueid>
  <aired>2015-11-23</aired>
  <season>1</season>  <!-- unused, only for info; kodi uses filename S01E01 -->
  <episode>1</episode>  <!-- unused, only for info; kodi uses filename S01E01 -->
  <ratings>
    <rating name="imdb" max="10" default="true">
       <value>7.7</value>
       <votes>4512</votes>
    </rating>
  </ratings>
</episodedetails>

@fracpete
Copy link
Owner

fracpete commented Nov 6, 2021

Added experimental support with 0edd4fb

@fracpete fracpete closed this as completed Nov 6, 2021
@IronBlood
Copy link

According to https://kodi.wiki/view/NFO_files/TV_shows

NFO files for TV Shows are a little bit more complex as they require the following NFO files:

  • One nfo file for the TV Show. This file holds the overall TV show information
  • One nfo file for each Episode. This file holds information specific to that episode

For one TV Show with 10 episodes, 11 nfo files are required.

An extra tvshow.nfo is needed, it looks like this

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tvshow>
    <title></title>
    <plot></plot>
    <userrating></userrating>
    <mpaa></mpaa>
    <uniqueid type="" default="true"></uniqueid>  <!-- add a value to type="" eg imdb, tmdb, home, sport, docu, see sample below -->
    <genre></genre>
    <premiered></premiered> <!-- yyyy-mm-dd -->
    <status></status>
    <studio></studio>
    <actor>
        <name></name>
        <role></role>
        <order></order>
        <thumb></thumb>
    </actor>
    <namedseason number="1"></namedseason>
</tvshow>

@IronBlood
Copy link

Sorry for another update, it took me a while to figure out how it works according to https://kodi.wiki/view/Naming_video_files/TV_shows

I guess the input and output should be like this:

Input

The imdb url or simply the id of the series, e.g. tt4786824 for The Crown (2016– ).

Output

The Crown (2016– )
├── Season 1
│   ├── The Crown (2016– ) S01E01.mkv
│   ├── The Crown (2016– ) S01E01.nfo
│   └── ......
├── Season 2
├── Season 3
├── Season 4
└── tvshow.nfo

Kodi has its critical way to ensure the scrapers can correctly identify the TV Show and its episodes, so the good news is that the output is almost predictable, but the bad news might be, we can't reuse the *.imdb files.

@fracpete
Copy link
Owner

Thanks for that. I don't use episode information myself. But we should be able to still use the *.imdb files, since we can tell from the website whether there are episodes present or not. That way we can simply toggle between movie/tv show output. Will look into it in the near future.

@fracpete fracpete reopened this Nov 25, 2021
@dejudicibus
Copy link

You developed a great project. Any plan to have TV series support? Just consider that folder structure is usually

SeriesName
|- Season01
|- Season02
|- Season03
...

@IronBlood
Copy link

@dejudicibus I wrote a commandline tool during the weekend, but haven't finished the README part. I'll put the source here https://github.com/IronBlood/kodi-tvshow-nfo-generator

@fracpete
Copy link
Owner

fracpete commented Jan 3, 2023

OK, that's taken me while to get back to, but it think commit b30b57b solves it now.

@fracpete fracpete closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants