Skip to content

Commit 21d654c

Browse files
committed
python 2.7 fixes, series amends and fixes, removal of keep-alive, bouquet non ascii characters fix
1 parent 32f61c5 commit 21d654c

File tree

16 files changed

+35
-39
lines changed

16 files changed

+35
-39
lines changed

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/buildbouquets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def loadLive(self):
292292
stream_type = glob.current_playlist["settings"]["live_type"]
293293
live_categories = glob.current_playlist["data"]["live_categories"]
294294

295-
if not live_categories or (len(live_categories) == len(glob.current_playlist["data"]["live_categories_hidden"])):
295+
if not live_categories:
296296

297297
if glob.current_playlist["playlist_info"]["playlist_type"] == "xtream":
298298

@@ -486,7 +486,7 @@ def loadVod(self):
486486
stream_type = glob.current_playlist["settings"]["vod_type"]
487487
vod_categories = glob.current_playlist["data"]["vod_categories"]
488488

489-
if not vod_categories or (len(vod_categories) == len(glob.current_playlist["data"]["vod_categories_hidden"])):
489+
if not vod_categories:
490490

491491
if glob.current_playlist["playlist_info"]["playlist_type"] == "xtream":
492492

@@ -645,7 +645,7 @@ def loadSeries(self):
645645
stream_type = glob.current_playlist["settings"]["vod_type"]
646646
series_categories = glob.current_playlist["data"]["series_categories"]
647647

648-
if not series_categories or (len(series_categories) == len(glob.current_playlist["data"]["series_categories_hidden"])):
648+
if not series_categories:
649649
self.finished()
650650
return
651651

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/catchup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
hdr = {
3232
'User-Agent': str(cfg.useragent.value),
33-
'Connection': 'keep-alive',
3433
'Accept-Encoding': 'gzip, deflate'
3534
}
3635

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/choosecategories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def buildListEntry(self, id, name, hidden):
460460
return (pixmap, str(name), str(id), hidden)
461461

462462
def buildListEntry2(self, id, name, hidden):
463-
pixmap = LoadPixmap(cached=True, path=os.path.join(common_path, "lock_off.png"))
463+
pixmap = LoadPixmap(cached=True, path=os.path.join(common_path, "lock_disabled.png"))
464464
return (pixmap, str(name), str(id), hidden)
465465

466466
def refresh(self):

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/downloadpicons.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def mychunk_TRNS(self, pos, length):
100100

101101
hdr = {
102102
'User-Agent': str(cfg.useragent.value),
103-
'Connection': 'keep-alive',
104103
'Accept-Encoding': 'gzip, deflate'
105104
}
106105

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/globalfunctions.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
hdr = {
1515
'User-Agent': str(cfg.useragent.value),
16-
'Connection': 'keep-alive',
1716
'Accept-Encoding': 'gzip, deflate'
1817
}
1918

@@ -155,14 +154,18 @@ def downloadUrlMulti(url, output_file=None):
155154

156155
def safeName(name):
157156
if pythonVer == 2:
158-
name = name.decode("utf-8", "ignore").encode("ascii", "ignore")
157+
if isinstance(name, str):
158+
name = name.decode("utf-8", "ignore")
159159
elif pythonVer == 3:
160-
name = name.encode("ascii", "ignore").decode("ascii")
160+
if not isinstance(name, str):
161+
name = str(name)
161162

162-
name = re.sub(r"[\<\>\:\"\/\\\|\?\*]", "_", str(name))
163+
# Replace unsafe characters with underscores
164+
name = re.sub(r"[\<\>\:\"\/\\\|\?\*]", "_", name)
163165
name = re.sub(r" ", "_", name)
164166
name = re.sub(r"_+", "_", name)
165167
name = name.strip("_")
168+
166169
return name
167170

168171

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/locale/ru/LC_MESSAGES/BouquetMakerXtream.po

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: \n"
44
"POT-Creation-Date: 2024-09-15 13:08+0100\n"
5-
"PO-Revision-Date: 2024-11-25 20:45+0000\n"
5+
"PO-Revision-Date: 2024-12-14 17:02+0000\n"
66
"Last-Translator: airforce <kosmosspace@gmail.com>\n"
77
"Language-Team: \n"
88
"Language: ru_RU\n"
@@ -36,8 +36,8 @@ msgstr ""
3636

3737
#: about.py:45
3838
msgid ""
39-
"Plugin enables the simple bouquet creation of standard Xtream codes/XUI One, external and local "
40-
"m3u8 playlists. \n"
39+
"Plugin enables the simple bouquet creation of standard Xtream codes/XUI One, external and local m3u8 "
40+
"playlists. \n"
4141
"Play your files via your TV bouquets.\n"
4242
"\n"
4343
msgstr ""
@@ -66,10 +66,8 @@ msgstr ""
6666

6767
#: about.py:49
6868
msgid ""
69-
"If you would like to buy me a beer or a coffee: https://paypal.me/kiddac or https://ko-fi.com/"
70-
"kiddac\n"
71-
msgstr ""
72-
"Если хочете купить мне пива или кофе: https://paypal.me/kiddac или https://ko-fi.com/kiddac\n"
69+
"If you would like to buy me a beer or a coffee: https://paypal.me/kiddac or https://ko-fi.com/kiddac\n"
70+
msgstr "Если хочете купить мне пива или кофе: https://paypal.me/kiddac или https://ko-fi.com/kiddac\n"
7371

