lbry-seedit
lbry-seedit copied to clipboard
Kodi/Jellyfin+Other Media Server Compatibility
Some user's have been asking for LBRY plugins for media servers such as Kodi and Jellyfin so they can watch videos on their TV's.
I think we can use seedit to cover most of these. The first step would be to disable the deletion of videos from the downloads folder, there is already an option for this. Then we would need to download and store metadata for each video using the lbry api. We should also download the thumbnail for the video, this can be used as the cover art for the video. Then we need to find the best way to present the metadata to media servers. Ideally we should find one solution that works for both Kodi and Jellyfin.
If we can get the above working, all the user would need to do is add the downloads folder as a media library on their media server and all the videos will have the correct thumbnails, titles and descriptions.
In the future it would be cool if the user can also follow channels using the UI in Kodi and Jellyfin as well.
Turns out that both Kodi and Jellyfin (and probably plex) support using nfo files to supply metadata.
So if the user chooses to enable the feature a nfo file should be generated; For the show title we can just use the channel name, the episode name can the the video title. Not sure if it would make sense to use episode numbers.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tvshow>
<showtitle>tuxfoo</showtitle>
<title>Bodypix - Body Part Segmentation with Tensorflow</title>
<plot>Today I had a play with body part/person segmentation using bodypix and tensorflow.\n\nhttps://github.com/tensorflow/tfjs-models/tree/master/body-pix\nhttps://github.com/pangyuteng/virtual-background\nhttps://elder.dev/posts/open-source-virtual-background/\n\nFollow me on mastodon\nhttps://social.librem.one/@tuxfoo"</plot>
<thumb aspect="poster" preview="https://spee.ch/3/4e79c87a7ffbf2bf.png">https://spee.ch/3/4e79c87a7ffbf2bf.png</thumb>
<fanart>
<thumb preview="https://spee.ch/3/4e79c87a7ffbf2bf.png">https://spee.ch/3/4e79c87a7ffbf2bf.png</thumb>
</fanart>
<dateadded>2020-12-02</dateadded>
</tvshow>
Just read the documentation for Kodi and it appears even TV shows with nfo files have to follow the same naming rules. Because we probably do not want to be renaming files(unless this can be done via the LBRY API) we may have to classify the library as Movies, the down side of this is we can not sort videos via channel.
https://github.com/belikor/lbrytools
The lbrytools.print_summary
function is able to create a CSV file with all claims downloaded so far.
p = print_summary(title=True, typ=False, path=False,
cid=True, blobs=True, ch=False, name=True)
Each row can have a ton of information, so I think it would not be hard to add code to generate these .nfo
files. When it is cycling through the list, it could write one .nfo
per claim.
Because we probably do not want to be renaming files(unless this can be done via the LBRY API
Well, the API allows renaming in this way
lbrynet get <uri> --file_name=<file_name>
--file_name
overrides the native name of the claim, which is contained in the key 'stream_name'
.