Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Bétous 6d26b5d9c4 Add a button to open vfs.libtorrent settings 2021-11-07 22:26:15 +01:00
Thomas Bétous 4256198cda Fix some issues after testing
* Add a missing space in a string used in the settings
* Fix the slider of the setting `initial_wait_time`
* Fix a bug in service.py (was using a non-existing attribute)
* Omit the second argument of xbmcvfs.File().seek()
* Fix a bug in addon.py when calling seek() (argument must be int)
2021-11-06 17:37:09 +01:00
Thomas Bétous 506f74a9e2 Backport changes from 89675dfb 2021-11-01 19:06:49 +01:00
Thomas 11b92d5896 Use the new format for settings.xml
* Convert settings.xml to the new format supported in Kodi 19
* Create help strings to guide the users

Note: the translation of the new help strings in German is missing.
2021-09-03 16:47:47 +00:00
Thomas cb1825c1f9 Notify the user when the service started
Display a notification when the PeerTube service started so that the
user is aware that the add-on can be used.
This notification will be useful especially on slow devices.

The notification can be disabled in the settings.
2021-04-28 21:02:24 +00:00
Thomas 13186dc697 Improve the settings layout and translation
* Turn the name of the main category of the settings into a localized
  string
* Add separators to group settings per theme
* Make some settings name more explicit
* Translate the possible values of the settings video_filter and
  video_sort_method

See merge request StCyr/plugin.video.peertube!20 for more information
2021-04-27 20:24:24 +00:00
Thomas Bétous a88a60376f Disable the 'delete_files' setting
This setting is not used so it is disabled until the feature
is implemented to avoid confusing the users.
2021-04-10 22:52:49 +02:00
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
Thomas d657480eab Browse only local videos by default
Use "local" instead of "all-local" by default because "all-local"
requires admin privileges

Other improvements:
* Replace urllib with requests to make the management of the HTTP
  requests simpler (better error handling and easier implementation of
  complex requests in the future)
* Refactor the functions used to build the HTTP request to improve
  maintainability (don't know if it makes sense to keep a single
  function for the "search" and the "list videos" request).
* Use "urlencode" to generate the Kodi URL using a dict to make it more
  generic.
* Create a function to log messages easily in Kodi's debug log. It will
  decrease the amount of duplicate code.
* Fix some errors reported by pylint with regards to PEP 8
2021-03-28 21:27:28 +00:00
philippe lhardy 913e5fb905 add a video_filter parameter to be able to browse only local
- when browsing ( and not searching ) it is possible to select
filter=local that will show only local video
- create dedicated method to build kodi and peertube api url
- bumped version to 0.3.1.1 to indicate this change
  - if selected upstream might want to change it to 0.3.2
2018-11-24 17:31:09 +01:00
Cyrille Bollu 8ba2a7e781 Added a "Delete videos" setting (functionality not implemented yet) 2018-08-02 17:44:35 +02:00
Cyrille Bollu 8b80a1fad7 Added a setting for 'preferred video resolution'
Functionality not yet implemented though
2018-08-02 16:58:07 +02:00
Famille Bollu 33ce01e69a Added a 'video sort method' setting 2018-07-30 21:04:15 +02:00
Famille Bollu 9351feff80 Added an items_per_page setting to allow user to specify the number of videos
she wants to display per page.
Functionality not implemented yet though.
2018-07-28 13:44:57 +02:00
Cyrille Bollu fe91fa4e90 Added the 'preferred_instance" setting to allow the user to specify a
preferred peerinstance to connect to (defaults to 'https://framatube.org')
2018-07-27 14:43:21 +02:00