-
Notifications
You must be signed in to change notification settings - Fork 51
/
addons.py
91 lines (84 loc) · 2.81 KB
/
addons.py
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
_BEAM_ = ["service.subtitles.titulky.com", "service.subtitles.serialzone.cz"]
# list of addons that we are releasing
__ADDONS__ = [
"plugin.video.barrandov.tv",
"plugin.video.befun.cz",
"plugin.video.dmd-czech.aktualne",
"plugin.video.dmd-czech.novaplus",
"plugin.audio.dmd-czech.play.cz",
"plugin.video.dmd-czech.playtvak",
"plugin.video.dmd-czech.stream",
"plugin.video.gordon.ura.cz",
"plugin.video.hejbejse.tv",
"plugin.video.idnestv",
"plugin.video.ivysilani",
"plugin.video.dvtv",
"plugin.video.jaksetodela.cz",
"plugin.video.joj.sk",
"plugin.video.markiza.sk",
"plugin.video.mtr.sk",
"plugin.video.o2tvgo",
"plugin.video.online-files",
"plugin.video.pohadkar.cz",
"plugin.video.primaplay",
"plugin.video.rtvs.sk",
"plugin.video.sosac.ph",
"plugin.video.sledujufilmy.cz",
"plugin.video.slowtv.cz",
"plugin.video.sport5",
"plugin.video.ta3.com",
"plugin.video.teevee.sk",
"plugin.video.tipsport.elh",
"plugin.video.tv.lux.sk",
"plugin.video.tv.sme.sk",
"plugin.video.tv.sosac.ph",
"plugin.video.videacesky.cz",
"plugin.video.zkouknito.cz",
"script.module.dmd-czech.common",
"script.module.stream.resolver",
"script.module.demjson",
"repository.xbmc.doplnky",
"repository.dmd-xbmc.googlecode.com",
"repository.kodi-czsk",
"weather.dmd-xbmc.in-pocasi",
"plugin.video.dmd-czech.huste",
"plugin.video.serialhd.cz",
"metadata.csfd.cz",
"plugin.image.rouming",
"metadata.serialzone.cz",
"plugin.video.mojevideo.sk",
"plugin.video.titulkomet.cz",
"weather.shmu.pocasie",
"plugin.video.sl",
"plugin.video.mall.tv",
"plugin.video.bombuj.filmyserialy",
"plugin.video.stream-cinema"
] + _BEAM_
import os
import requests
import xml.etree.ElementTree as ET
from addons import __ADDONS__
# this function asks our repository and returns addons with different versions than in our local repo = candidates to be
# released
def find():
released_addons = requests.get('http://kodi-czsk.github.io/repository/repo/addons.xml').text
try:
root = ET.XML(released_addons.encode('utf-8'))
except: # initially there are no addons.xml
print 'Failed to parse remove addons.xml - releasing everything'
return __ADDONS__
to_release = []
for id in __ADDONS__:
released = root.find('addon[@id=\"%s\"]' % id)
if released == None:
to_release.append(id)
continue
released_version = released.get('version')
xmldoc = ET.parse(os.path.join(id, 'addon.xml'))
new_version = xmldoc.getroot().get('version')
if not released_version == new_version:
to_release.append(id)
return to_release
if __name__ == "__main__":
for id in find():
print "Addon %s " % id