summaryrefslogtreecommitdiff
path: root/plugin.video.catchuptvandmore/resources/lib/common.py
blob: f403d7fb989d1f9f2204c7d699c29f4f270adf32 (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
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
"""
    Catch-up TV & More
    Copyright (C) 2016  SylvainCecchetto

    This file is part of Catch-up TV & More.

    Catch-up TV & More is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Catch-up TV & More is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with Catch-up TV & More; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""

import os
from resources.lib import simpleplugin as sp

PLUGIN = sp.Plugin()
ADDON = sp.Addon()

CACHE_TIME = 10

PLUGIN_NAME = 'Catch-up TV & More'

def get_window_title():
    query = sp.sys.argv[2][1:]
    params = PLUGIN.get_params(query)
    if 'window_title' in params:
        return params.window_title
    else:
        return PLUGIN_NAME