mirror of
https://framagit.org/StCyr/plugin.video.peertube
synced 2025-06-05 22:09:16 +02:00
Create a dedicated class to interact with PeerTube
The PeerTube class is responsible for providing methods to call easily the PeerTube REST APIs. Other changes: * the video filter is now also used when searching videos * in case of error when sending a request, the message from the response is displayed on the screen (even when listing the instances) * all the debug messages are now prefixed with the name of the add-on directly in kodi_utils: it allows an easier usage of this function anywhere in the add-on * first version of the design of the add-on added in contributing.md See merge request StCyr/plugin.video.peertube!14 for more information
This commit is contained in:
@ -15,9 +15,11 @@ import xbmcgui # Kodistubs for Leia is not compatible with python3 / pylint: dis
|
||||
def debug(message):
|
||||
"""Log a message in Kodi's log with the level xbmc.LOGDEBUG
|
||||
|
||||
:param str message: Message to log
|
||||
:param str message: Message to log prefixed with the name of the add-on
|
||||
(the name is hard-coded to avoid calling xbmcaddon each time since the name
|
||||
should not change)
|
||||
"""
|
||||
xbmc.log(message, xbmc.LOGDEBUG)
|
||||
xbmc.log('[PeerTube] {}'.format(message), xbmc.LOGDEBUG)
|
||||
|
||||
def get_property(name):
|
||||
"""Retrieve the value of a window property related to the add-on
|
||||
|
Reference in New Issue
Block a user