ShokoAnime / ShokoServer

Repository for Shoko Server.
http://shokoanime.com/shoko-server/
MIT License
389 stars 75 forks source link

Add Support for XBMC - Simple Support #7

Closed jmediamanager closed 8 years ago

jmediamanager commented 10 years ago

This issue is to add first stage (simple) support to XBMC. Which means creating NFO files and thumbnails

XBMC uses '.nfo' files for shows. such as 'tvshow.nfo' (kept in the parent folder of the show) and 'filename.nfo' (kept in the same directory and the episode). xbmc also uses 'filename.tbn' files for episode thumbnails (also kept in the same directory as the episode) If there was a way to export all of the current library to these individual files and an option so that when you get a new file then JMM server will automatically create the corresponding nfo and tbn file then the data could be read by xbmc.

xbmc also has http access which allows for notifications to be sent to it for example if an episode is downloaded and ready to watch it can get a notification and add it to the library.

jmediamanager commented 10 years ago

Example of tvshow.nfo http://kodi.wiki/view/NFO_files/TV_shows

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- created on 2014-05-31 16:16:03 - tinyMediaManager 2.5.5 -->
<tvshow>
    <title>Accel World</title>
    <sorttitle></sorttitle>
    <year>2012</year>
    <rating>7.27</rating>
    <votes>2401</votes>
    <plot>* Based on a light novel series by http://anidb.net/cr28670 [Kawahara Reki], with illustrations by HIMA. One autumn day in 2046, http://anidb.net/ch39512 [Haruyuki] has an encounter with http://anidb.net/ch37271 [Kuroyuki-hime], the prettiest girl in his school. For the middle school boy who is often bullied, the meeting changes his life. Through a mysterious piece of software she gave him, Haruyuki learns about the existence of the virtual Accel World. It was after that fateful encounter that Haruyuki of the lowest school caste becomes Burst Linker, a courageous knight defending a princess. Source: ANN [i]Note: The first two episodes received a pre-airing held in collaboration with various stores and webstreaming services. The first one took place at Gamers`s Akihabara head office in Tokyo on Friday, March 23, 2012. Others took place at Softmap Akihabara also on March 23, 2012, Animate Nipponbashi in Osaka on March 24, 2012 and Comic Toranoana in Nagoya on March 25, 2012. Attendance was limited to 400 people, 100 for each location, and participants were chosen through a post-card lottery held until Wednesday, March 7, 2012. Additional webcasts were streamed at Bandai Channel on March 26, 2012, at PlayStation Store between Wednesday, March 28 and Tuesday, April 3, 2012, at Warner on Demand between April 1 and April 2, 2012 and at Nico Nico Douga on April 2, 2012. Viewership was limited to 1000 accounts for all services except Nico Nico Douga, which was limited to 2000. The regular TV broadcast started on April 7, 2012. Note 2: The setting is the same as that of http://anidb.net/a8692 [Sword Art Online], another series by the http://anidb.net/cr28670 [same author].[/i]</plot>
    <mpaa>TV-14</mpaa>
    <episodeguide>
        <url cache="257516.xml">http://www.thetvdb.com/api/1D62F2F90030C444/series/257516/all/de.xml</url>
    </episodeguide>
    <id>257516</id>
    <genre>Anime</genre>
    <premiered>2012-03-23</premiered>
    <status></status>
    <studio></studio>
    <actor>
        <name>Misawa Sachika</name>
        <role>Kuroyuki Hime</role>
        <thumb>http://img7.anidb.net/pics/anime/23287.jpg</thumb>
    </actor>
    <actor>
        <name>Asanuma Shintarou</name>
        <role>Mayuzumi Takumu</role>
        <thumb>http://img7.anidb.net/pics/anime/80605.jpg</thumb>
    </actor>
</tvshow>
jmediamanager commented 10 years ago

Example of filename.nfo http://kodi.wiki/view/NFO_files/TV_episodes

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- created on 2014-03-12 15:16:05 - tinyMediaManager 2.5.4 -->
<episodedetails>
    <title>[Commie] Accel World - 01 [30E0CD08]</title>
    <showtitle>Accel World</showtitle>
    <rating>0.0</rating>
    <votes>0</votes>
    <season>-1</season>
    <episode>-1</episode>
    <uniqueid></uniqueid>
    <plot></plot>
    <mpaa>TV-14</mpaa>
    <aired></aired>
    <premiered></premiered>
    <studio>Tokyo MX</studio>
    <actor>
        <name>Sachika Misawa</name>
        <role>Kuroyuki-hime</role>
        <thumb>http://thetvdb.com/banners/actors/300068.jpg</thumb>
    </actor>
    <actor>
        <name>Yuuki Kaji</name>
        <role>Haruyuki</role>
        <thumb>http://thetvdb.com/banners/actors/300067.jpg</thumb>
    </actor>
</episodedetails>
OzWookiee commented 10 years ago

WooHoo!

jmediamanager commented 10 years ago

Note - I haven't actually done this yet :) Just migrating all the issues over, but will be looked at fairly soon in the scheme of things

OzWookiee commented 10 years ago

Well I've Star'd and Watched this thread so looking forward to it. Thanks for ALL of your hard work over the years LW :)

saitoh183 commented 10 years ago

Just a FYI that XBMC no longer uses tbn files. When xbmc exports, the files are "filename-poster.jpg" and "filename-fanart.jpg"

jmediamanager commented 10 years ago

Great thanks a lot for the info.

anzerman commented 9 years ago

Just want to throw my support behind this.

I think an option to quickly support kodi it to add a TVDB renaming option to the JMM Server. I say quickly because I do not understand the complexities behind it and have made the naive assumption that it will be... I apologise :P

Kodi prefers and works best when using the season order as per The TVDB. Therefore if there was a way to get JMM to rename the collection to that format (Showname - SXXEXX - Episodename - etc), perhaps by adding The TVDB as a renaming source option, then Kodi would be able to scrape the files.

Anyway keep up the good work.

CuddleBear92 commented 9 years ago

that already has its own issues here: https://github.com/japanesemediamanager/jmmclient/issues/85 https://github.com/japanesemediamanager/jmmclient/issues/86

anzerman commented 9 years ago

Ah, sorry about that. They are all closely linked it seems

bigretromike commented 8 years ago

There is change to this. Kodi/xbmc also support database in MySQL! Which is ideal here. Im was trying to make plugin similar to Plex one that use REST interface but currently there is no documentation about API, and reverse engineering ain't my thing

ElementalCrisis commented 8 years ago

Already done, https://github.com/bigretromike/nakamoriplugin

Issue will remain open until JMM update with Nakamori support is official.

CuddleBear92 commented 8 years ago

related to metadata writeout: https://github.com/japanesemediamanager/jmmclient/issues/84