mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
for fast-scan and cable-scan, put bouquets to beginning of favorites list
This commit is contained in:
@@ -110,7 +110,7 @@ class CBouquetManager
|
||||
void loadBouquets(bool ignoreBouquetFile = false);
|
||||
void renumServices();
|
||||
|
||||
CZapitBouquet* addBouquet(const std::string & name, bool ub = false, bool myfav = false);
|
||||
CZapitBouquet* addBouquet(const std::string & name, bool ub = false, bool myfav = false, bool to_begin = false);
|
||||
void deleteBouquet(const unsigned int id);
|
||||
void deleteBouquet(const CZapitBouquet* bouquet);
|
||||
int existsBouquet(char const * const name, bool ignore_user = false);
|
||||
|
@@ -511,7 +511,7 @@ void CBouquetManager::renumServices()
|
||||
makeRemainingChannelsBouquet();
|
||||
}
|
||||
|
||||
CZapitBouquet* CBouquetManager::addBouquet(const std::string & name, bool ub, bool myfav)
|
||||
CZapitBouquet* CBouquetManager::addBouquet(const std::string & name, bool ub, bool myfav, bool to_begin)
|
||||
{
|
||||
CZapitBouquet* newBouquet = new CZapitBouquet(myfav ? "favorites" : name);
|
||||
newBouquet->bUser = ub;
|
||||
@@ -521,9 +521,13 @@ CZapitBouquet* CBouquetManager::addBouquet(const std::string & name, bool ub, bo
|
||||
//printf("CBouquetManager::addBouquet: %s, user %s\n", name.c_str(), ub ? "YES" : "NO");
|
||||
if(ub) {
|
||||
BouquetList::iterator it;
|
||||
for(it = Bouquets.begin(); it != Bouquets.end(); ++it)
|
||||
if(!(*it)->bUser)
|
||||
break;
|
||||
if (to_begin) {
|
||||
it = Bouquets.begin();
|
||||
} else {
|
||||
for(it = Bouquets.begin(); it != Bouquets.end(); ++it)
|
||||
if(!(*it)->bUser)
|
||||
break;
|
||||
}
|
||||
Bouquets.insert(it, newBouquet);
|
||||
} else
|
||||
Bouquets.push_back(newBouquet);
|
||||
|
@@ -485,7 +485,7 @@ bool CServiceScan::ParseFst(unsigned short pid, fast_scan_operator_t * op)
|
||||
|
||||
bouquetId = g_bouquetManager->existsUBouquet(op->name);
|
||||
if (bouquetId == -1) {
|
||||
bouquet = g_bouquetManager->addBouquet(std::string(op->name), true);
|
||||
bouquet = g_bouquetManager->addBouquet(std::string(op->name), true, false, true);
|
||||
bouquetId = g_bouquetManager->existsUBouquet(op->name);
|
||||
}
|
||||
else
|
||||
|
@@ -334,7 +334,7 @@ _repeat:
|
||||
CZapitBouquet* bouquet;
|
||||
int bouquetId = g_bouquetManager->existsUBouquet(pname.c_str());
|
||||
if (bouquetId == -1)
|
||||
bouquet = g_bouquetManager->addBouquet(pname, true);
|
||||
bouquet = g_bouquetManager->addBouquet(pname, true, false, true);
|
||||
else
|
||||
bouquet = g_bouquetManager->Bouquets[bouquetId];
|
||||
|
||||
|
Reference in New Issue
Block a user