summaryrefslogtreecommitdiff
path: root/plugin.video.vrt.nu/resources/lib/helperobjects/helperobjects.py
blob: 974a3616e6dd6a331c48096763e5418e46297f65 (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
30
31
class TitleItem:



    def __init__(self, title, url_dictionary, is_playable, logo, video_dictionary = None):
        self.title = title
        self.url_dictionary = url_dictionary
        self.is_playable = is_playable
        self.logo = logo
        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, addon):
        self.addon = addon
        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.addon.getSetting("username")
        self.password = self.addon.getSetting("password")