git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix satellite order in channellist
[enigma2.git]
/
lib
/
dvb
/
db.cpp
diff --git
a/lib/dvb/db.cpp
b/lib/dvb/db.cpp
index 17196f050ca840ec84869907528e735d0d3716c7..d40b4b101bf571ed15dcd9dc181242e424ddd544 100644
(file)
--- a/
lib/dvb/db.cpp
+++ b/
lib/dvb/db.cpp
@@
-279,7
+279,8
@@
void eDVBDB::load()
sat.symbol_rate = symbol_rate;
sat.polarisation = polarisation;
sat.fec = fec;
sat.symbol_rate = symbol_rate;
sat.polarisation = polarisation;
sat.fec = fec;
- sat.orbital_position = orbital_position;
+ sat.orbital_position =
+ orbital_position < 0 ? orbital_position + 3600 : orbital_position;
sat.inversion = inversion;
feparm->setDVBS(sat);
} else if (line[1]=='t')
sat.inversion = inversion;
feparm->setDVBS(sat);
} else if (line[1]=='t')
@@
-418,7
+419,8
@@
void eDVBDB::save()
{
fprintf(f, "\ts %d:%d:%d:%d:%d:%d\n",
sat.frequency, sat.symbol_rate,
{
fprintf(f, "\ts %d:%d:%d:%d:%d:%d\n",
sat.frequency, sat.symbol_rate,
- sat.polarisation, sat.fec, sat.orbital_position,
+ sat.polarisation, sat.fec,
+ sat.orbital_position > 1800 ? sat.orbital_position - 3600 : sat.orbital_position,
sat.inversion);
}
if (!ch.m_frontendParameters->getDVBT(ter))
sat.inversion);
}
if (!ch.m_frontendParameters->getDVBT(ter))
@@
-829,7
+831,15
@@
RESULT eDVBDBListQuery::getNextResult(eServiceReferenceDVB &ref)
int eDVBDBListQuery::compareLessEqual(const eServiceReferenceDVB &a, const eServiceReferenceDVB &b)
{
if ( m_query->m_sort == eDVBChannelQuery::tSatellitePosition )
int eDVBDBListQuery::compareLessEqual(const eServiceReferenceDVB &a, const eServiceReferenceDVB &b)
{
if ( m_query->m_sort == eDVBChannelQuery::tSatellitePosition )
- return (a.getDVBNamespace().get() >> 16) < (b.getDVBNamespace().get() >> 16);
+ {
+ int x = (a.getDVBNamespace().get() >> 16);
+ int y = (b.getDVBNamespace().get() >> 16);
+ if ( x > 1800 )
+ x -= 3600;
+ if ( y > 1800 )
+ y -= 3600;
+ return x < y;
+ }
return a.name < b.name;
}
return a.name < b.name;
}
@@
-854,15
+864,12
@@
eDVBDBSatellitesQuery::eDVBDBSatellitesQuery(eDVBDB *db, const eServiceReference
{
eServiceReferenceDVB ref;
ref.setDVBNamespace(dvbnamespace);
{
eServiceReferenceDVB ref;
ref.setDVBNamespace(dvbnamespace);
+ ref.flags=eServiceReference::flagDirectory;
char buf[64];
char buf[64];
-// TODO get real satellite name..
-// but i dont like to parse the satellites.xml here.. and in the python part
- snprintf(buf, 64, "Services - %d", dvbnamespace>>16);
- ref.name=buf;
snprintf(buf, 64, "(satellitePosition == %d) && ", dvbnamespace>>16);
snprintf(buf, 64, "(satellitePosition == %d) && ", dvbnamespace>>16);
+
ref.path=buf+source.path;
unsigned int pos=ref.path.find("FROM");
ref.path=buf+source.path;
unsigned int pos=ref.path.find("FROM");
- ref.flags=eServiceReference::flagDirectory;
ref.path.erase(pos);
ref.path+="ORDER BY name";
// eDebug("ref.path now %s", ref.path.c_str());
ref.path.erase(pos);
ref.path+="ORDER BY name";
// eDebug("ref.path now %s", ref.path.c_str());
@@
-873,8
+880,6
@@
eDVBDBSatellitesQuery::eDVBDBSatellitesQuery(eDVBDB *db, const eServiceReference
ref.path.erase(pos+5);
ref.path+="PROVIDERS ORDER BY name";
// eDebug("ref.path now %s", ref.path.c_str());
ref.path.erase(pos+5);
ref.path+="PROVIDERS ORDER BY name";
// eDebug("ref.path now %s", ref.path.c_str());
- snprintf(buf, 64, "Providers - %d", dvbnamespace>>16);
- ref.name=buf;
m_list.push_back(ref);
}
}
m_list.push_back(ref);
}
}