summaryrefslogtreecommitdiff
path: root/plugin.video.vrt.nu/resources/lib/helperobjects/helperobjects.py
blob: 9508545696dbba295621050138145626d11e88ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class TitleItem:

    def __init__(self, title, url_dictionary, is_playable, thumbnail = None, video_dictionary=None):
        self.title = title
        self.url_dictionary = url_dictionary
        self.is_playable = is_playable
        self.thumbnail = thumbnail
        self.video_dictionary = video_dictionary

class StreamURLS:

    def __init__(self, stream_url, subtitle_url):
        self.stream_url = stream_url
        self.subtitle_url = subtitle_url


class Credentials:

    def __init__(self, kodi_wrapper):
        self._kodi_wrapper = kodi_wrapper
        self.reload()

    def are_filled_in(self):
        return not (self.username is None or self.password is None or self.username == "" or self.password == "")

    def reload(self):
        self.username = self._kodi_wrapper.get_setting("username")
        self.password = self._kodi_wrapper.get_setting("password")