Ivars il y a 8 ans
Parent
révision
fb59f9f63c
6 fichiers modifiés avec 239 ajouts et 302 suppressions
  1. 0
    233
      ChoiceBox.py
  2. 1
    1
      PlayStream.py
  3. 72
    68
      PlayStream.wpr
  4. 20
    0
      __init__.py
  5. 146
    0
      imake.bat
  6. BIN
      release/enigma2-plugin-extensions-playstream_0.5j.ipk

+ 0
- 233
ChoiceBox.py Voir le fichier

@@ -1,233 +0,0 @@
1
-from Screens.Screen import Screen
2
-from Components.ActionMap import NumberActionMap
3
-from Components.Label import Label
4
-from Components.ChoiceList import ChoiceEntryComponent, ChoiceList
5
-from Components.Sources.StaticText import StaticText
6
-from Components.Pixmap import Pixmap
7
-import enigma
8
-
9
-class ChoiceBox2(Screen):
10
-    skin =  """
11
-<screen name="ChoiceBox2" position="center,center" size="720,480" title="ChoiceBox" zPosition="5">
12
-    <widget name="text" position="0,0" size="720,0" font="Regular;30"/>
13
-    <widget name="list" font="Regular;22" position="10,10" size="710,460" scrollbarMode="showOnDemand" enableWrapAround="1"/>
14
-    <applet type="onLayoutFinish">
15
-            self["list"].instance.setItemHeight(25)
16
-    </applet>
17
-
18
-</screen>
19
-"""
20
-    #<applet type="onLayoutFinish">
21
-    #self.autoResize()
22
-    #</applet>
23
-    
24
-    def __init__(self, session, title="", list=None, keys=None, selection=0, skin_name=None, text=""):
25
-        Screen.__init__(self, session)        
26
-        #self.setTitle(_("Choice Box"))
27
-        if not list: list = []
28
-        if not skin_name: skin_name = []
29
-        #if isinstance(skin_name, str):
30
-        #	skin_name = [skin_name]
31
-        #self.skinName = skin_name + ["ChoiceBox"]
32
-        self["text"] = Label()
33
-        self.var = ""
34
-
35
-        if title:
36
-            title = _(title)
37
-            if len(title) < 55 and title.find('\n') == -1:
38
-                Screen.setTitle(self, title)
39
-            elif title.find('\n') != -1:
40
-                temptext = title.split('\n')
41
-                if len(temptext[0]) < 55:
42
-                    Screen.setTitle(self, temptext[0])
43
-                    count = 2
44
-                    labeltext = ""
45
-                    while len(temptext) >= count:
46
-                        if labeltext:
47
-                            labeltext += '\n'
48
-                        labeltext = labeltext + temptext[count-1]
49
-                        count += 1
50
-                        print 'count',count
51
-                    self["text"].setText(labeltext)
52
-                else:
53
-                    self["text"] = Label(title)
54
-            else:
55
-                self["text"] = Label(title)
56
-        elif text:
57
-            self["text"] = Label(_(text))
58
-        self.list = []
59
-        self.summarylist = []
60
-        if keys is None:
61
-            self.__keys = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "red", "green", "yellow", "blue" ] + (len(list) - 10) * [""]
62
-        else:
63
-            self.__keys = keys + (len(list) - len(keys)) * [""]
64
-
65
-        self.keymap = {}
66
-        pos = 0
67
-        for x in list:
68
-            strpos = str(self.__keys[pos])
69
-            self.list.append(ChoiceEntryComponent(key = strpos, text = x))
70
-            if self.__keys[pos] != "":
71
-                self.keymap[self.__keys[pos]] = list[pos]
72
-            self.summarylist.append((self.__keys[pos], x[0]))
73
-            pos += 1
74
-        self["list"] = ChoiceList(list = self.list, selection = selection)
75
-        self["summary_list"] = StaticText()
76
-        self["summary_selection"] = StaticText()
77
-        self.updateSummary(selection)
78
-
79
-        self["actions"] = NumberActionMap(["WizardActions", "InputActions", "ColorActions"],
80
-                                          {
81
-                                              "ok": self.go,
82
-                                              "1": self.keyNumberGlobal,
83
-                                              "2": self.keyNumberGlobal,
84
-                                              "3": self.keyNumberGlobal,
85
-                                              "4": self.keyNumberGlobal,
86
-                                              "5": self.keyNumberGlobal,
87
-                                              "6": self.keyNumberGlobal,
88
-                                              "7": self.keyNumberGlobal,
89
-                                              "8": self.keyNumberGlobal,
90
-                                              "9": self.keyNumberGlobal,
91
-                                              "0": self.keyNumberGlobal,
92
-                                              "red": self.keyRed,
93
-                                              "green": self.keyGreen,
94
-                                              "yellow": self.keyYellow,
95
-                                              "blue": self.keyBlue,
96
-                                              "up": self.up,
97
-                                              "down": self.down,
98
-                                              "left": self.left,
99
-                                              "right": self.right
100
-                                              }, -1)
101
-
102
-        self["cancelaction"] = NumberActionMap(["WizardActions", "InputActions", "ColorActions"],
103
-                                               {
104
-                                                   "back": self.cancel,
105
-                                                   }, -1)
106
-        #self.onShown.append(self.onshow)
107
-
108
-    def autoResize(self):
109
-        desktop_w = enigma.getDesktop(0).size().width()
110
-        desktop_h = enigma.getDesktop(0).size().height()
111
-        count = len(self.list)
112
-        itemheight = self["list"].getItemHeight()
113
-        if count > 15:
114
-            count = 15
115
-        if not self["text"].text:
116
-            # move list
117
-            textsize = (520, 0)
118
-            listsize = (520, itemheight*count)
119
-            self["list"].instance.move(enigma.ePoint(0, 0))
120
-            self["list"].instance.resize(enigma.eSize(*listsize))
121
-        else:
122
-            textsize = self["text"].getSize()
123
-            if textsize[0] < textsize[1]:
124
-                textsize = (textsize[1],textsize[0]+10)
125
-            if textsize[0] > 520:
126
-                textsize = (textsize[0], textsize[1]+itemheight)
127
-            else:
128
-                textsize = (520, textsize[1]+itemheight)
129
-            listsize = (textsize[0], itemheight*count)
130
-            # resize label
131
-            self["text"].instance.resize(enigma.eSize(*textsize))
132
-            self["text"].instance.move(enigma.ePoint(10, 10))
133
-            # move list
134
-            self["list"].instance.move(enigma.ePoint(0, textsize[1]))
135
-            self["list"].instance.resize(enigma.eSize(*listsize))
136
-
137
-        wsizex = textsize[0]
138
-        wsizey = textsize[1]+listsize[1]
139
-        wsize = (wsizex, wsizey)
140
-        self.instance.resize(enigma.eSize(*wsize))
141
-
142
-        # center window
143
-        self.instance.move(enigma.ePoint((desktop_w-wsizex)/2, (desktop_h-wsizey)/2))
144
-
145
-    def left(self):
146
-        if len(self["list"].list) > 0:
147
-            while 1:
148
-                self["list"].instance.moveSelection(self["list"].instance.pageUp)
149
-                self.updateSummary(self["list"].l.getCurrentSelectionIndex())
150
-                if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == 0:
151
-                    break
152
-
153
-    def right(self):
154
-        if len(self["list"].list) > 0:
155
-            while 1:
156
-                self["list"].instance.moveSelection(self["list"].instance.pageDown)
157
-                self.updateSummary(self["list"].l.getCurrentSelectionIndex())
158
-                if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == 0:
159
-                    break
160
-
161
-    def up(self):
162
-        if len(self["list"].list) > 0:
163
-            while 1:
164
-                self["list"].instance.moveSelection(self["list"].instance.moveUp)
165
-                self.updateSummary(self["list"].l.getCurrentSelectionIndex())
166
-                if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == 0:
167
-                    break
168
-
169
-    def down(self):
170
-        if len(self["list"].list) > 0:
171
-            while 1:
172
-                self["list"].instance.moveSelection(self["list"].instance.moveDown)
173
-                self.updateSummary(self["list"].l.getCurrentSelectionIndex())
174
-                if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == len(self["list"].list) - 1:
175
-                    break
176
-
177
-    # runs a number shortcut
178
-    def keyNumberGlobal(self, number):
179
-        self.goKey(str(number))
180
-
181
-    # runs the current selected entry
182
-    def go(self):
183
-        cursel = self["list"].l.getCurrentSelection()
184
-        if cursel:
185
-            self.goEntry(cursel[0])
186
-        else:
187
-            self.cancel()
188
-
189
-    # runs a specific entry
190
-    def goEntry(self, entry):
191
-        if entry and len(entry) > 3 and isinstance(entry[1], str) and entry[1] == "CALLFUNC":
192
-            arg = entry[3]
193
-            entry[2](arg)
194
-        elif entry and len(entry) > 2 and isinstance(entry[1], str) and entry[1] == "CALLFUNC":
195
-            entry[2](None)
196
-        else:
197
-            self.close(entry)
198
-
199
-    # lookups a key in the keymap, then runs it
200
-    def goKey(self, key):
201
-        if self.keymap.has_key(key):
202
-            entry = self.keymap[key]
203
-            self.goEntry(entry)
204
-
205
-    # runs a color shortcut
206
-    def keyRed(self):
207
-        self.goKey("red")
208
-
209
-    def keyGreen(self):
210
-        self.goKey("green")
211
-
212
-    def keyYellow(self):
213
-        self.goKey("yellow")
214
-
215
-    def keyBlue(self):
216
-        self.goKey("blue")
217
-
218
-    def updateSummary(self, curpos=0):
219
-        pos = 0
220
-        summarytext = ""
221
-        for entry in self.summarylist:
222
-            if curpos-2 < pos < curpos+5:
223
-                if pos == curpos:
224
-                    summarytext += ">"
225
-                    self["summary_selection"].setText(entry[1])
226
-                else:
227
-                    summarytext += entry[0]
228
-                summarytext += ' ' + entry[1] + '\n'
229
-            pos += 1
230
-        self["summary_list"].setText(summarytext)
231
-
232
-    def cancel(self):
233
-        self.close(None)