7472
#: about.py:50
7573
msgid "Cheers - all donations are very much appreciated."
@@ -150,8 +148,8 @@ msgstr "Выход:"
150148
#: bouquetsettings.py:299
151149
msgid "Max EPG days to download: (Use Default if EPG events is 0)"
152150
msgstr ""
153-
"Максимальное количество дней EPG для загрузки: (используйте значение по умолчанию, если событий "
154-
"EPG равно 0)"
151+
"Максимальное количество дней EPG для загрузки: (используйте значение по умолчанию, если событий EPG "
152+
"равно 0)"
155153

156154
#: bouquetsettings.py:301
157155
msgid "Use alternative EPG url:"
@@ -577,11 +575,11 @@ msgstr "8 бит"
577575

578576
#: plugin.py:133
579577
msgid "Service Reference Picons"
580-
msgstr "Сервис референсов пиконом"
578+
msgstr "Пиконы по референсам"
581579

582580
#: plugin.py:133
583581
msgid "Service Name Picons"
584-
msgstr "Сервис имен пиконов"
582+
msgstr "Пиконы по имени"
585583

586584
#: plugin.py:138
587585
msgid "100KB"
@@ -645,7 +643,7 @@ msgstr "Сохранить"
645643

646644
#: server.py:58
647645
msgid "You can manually add playlist urls to /etc/enigma2/bouquetmakerxtream/playlists.txt file"
648-
msgstr "Вы можете вручную добавить URL-адрес плейлиста в /etc/enigma2/"
646+
msgstr "Вы можете вручную добавить адрес плейлиста в /etc/enigma2/bouquetmakerxtream/playlists.txt файл"
649647

650648
#: server.py:103
651649
msgid "Xtream codes / XUI ONE (get.php)"
@@ -775,11 +773,11 @@ msgstr "Выберите сторонний web user-agent"
775773

776774
#: settings.py:153
777775
msgid "playlists.txt location"
778-
msgstr "локальный playlist.txt"
776+
msgstr "Локальный playlist.txt"
779777

780778
#: settings.py:153 settings.py:154 settings.py:159 settings.py:163
781779
msgid " *Restart GUI Required"
782-
msgstr " *Требуется перезапуск графического интерфейса"
780+
msgstr " *Требуется рестарт GUI"
783781

784782
#: settings.py:154
785783
msgid "Local M3U File location"

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/playlists.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
hdr = {
4141
'User-Agent': str(cfg.useragent.value),
42-
'Connection': 'keep-alive',
4342
'Accept-Encoding': 'gzip, deflate'
4443
}
4544

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@
200200

201201
hdr = {
202202
'User-Agent': 'Enigma2 - BouquetMakerXtream Plugin',
203-
'Connection': 'keep-alive',
204203
'Accept-Encoding': 'gzip, deflate'
205204
}
206205

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
hdr = {
3131
'User-Agent': str(cfg.useragent.value),
32-
'Connection': 'keep-alive',
3332
'Accept-Encoding': 'gzip, deflate'
3433
}
3534

BouquetMakerXtream/usr/lib/enigma2/python/Plugins/Extensions/BouquetMakerXtream/update.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,14 @@ def processDownloads(self, stream_type, outputtype=None):
305305
else:
306306
output_file = '/var/volatile/tmp/bouquetmakerxtream/temp'
307307

308-
for url in self.url_list:
308+
self.live_categories = []
309+
self.vod_categories = []
310+
self.series_categories = []
311+
self.live_streams = []
312+
self.vod_streams = []
313+
self.series_streams = []
309314

310-
self.live_categories = []
311-
self.vod_categories = []
312-
self.series_categories = []
313-
self.live_streams = []
314-
self.vod_streams = []
315-
self.series_streams = []
315+
for url in self.url_list:
316316

317317
if outputtype == "json":
318318
result = bmx.downloadUrlCategory(url)
@@ -363,7 +363,7 @@ def loadLive(self):
363363

364364
live_categories = glob.current_playlist["data"]["live_categories"]
365365

366-
if not live_categories or (len(live_categories) == len(glob.current_playlist["data"]["live_categories_hidden"])):
366+
if not live_categories:
367367

368368
if glob.current_playlist["playlist_info"]["playlist_type"] == "xtream":
369369

@@ -562,7 +562,7 @@ def loadVod(self):
562562

563563
vod_categories = glob.current_playlist["data"]["vod_categories"]
564564

565-
if not vod_categories or (len(vod_categories) == len(glob.current_playlist["data"]["vod_categories_hidden"])):
565+
if not vod_categories:
566566
if glob.current_playlist["playlist_info"]["playlist_type"] == "xtream":
567567
if glob.current_playlist["settings"]["show_series"]:
568568
self.nextJob(_("Downloading series data..."), self.downloadSeries)
@@ -724,7 +724,7 @@ def loadSeries(self):
724724

725725
series_categories = glob.current_playlist["data"]["series_categories"]
726726

727-
if not series_categories or (len(series_categories) == len(glob.current_playlist["data"]["series_categories_hidden"])):
727+
if not series_categories:
728728
self.finished()
729729
return
730730

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.36-20241208
1+
1.39-20241214

CONTROL/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: enigma2-plugin-extensions-bouquetmakerxtream
2-
Version: 1.36-20241208
2+
Version: 1.39-20241214
33
Section: misc
44
Priority: optional
55
Architecture: all

0 commit comments

Comments
 (0)