mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
neutrinoapi.cpp: fix path to iso tab introduced with 3c859db
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
// tuxbox
|
// tuxbox
|
||||||
#include <neutrinoMessages.h>
|
#include <neutrinoMessages.h>
|
||||||
@@ -66,10 +67,13 @@ extern CZapitClient::SatelliteList satList;
|
|||||||
|
|
||||||
//static std::map<std::string, std::string> iso639;
|
//static std::map<std::string, std::string> iso639;
|
||||||
#ifndef initialize_iso639_map
|
#ifndef initialize_iso639_map
|
||||||
|
#define ISO_639_TAB DATADIR "/iso-codes/iso-639.tab"
|
||||||
|
static const char * iso639filename = ISO_639_TAB;
|
||||||
|
|
||||||
bool _initialize_iso639_map(void)
|
bool _initialize_iso639_map(void)
|
||||||
{
|
{
|
||||||
std::string s, t, u, v;
|
std::string s, t, u, v;
|
||||||
std::ifstream in("/share/iso-codes/iso-639.tab");
|
std::ifstream in(iso639filename);
|
||||||
if (in.is_open())
|
if (in.is_open())
|
||||||
{
|
{
|
||||||
while (in.peek() == '#')
|
while (in.peek() == '#')
|
||||||
@@ -85,7 +89,10 @@ bool _initialize_iso639_map(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
std::cout << "[neutrinoapi.cpp] Loading " << iso639filename << " failed." << std::endl;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user