Un add-on di Kodi per guardare contenuti ospitati su PeerTube. Riprodurre video (compresi i video in diretta) Sfoglia i video su un'istanza Cercare i video su un'istanza Selezionare l'istanza di PeerTube da utilizzare https://peertube.uno
Go to file
Thomas 7a21bd92ac Allow playing videos only with the video ID
Now the "play_video" action can be called with the ID of the video (and
optionally the URL of the instance hosting the video) as parameter
instead of the full URL: it will allow other add-ons to call the add-on
to play videos since the full URL contains the resolution which is not
known.

It led to some refactoring and changes in the code:
* Only the instance and the id of a video is retrieved when browsing and
  listing videos which improves the performance a lot (the video URL and
  the resolution are defined only when the video is played)
* the "https://" prefix is now automatically added to the instances URL
  because the instance-related REST APIs use URLs without this prefix.
  It also simplifies the external API because the user does not have to
  provide this prefix.
  Consequently the prefix was removed from the default value of the
  selected instance in the settings: it simplifies the code but it
  generates a non-backward compatible change. The impact is limited
  because it can be easily fixed by resetting the settings to the
  default value and there are very few users currently.

Other changes:
 - manage errors when retrieving the information of a video
 - fix some PEP 8 errors
2021-04-08 23:16:39 +02:00
resources Allow playing videos only with the video ID 2021-04-08 23:16:39 +02:00
LICENSE.txt Initial commit. 2018-07-26 11:33:47 +02:00
README.md Allow playing videos only with the video ID 2021-04-08 23:16:39 +02:00
TESTME.md Add TESTME.md information and needed tool to create a kodi package 2018-11-23 11:50:05 +01:00
addon.xml Release 0.3.2 2021-04-08 21:04:46 +00:00
createaddon.sh Add TESTME.md information and needed tool to create a kodi package 2018-11-23 11:50:05 +01:00
fanart.jpg Add TESTME.md information and needed tool to create a kodi package 2018-11-23 11:50:05 +01:00
icon.png icon.png was bad 2018-07-26 22:08:38 +02:00
peertube.py Allow playing videos only with the video ID 2021-04-08 23:16:39 +02:00
service.py Fixed a bug in PeertubeDownloader.run() where I was refering to variable 'torrent' 2018-07-27 17:37:48 +02:00

README.md

A Kodi add-on for watching content hosted on Peertube.

This code is still proof-of-concept but it works, and you're welcome to improve it.

Features

  • Browse all videos on a PeerTube instance
  • Search for videos on a PeerTube instance
  • Select Peertube instance to use (Doesn't work yet)
  • Select the preferred video resolution: the plugin will try to play the select video resolution. If it's not available, it will play the lower resolution that is the closest from your preference. If not available, it will play the higher resolution that is the closest from your preference.

User settings

  • Preferred PeerTube instance
  • Preferred video resolution
  • Number of videos to display per page
  • Sort method to be used when listing videos (Currently, only 'views' and 'likes')
  • Select the filter to use when browsing the videos on an instance:
    • local will only display the videos which are local to the selected instance
    • all-local will only display the videos which are local to the selected instance plus the private and unlisted videos (requires admin privileges)

API

This add-on can be called from other add-ons in Kodi to play videos thanks to the following API:

plugin://plugin.video.peertube/?action=play_video&instance=<instance>&id=<id>

where:

  • <instance> is the base URL of the instance hosting the video
  • <id> is the ID or the UUID of the video on the instance server

For instance to play the video behind the URL https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d call the add-on with:

plugin://plugin.video.peertube/?action=play_video&instance=framatube.org&id=9c9de5e8-0a1e-484a-b099-e80766180a6d

Limitations

  • This add-on doesn't support Webtorrent yet. So, it cannot download/share from/to regular PeerTube clients. The reason is that it uses the libtorrent python library which doesn't support it yet (see https://github.com/arvidn/libtorrent/issues/223)
  • The add-on doesn't delete the downloaded files at the moment. So, it may fill up your disk.

Requirements

  • Kodi 17 (Krypton) or above
  • libtorrent python bindings must be installed on your machine (on Debian type apt install python-libtorrent as root).