added position

This commit is contained in:
Dmitriy Yefremov
2017-10-09 15:49:13 +03:00
parent ef0d89a40e
commit 84e9442e05
4 changed files with 7899 additions and 9 deletions

2373
main/data/lamedb Normal file

File diff suppressed because it is too large Load Diff

5469
main/data/satellites.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,18 @@
<requires lib="gtk+" version="3.12"/>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkAction" id="action2"/>
<object class="GtkListStore" id="fav_liststore"/>
<object class="GtkListStore" id="fav_liststore">
<columns>
<!-- column-name Num -->
<column type="gint"/>
<!-- column-name Service -->
<column type="gchararray"/>
<!-- column-name Type -->
<column type="gchararray"/>
<!-- column-name pos -->
<column type="gfloat"/>
</columns>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -50,6 +61,8 @@
<column type="gchararray"/>
<!-- column-name system -->
<column type="gchararray"/>
<!-- column-name pos -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkApplicationWindow" id="main_window">
@@ -620,6 +633,18 @@
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="pos_column1">
<property name="resizable">True</property>
<property name="title" translatable="yes">Pos</property>
<child>
<object class="GtkCellRendererText" id="pos_cellrenderertext1"/>
<attributes>
<attribute name="text">9</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
@@ -646,12 +671,12 @@
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="fav_column">
<object class="GtkTreeViewColumn" id="num_column">
<property name="resizable">True</property>
<property name="sizing">autosize</property>
<property name="title" translatable="yes">FAV</property>
<property name="title" translatable="yes">Num</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext3"/>
<object class="GtkCellRendererText" id="num_cellrenderertext"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
@@ -659,18 +684,40 @@
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="srv_column">
<object class="GtkTreeViewColumn" id="service_column1">
<property name="resizable">True</property>
<property name="sizing">autosize</property>
<property name="title" translatable="yes">Srv</property>
<property name="title" translatable="yes">Service</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext4"/>
<object class="GtkCellRendererText" id="service_cellrenderertext1"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="type_column">
<property name="title" translatable="yes">Type</property>
<child>
<object class="GtkCellRendererText" id="type_cellrenderertext"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="pos_column">
<property name="title" translatable="yes">Pos</property>
<child>
<object class="GtkCellRendererText" id="pos_cellrenderertext"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>

View File

@@ -6,7 +6,8 @@
from collections import namedtuple
from enum import Enum
Channel = namedtuple("Channel", ["service", "package", "service_type", "ssid", "freq", "rate", "pol", "fec", "system"])
Channel = namedtuple("Channel", ["service", "package", "service_type",
"ssid", "freq", "rate", "pol", "fec", "system", "pos"])
_HEADER = "eDVB services /4/"
_FILE_PATH = "../data/lamedb"
@@ -80,7 +81,7 @@ def get_channels(*args):
pack = pack[2:] if pack.find(",") < 0 else pack[2:pack.find(",")]
channels.append(Channel(ch[1], pack, SERVICE_TYPE.get(int(data[4]), SERVICE_TYPE[-2]), data[0], tr[0],
tr[1], Polarization(int(tr[2])).name,
FEC[int(tr[3])], SYSTEM[int(tr[6])]))
FEC[int(tr[3])], SYSTEM[int(tr[6])], "{}{}.{}".format(*list(tr[4]))))
return channels