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 loadBouquets(bool ignoreBouquetFile = false);
|
||||||
void renumServices();
|
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 unsigned int id);
|
||||||
void deleteBouquet(const CZapitBouquet* bouquet);
|
void deleteBouquet(const CZapitBouquet* bouquet);
|
||||||
int existsBouquet(char const * const name, bool ignore_user = false);
|
int existsBouquet(char const * const name, bool ignore_user = false);
|
||||||
|
@@ -511,7 +511,7 @@ void CBouquetManager::renumServices()
|
|||||||
makeRemainingChannelsBouquet();
|
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);
|
CZapitBouquet* newBouquet = new CZapitBouquet(myfav ? "favorites" : name);
|
||||||
newBouquet->bUser = ub;
|
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");
|
//printf("CBouquetManager::addBouquet: %s, user %s\n", name.c_str(), ub ? "YES" : "NO");
|
||||||
if(ub) {
|
if(ub) {
|
||||||
BouquetList::iterator it;
|
BouquetList::iterator it;
|
||||||
for(it = Bouquets.begin(); it != Bouquets.end(); ++it)
|
if (to_begin) {
|
||||||
if(!(*it)->bUser)
|
it = Bouquets.begin();
|
||||||
break;
|
} else {
|
||||||
|
for(it = Bouquets.begin(); it != Bouquets.end(); ++it)
|
||||||
|
if(!(*it)->bUser)
|
||||||
|
break;
|
||||||
|
}
|
||||||
Bouquets.insert(it, newBouquet);
|
Bouquets.insert(it, newBouquet);
|
||||||
} else
|
} else
|
||||||
Bouquets.push_back(newBouquet);
|
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);
|
bouquetId = g_bouquetManager->existsUBouquet(op->name);
|
||||||
if (bouquetId == -1) {
|
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);
|
bouquetId = g_bouquetManager->existsUBouquet(op->name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -334,7 +334,7 @@ _repeat:
|
|||||||
CZapitBouquet* bouquet;
|
CZapitBouquet* bouquet;
|
||||||
int bouquetId = g_bouquetManager->existsUBouquet(pname.c_str());
|
int bouquetId = g_bouquetManager->existsUBouquet(pname.c_str());
|
||||||
if (bouquetId == -1)
|
if (bouquetId == -1)
|
||||||
bouquet = g_bouquetManager->addBouquet(pname, true);
|
bouquet = g_bouquetManager->addBouquet(pname, true, false, true);
|
||||||
else
|
else
|
||||||
bouquet = g_bouquetManager->Bouquets[bouquetId];
|
bouquet = g_bouquetManager->Bouquets[bouquetId];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user