+ 1
- 1
PlayStream.py Voir le fichier

@@ -123,7 +123,7 @@ class PSPlayer(MoviePlayer):
123 123
         if "callback" in dir(self.stimer):
124 124
             self.stimer.callback.append(self.update_subtitles)
125 125
         elif "timeout":
126
-            self.stimer.timeout.connect(self.update_subtitles)
126
+            self.stimer_conn = self.stimer.timeout.connect(self.update_subtitles)
127 127
         else:
128 128
             self.stimer = None
129 129
         self.stimer_step = 500

+ 72
- 68
PlayStream.wpr Voir le fichier

@@ -5069,9 +5069,9 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5069 5069
         'list-files-first': False,
5070 5070
         'tree-states': {'deep': {'expanded-nodes': [(9,),
5071 5071
         (17,),
5072
-        (74,),
5073
-        (109,)],
5074
-                                 'selected-nodes': [(26,)],
5072
+        (75,),
5073
+        (110,)],
5074
+                                 'selected-nodes': [(27,)],
5075 5075
                                  'top-node': (0,)}},
5076 5076
         'tree-style': 'deep'}}),
5077 5077
                               ('snippets',
@@ -5108,7 +5108,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5108 5108
                                {'tree-state': []})],
5109 5109
                  'primary_view_state': {'area': 'wide',
5110 5110
         'constraint': None,
5111
-        'current_pages': [1,
5111
+        'current_pages': [7,
5112 5112
                           1],
5113 5113
         'notebook_display': 'normal',
5114 5114
         'notebook_percent': 0.40625,
@@ -5159,7 +5159,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5159 5159
                                        'fRegexFlags': 46,
5160 5160
                                        'fReplaceText': u'self.',
5161 5161
                                        'fReverse': False,
5162
-                                       'fSearchText': u'etimer',
5162
+                                       'fSearchText': u'timer',
5163 5163
                                        'fStartPos': 0,
5164 5164
                                        'fStyle': 'text',
5165 5165
                                        'fWholeWords': False,
@@ -5201,6 +5201,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5201 5201
                       'wide',
5202 5202
                       0,
5203 5203
                       {}),
5204
+                     ('versioncontrol.git',
5205
+                      'wide',
5206
+                      0,
5207
+                      {}),
5204 5208
                      ('debug-io',
5205 5209
                       'wide',
5206 5210
                       1,
@@ -5278,57 +5282,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5278 5282
         'primary_view_state': {'editor_states': ('vertical',
5279 5283
         1.0,
5280 5284
         ({'bookmarks': ([[loc('PlayStream.py'),
5281
-                          {'attrib-starts': [],
5282
-                           'first-line': 23,
5283
-                           'folded-linenos': [],
5284
-                           'sel-line': 31,
5285
-                           'sel-line-start': 1212,
5286
-                           'selection_end': 1212,
5287
-                           'selection_start': 1212},
5288
-                          1480708440.879],
5289
-                         [loc('ContentSources.py'),
5290
-                          {'attrib-starts': [],
5291
-                           'first-line': 173,
5292
-                           'folded-linenos': [],
5293
-                           'sel-line': 192,
5294
-                           'sel-line-start': 6829,
5295
-                           'selection_end': 6829,
5296
-                           'selection_start': 6829},
5297
-                          1480708448.981],
5298
-                         [loc('sources/ltc.py'),
5299
-                          {'attrib-starts': [('Source',
5300
-        24),
5301
-        ('Source.get_streams',
5302
-         401)],
5303
-                           'first-line': 455,
5304
-                           'folded-linenos': [],
5305
-                           'sel-line': 460,
5306
-                           'sel-line-start': 26123,
5307
-                           'selection_end': 26123,
5308
-                           'selection_start': 26123},
5309
-                          1480751941.827],
5310
-                         [loc('PlayStream.py'),
5311
-                          {'attrib-starts': [],
5312
-                           'first-line': 0,
5313
-                           'folded-linenos': [],
5314
-                           'sel-line': 11,
5315
-                           'sel-line-start': 431,
5316
-                           'selection_end': 449,
5317
-                           'selection_start': 449},
5318
-                          1480751956.342],
5319
-                         [loc('PlayStream.py'),
5320
-                          {'attrib-starts': [('PSPlayer',
5321
-        91),
5322
-        ('PSPlayer.__init__',
5323
-         92)],
5324
-                           'first-line': 2,
5325
-                           'folded-linenos': [],
5326
-                           'sel-line': 121,
5327
-                           'sel-line-start': 4996,
5328
-                           'selection_end': 5024,
5329
-                           'selection_start': 5018},
5330
-                          1480756795.819],
5331
-                         [loc('PlayStream.py'),
5332 5285
                           {'attrib-starts': [('PSPlayer',
5333 5286
         91),
5334 5287
         ('PSPlayer.service_info',
@@ -5484,7 +5437,58 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5484 5437
                            'sel-line-start': 28,
5485 5438
                            'selection_end': 82,
5486 5439
                            'selection_start': 51},
5487
-                          1480758835.647]],
5440
+                          1480758835.647],
5441
+                         [loc('PlayStream.py'),
5442
+                          {'attrib-starts': [('PSPlayer',
5443
+        91),
5444
+        ('PSPlayer.__init__',
5445
+         92)],
5446
+                           'first-line': 131,
5447
+                           'folded-linenos': [],
5448
+                           'sel-line': 138,
5449
+                           'sel-line-start': 5629,
5450
+                           'selection_end': 5663,
5451
+                           'selection_start': 5663},
5452
+                          1480759343.704],
5453
+                         [loc('PlayStream.py'),
5454
+                          {'attrib-starts': [('MainScreen',
5455
+        324)],
5456
+                           'first-line': 327,
5457
+                           'folded-linenos': [],
5458
+                           'sel-line': 331,
5459
+                           'sel-line-start': 12889,
5460
+                           'selection_end': 12909,
5461
+                           'selection_start': 12909},
5462
+                          1480761919.893],
5463
+                         [loc('PlayStream.py'),
5464
+                          {'attrib-starts': [('MainScreen',
5465
+        324)],
5466
+                           'first-line': 320,
5467
+                           'folded-linenos': [],
5468
+                           'sel-line': 331,
5469
+                           'sel-line-start': 12889,
5470
+                           'selection_end': 12911,
5471
+                           'selection_start': 12910},
5472
+                          1480761920.764],
5473
+                         [loc('PlayStream.py'),
5474
+                          {'attrib-starts': [('MainScreen',
5475
+        324)],
5476
+                           'first-line': 320,
5477
+                           'folded-linenos': [],
5478
+                           'sel-line': 331,
5479
+                           'sel-line-start': 12889,
5480
+                           'selection_end': 12930,
5481
+                           'selection_start': 12928},
5482
+                          1480761921.605],
5483
+                         [loc('PlayStream.py'),
5484
+                          {'attrib-starts': [],
5485
+                           'first-line': 9,
5486
+                           'folded-linenos': [],
5487
+                           'sel-line': 14,
5488
+                           'sel-line-start': 466,
5489
+                           'selection_end': 520,
5490
+                           'selection_start': 515},
5491
+                          1480761922.368]],
5488 5492
                         20),
5489 5493
           'current-loc': loc('PlayStream.py'),
5490 5494
           'editor-state-list': [(loc('plugin.py'),
@@ -5499,14 +5503,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5499 5503
                                 (loc('PlayStream.py'),
5500 5504
                                  {'attrib-starts': [('PSPlayer',
5501 5505
         91),
5502
-        ('PSPlayer.start_subtitles_timer',
5503
-         217)],
5504
-                                  'first-line': 131,
5506
+        ('PSPlayer.__init__',
5507
+         92)],
5508
+                                  'first-line': 104,
5505 5509
                                   'folded-linenos': [],
5506
-                                  'sel-line': 142,
5507
-                                  'sel-line-start': 5807,
5508
-                                  'selection_end': 5836,
5509
-                                  'selection_start': 5815}),
5510
+                                  'sel-line': 125,
5511
+                                  'sel-line-start': 5157,
5512
+                                  'selection_end': 5188,
5513
+                                  'selection_start': 5188}),
5510 5514
                                 (loc('util.py'),
5511 5515
                                  {'attrib-starts': [('play_video',
5512 5516
         49)],
@@ -5618,7 +5622,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5618 5622
                                   'sel-line-start': 28,
5619 5623
                                   'selection_end': 82,
5620 5624
                                   'selection_start': 51})],
5621
-          'has-focus': True,
5625
+          'has-focus': False,
5622 5626
           'locked': False},
5623 5627
          [loc('plugin.py'),
5624 5628
           loc('PlayStream.py'),
@@ -6752,7 +6756,8 @@ proj.pypath = {None: ('custom',
6752 6756
                       u'c:\\Data\\Programming\\enigma2\\python;')}
6753 6757
 search.replace-history = [u'self',
6754 6758
                           u'current']
6755
-search.search-history = [u'etimer',
6759
+search.search-history = [u'timer',
6760
+                         u'etimer',
6756 6761
                          u'text=',
6757 6762
                          u'OptionsScreen',
6758 6763
                          u'title=',
@@ -6770,8 +6775,7 @@ search.search-history = [u'etimer',
6770 6775
                          u'list',
6771 6776
                          u'content',
6772 6777
                          u'autoResize',
6773
-                         u'font',
6774
-                         u'choicebox']
6778
+                         u'font']
6775 6779
 testing.stored-results = (1,
6776 6780
                           [],
6777 6781
                           {})

+ 20
- 0
__init__.py Voir le fichier

@@ -0,0 +1,20 @@
1
+from os import environ
2
+from gettext import bindtextdomain, dgettext, gettext
3
+
4
+from Components.Language import language
5
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS
6
+
7
+
8
+def localeInit():
9
+    environ["LANGUAGE"] = language.getLanguage()[:2]
10
+    bindtextdomain("PlayStream", resolveFilename(SCOPE_PLUGINS, "Extensions/PlayStream/locale"))
11
+
12
+def _(txt):
13
+    t = dgettext("PlayStream", txt)
14
+    if t == txt:
15
+        t = gettext(txt)
16
+    return t
17
+
18
+localeInit()
19
+language.addCallback(localeInit)
20
+

+ 146
- 0
imake.bat Voir le fichier

@@ -0,0 +1,146 @@
1
+@echo off
2
+:=== Parameters ===
3
+set ver=0.5j
4
+set prog=PlayStream
5
+set pack_name=enigma2-plugin-extensions-playstream
6
+set desc=Play online streams from various sources, mostly Latvian
7
+
8
+set ext_dir=usr\lib\enigma2\python\Plugins\Extensions\
9
+set ext_dir2=/usr/lib/enigma2/python/Plugins/Extensions/
10
+set script_dir=usr\script\
11
+set ipk_dir=ipkg\
12
+set release_dir=release\
13
+
14
+set AR=\MinGW\bin\ar.exe
15
+set TAR=\MinGW\msys\1.0\bin\tar.exe
16
+
17
+:=== data files ===
18
+if exist %ipk_dir% rm -r -f %ipk_dir% 
19
+mkdir %ipk_dir%
20
+for %%f in (
21
+readme.txt
22
+__init__.py
23
+plugin.py
24
+plugin.png
25
+%prog%.py
26
+%prog%.png
27
+ContentSources.py
28
+VideoDownload.py
29
+enigma2_api.py
30
+resolver.py
31
+util.py
32
+streamproxy.py
33
+offline.mp4
34
+demjson.py
35
+locale\*.*
36
+sources\__init__.py          
37
+sources\SourceBase.py        
38
+sources\cinemalive.py        
39
+sources\config.py            
40
+sources\euronews.py          
41
+sources\filmix.py            
42
+sources\filmon.py            
43
+sources\iplayer.py           
44
+sources\kinofilmnet.py       
45
+sources\ltc.py               
46
+sources\mtgplay.py           
47
+sources\play24.py            
48
+sources\replay.py            
49
+sources\serialguru.py        
50
+sources\tvdom.py             
51
+sources\ustvnow.py           
52
+sources\viaplay.py           
53
+sources\YouTubeVideoUrl.py   
54
+sources\jsinterp.py          
55
+sources\swfinterp.py
56
+sources\streams.cfg
57
+resolvers\__init__.py
58
+resolvers\aadecode.py
59
+resolvers\hqqresolver.py
60
+resolvers\openload3.py
61
+resolvers\youtuberesolver.py
62
+picons\*.*
63
+) do echo f | xcopy /y /q %%f %ipk_dir%data\%ext_dir%%prog%\%%f
64
+
65
+xcopy /y /q streamproxy %ipk_dir%data\etc\init.d\
66
+
67
+:=== control file ===
68
+mkdir %ipk_dir%CONTROL\
69
+rem xcopy  /v /d /y control %ipk_dir%CONTROL\
70
+echo 2.0 >%ipk_dir%debian-binary
71
+(
72
+echo Version: %ver%
73
+echo Package: %pack_name%
74
+echo Description: %desc%
75
+echo Architecture: all
76
+echo Section:
77
+echo Priority: optional
78
+echo Maintainer: ivars777@gmail.com
79
+echo Homepage:
80
+echo Depends: python-json,python-twisted-web,python-simplejson,python-html,python-zlib,python-requests 
81
+echo Source:
82
+) >%ipk_dir%CONTROL\control
83
+dos2unix %ipk_dir%CONTROL\control
84
+
85
+:=== preinst file ===
86
+(
87
+echo #!/bin/sh
88
+:echo if [ -d %ext_dir2%%prog% ]; then
89
+:echo   rm -rf %ext_dir2%%prog%/* ^> /dev/null 2^>^&1
90
+:echo   rm -rf %ext_dir2%%prog%/sources/*.py* ^> /dev/null 2^>^&1
91
+:echo   rm -rf %ext_dir2%%prog%/resolvers/*.py* ^> /dev/null 2^>^&1
92
+:echo fi
93
+echo if [ -e /etc/init.d/streamproxy ]; then
94
+echo   rm /etc/init.d/streamproxy ^> /dev/null 2^>^&1
95
+echo fi
96
+echo exit 0
97
+) >%ipk_dir%CONTROL\preinst
98
+dos2unix %ipk_dir%CONTROL\preinst
99
+
100
+:=== postinst file ===
101
+(
102
+echo #!/bin/sh
103
+echo chmod +x /etc/init.d/streamproxy
104
+echo ln -s /etc/init.d/streamproxy /etc/rc4.d/S50streamproxy
105
+echo ln -s /etc/init.d/streamproxy /etc/rc3.d/S50streamproxy
106
+echo ln -s /etc/init.d/streamproxy /usr/bin/streamproxy
107
+echo exit 0
108
+) >%ipk_dir%CONTROL\postinst
109
+dos2unix %ipk_dir%CONTROL\postinst
110
+
111
+:=== postrm file ===
112
+(
113
+echo #!/bin/sh
114
+:echo if [ -e /etc/rc4.d/S50streamproxy ]; then
115
+echo   rm /etc/rc4.d/S50streamproxy ^> /dev/null 2^>^&1
116
+:echo fi
117
+echo #!/bin/sh
118
+:echo if [ -e /etc/rc3.d/S50streamproxy ]; then
119
+echo   rm /etc/rc3.d/S50streamproxy ^> /dev/null 2^>^&1
120
+:echo fi
121
+:echo if [ -e /usr/bin/streamproxyy ]; then
122
+echo  rm /usr/bin/streamproxy ^> /dev/null 2^>^&1
123
+:echo fi
124
+echo if [ -e /etc/init.d/streamproxy ]; then
125
+echo   rm /etc/init.d/streamproxy ^> /dev/null 2^>^&1
126
+echo fi
127
+echo exit 0
128
+) >%ipk_dir%CONTROL\postrm
129
+dos2unix %ipk_dir%CONTROL\postrm
130
+
131
+:=== conffiles file ===
132
+(
133
+echo %ext_dir2%%prog%/sources/streams.cfg
134
+) >%ipk_dir%CONTROL\conffiles
135
+dos2unix %ipk_dir%CONTROL\conffiles
136
+
137
+:=== create ipk file ===
138
+if not exist %release_dir% mkdir %release_dir%
139
+%TAR% -C ipkg\data --mode=777 -czf ipkg\data.tar.gz .
140
+%TAR% -C ipkg\CONTROL --mode=777 -czf ipkg\control.tar.gz .
141
+if exist %release_dir%%pack_name%_%ver%.ipk del %release_dir%%pack_name%_%ver%.ipk
142
+%AR% -r %release_dir%%pack_name%_%ver% ipkg\debian-binary ipkg\data.tar.gz ipkg\control.tar.gz
143
+@echo on
144
+mv %release_dir%%pack_name%_%ver% %release_dir%%pack_name%_%ver%.ipk
145
+git add %release_dir%%pack_name%_%ver%.ipk
146
+

BIN
release/enigma2-plugin-extensions-playstream_0.5j.ipk Voir le fichier