void cEcmHandler::AddEcmPri(cEcmInfo *n)
{
int ident, pri=0;
- while((ident=cSystems::FindIdentBySysId(n->caId,!cam->IsSoftCSA(filterCwIndex==0),pri))>0) {
+ while(1) {
+ if(!n->Cached()) ident=cSystems::FindIdentBySysId(n->caId,!cam->IsSoftCSA(filterCwIndex==0),pri);
+ else ident=(pri==0) ? cSystems::FindIdentBySysName(n->caId,!cam->IsSoftCSA(filterCwIndex==0),n->name,pri) : 0;
+ if(ident<=0) break;
+
cEcmPri *ep=new cEcmPri;
if(ep) {
ep->ecm=n;
return 0;
}
-cSystem *cSystems::FindBySysName(unsigned short SysId, bool ff, const char *Name)
-{
- cSystemLink *sl=FindByName(Name);
- if(sl && (!ff || !sl->noFF) && !ScSetup.Ignore(SysId) && sl->CanHandle(SysId)) return sl->Create();
- return 0;
-}
-
cSystem *cSystems::FindBySysId(unsigned short SysId, bool ff, int oldPri)
{
if(!ScSetup.Ignore(SysId)) {
return 0;
}
+int cSystems::FindIdentBySysName(unsigned short SysId, bool ff, const char *Name, int &Pri)
+{
+ if(!ScSetup.Ignore(SysId)) {
+ cSystemLink *csl=FindByName(Name);
+ if(csl && (!ff || !csl->noFF) && csl->CanHandle(SysId)) {
+ Pri=csl->pri;
+ return csl->sysIdent;
+ }
+ }
+ return 0;
+}
+
cSystem *cSystems::FindBySysIdent(int ident)
{
cSystemLink *csl=FindByIdent(ident);
public:
static int Provides(const unsigned short *SysIds, bool ff);
static cSystem *FindBySysId(unsigned short SysId, bool ff, int oldPri);
- static cSystem *FindBySysName(unsigned short SysId, bool ff, const char *Name);
static int FindIdentBySysId(unsigned short SysId, bool ff, int &Pri);
+ static int FindIdentBySysName(unsigned short SysId, bool ff, const char *Name, int &Pri);
static cSystem *FindBySysIdent(int ident);
static bool Init(const char *cfgdir);
static void Clean(void);