Commit Graph

3 Commits

Author SHA1 Message Date
Thomas 0efeb9ffdf Support videos when WebTorrent is disabled
The URL of the video is not stored in the same attribute of the response
if WebTorrent is enabled or not.
It caused a bug when trying to play a video which do not use WebTorrent.

Also create a "quality" job to run pylint automatically on merge
requests. The contributing guidelines are updated with this information
and the remaining pylint violations were fixed in the code.

See merge request StCyr/plugin.video.peertube!11 for more information
2021-04-11 21:51:35 +00:00
Thomas c723ced0c6 Fix the selection of instances
When a new instance was selected from the list of instances, it had no
effect because the new instance URL was saved in an attribute that was
reset at the next call of the add-on.
Now when the user selects a new instance, the associated setting is
updated so that this value can be reused the next time the add-on is
called or started.

Also took this opportunity to refactor the access to the add-on's
settings: there are now wrapper methods in kodi_utils.py which
encapsulates the call to Kodi APIs to make the code simpler.

See merge request StCyr/plugin.video.peertube!10 for more information
2021-04-11 08:44:18 +00:00
Thomas 4346178db9 Guide the user when libtorrent cannot be imported
Libtorrent is required to play videos but its installation is still
manual so now a message is displayed when libtorrent could not be
imported instead of having a "service could not start" error at Kodi
startup.
The message contains a link to a page which explains how to install
libtorrent. It will be displayed when:
* the add-on starts
* the user selects a video to play (including when called externally)

Other additions:
* Create a kodi_utils module to centralize some calls to the Kodi API
* Add license information in the header of the files
* Ignore some files in Git (python cache and Mac OS system file)
2021-04-08 23:25:49 +02:00