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 Bétous 89675dfb30 Support better initial download of big videos
In this commit, the new version of vfs.libtorrent is used which
replaces `write()` entirely with `seek()`. Now the size of the
initial chunk that will be downloaded before playback starts is
not defined anymore in vfs.libtorrent, but passed as argument
to `seek()`.
It is quite hard to define how much of a video must be downloaded
before starting the playback because most of the time the chosen
value works great for short videos but not for long videos. It
was decided to define this size based on the duration rather
than on the size of the file. Consequently the user can now
configure in the settings of the add-on of many "seconds" of the
video must be downloaded before the playback starts.

As the configured values is likely to not work properly on all
machines (espcially slow ones), a strategy was implemented to
detect when the playback fails to start because the amount of
the video that was downloaded is not big enough. When it occurs
the user has the choice to try again to play the video or not.
This use case is detected with a combination of the callbacks
`onPlayBackStopped()` and `onAVStarted()` (using
`onPlayBackError()` would have been easier but for some
reason it is not called in this case).

Other changes:
* refactor the play_video action
* clean-up strings and variables that were not used
2021-11-01 15:15:22 +01:00
.gitlab/issue_templates Create a template for bug reports 2021-04-28 23:42:12 +02:00
misc Support videos when WebTorrent is disabled 2021-04-11 21:51:35 +00:00
resources Support better initial download of big videos 2021-11-01 15:15:22 +01:00
.gitignore Support videos when WebTorrent is disabled 2021-04-11 21:51:35 +00:00
.gitlab-ci.yml Create a CI job to check strings.po files 2021-04-27 20:52:59 +00:00
LICENSE.txt Initial commit. 2018-07-26 11:33:47 +02:00
README.md Add German to the list of languages in the README 2021-05-14 13:13:17 +02:00
addon.xml Pause download when playback stops 2021-10-10 22:10:43 +02:00
contributing.md Various small updates before releasing v1.1 2021-04-30 16:35:20 +00:00
main.py Redesign the main file of the add-on 2021-04-22 20:48:20 +00:00
service.py Support better initial download of big videos 2021-11-01 15:15:22 +01:00

README.md

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

This add-on is under development so only basic features work, and you're welcome to improve it.
If you want to contribute, please start with the contribution guidelines and the pending issues.


[[TOC]]

Installation and prerequisites

Please read the wiki for more information.

Features

  • Play videos (including live videos)
  • Browse the videos on a PeerTube instance
  • Search for videos on a PeerTube instance
  • Select the PeerTube instance to use
  • Select the preferred video resolution: the plugin will try to play the preferred video resolution.
    If it's not available, it will play the lower resolution that is the closest to your preference.
    If not available, it will play the higher resolution that is the closest from your preference.

The following languages are available:

  • English
  • French
  • German

If you want to help translating the add-on in your language, check here.

Limitations

  • This add-on doesn't support Webtorrent yet. So, it cannot download/share from/to regular PeerTube clients.
  • The add-on doesn't delete the downloaded files at the moment so it may fill up your disk. You may delete manually the downloaded files in the folder <kodi_home>/temp/plugin.video.peertube/ (more information about <kodi_home> here).

User settings

  • Preferred PeerTube instance
  • Display (or not) a notification when the service starts: the notification lets the user know that the videos can be played which may be useful on slow devices (when the service takes some time to start)
  • Browsing/Searching:
    • Number of items to show per page (max 100)
    • Field used to sort items when listing/searching videos:
      • views: sort by number of views (ascending only)
      • likes: sort by number of likes (ascending only)
    • Select the filter to use when browsing and searching 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)
  • Video playback:
    • Preferred video resolution

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