Thilo Graf
86d30a4740
heipers.cpp: use getuid() instead getenv()
...
Enabled only on generic hardware.
Thanks seife for hint.
2021-06-30 09:45:47 +02:00
Thilo Graf
c607434f2a
helpers.cpp: supplement to: 5289cb6
helpers.cpp: fix possible crash
2021-06-29 09:34:28 +02:00
Thilo Graf
5289cb6b15
helpers.cpp: fix possible crash
...
Possible error is:
terminate called after throwing an instance of 'std::logic_error'
2021-06-28 14:40:21 +02:00
svenhoefer
86a45fbe2c
- helpers: fix return value of exec_controlscript() too
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2021-06-23 06:58:40 +02:00
svenhoefer
c9ac37f102
- helpers: fix error message in exec_initscript()
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2021-06-23 06:56:29 +02:00
Thilo Graf
0ca098eb31
helpers: modify exec_initscript() for usage with systemctl
...
Current behavior is untouched, but return value is boolean
and so far, the function obviously has returned true on error. So far this
was currently not evaluated but is changed now. Otherwise, "bool" makes
not really sense or was this intended?
2021-06-20 17:46:07 +02:00
svenhoefer
c5c635c7a7
- add Maxytec Multibox SE 4K
...
Conflicts:
src/neutrino.cpp
Signed-off-by: Thilo Graf <dbt@novatux.de >
2021-05-30 16:46:13 +02:00
svenhoefer
e65acc6558
- helpers: add getBoxMode() function
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2021-03-15 15:59:16 +01:00
svenhoefer
6eb0c6af44
- helpers: add function to execute init scripts
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2021-02-03 13:04:44 +01:00
svenhoefer
bb81d0b7ed
- helpers: remove hardcoded path
...
Conflicts:
src/system/helpers.cpp
Signed-off-by: Thilo Graf <dbt@novatux.de >
2020-12-12 16:18:04 +01:00
Thilo Graf
2570333010
helpers.h/cpp: add default timeout parameter with value 1
...
For flexible usage of timeout in related downloadUrl methods if required.
2020-11-16 08:37:53 +01:00
TangoCash
878b3bc03b
set download logo timeout to 1 sec
2020-11-16 08:02:34 +01:00
svenhoefer
31cea8ca29
- helpers: add function to get backup suffix
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2020-11-15 15:31:43 +01:00
TangoCash
031f8eb12c
keep all logo-naming conventions together
2020-09-24 17:12:10 +02:00
Markus Volk
7c5f7573e6
helpers.cpp: fix narrowing conversion
...
switch expression is 'int', but f_type gets stored as 'long unsigned int' on 32-bit machines since it may not fit otherwise. Recent compilers diagnose this and bail out with:
../../../git/src/system/helpers.cpp:330:9: error: narrowing conversion of '2240043254' from 'long unsigned int' to 'int' [-Wnarrowing]
casting the switch expression to long unsigned int seems to be the solution.
in short: this fixes the build for 32-bit machines with gcc ≥ 10.x
Signed-off-by: Markus Volk <f_l_k@t-online.de >
2020-08-05 05:33:57 +02:00
Thilo Graf
75d77244f8
helpers.cpp: add add script name to debug output
2020-07-07 20:02:51 +02:00
svenhoefer
df692287d8
- rework VUPLUS defines
...
Conflicts:
src/gui/cam_menu.cpp
src/neutrino_menue.cpp
src/zapit/src/zapit.cpp
Signed-off-by: Thilo Graf <dbt@novatux.de >
2020-06-15 20:00:35 +02:00
Thilo Graf
f71e5a1e5f
add boxmodel OSMIO4K
...
update to version 3.11.1
2020-02-19 21:42:18 +01:00
Markus Volk
bc0165ae75
unify boxmodel name
2020-02-18 18:48:30 +01:00
Markus Volk
6aa82141ff
add osmioplus4k stb
2020-02-16 08:42:17 +01:00
svenhoefer
cff41d02e4
- helpers: fix getBaseName() and getFileExt() for urls with query-strings
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2020-02-15 21:42:38 +01:00
svenhoefer
7c88a340df
- update: move function to get active partition to helpers.cpp
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2020-01-05 16:53:14 +01:00
GetAway
672959e68f
helpers.cpp: introduce safe_strncpy() and use it
2019-06-18 19:37:11 +02:00
Jacek Jendrzej
5fa551dab6
YT use htmlEntityDecode with title
2019-06-01 16:31:27 +02:00
Thilo Graf
5fa79b2232
helpers: add to_string() for char
2019-05-05 14:14:34 +02:00
Thilo Graf
cca09c7469
helpers: add trim methodes for left and right trim
2019-03-28 11:29:44 +01:00
Thilo Graf
531227a482
helpers: add isDigitWord() function
...
returns true if all chars of string parameter are digits
2019-03-28 11:29:41 +01:00
svenhoefer
b027bec157
- helpers: add function to execute control scripts
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2019-02-11 10:26:19 +01:00
Thilo Graf
ffbb24609c
helpers.cpp: reduce debug output in downloadUrl()
...
Usage of debug level INFO should be enough.
2018-10-28 19:41:22 +01:00
TangoCash
42e7b0a55f
adding caching xmltv logos
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2018-10-02 23:24:53 +02:00
svenhoefer
f5754b74f2
- helpers: rework new random-functions to get the code more reuseable
...
* introduceand use LOGODIR_TMP (storage dir for webchannel logos)
Signed-off-by: Thilo Graf <dbt@novatux.de >
2018-10-02 23:24:52 +02:00
TangoCash
1948302c72
adding download helping function
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2018-09-09 20:25:57 +02:00
TangoCash
cf885b1027
implement own tmp function / satify compiler
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
2018-09-02 17:21:58 +02:00
Thilo Graf
bd36134e17
src/system/helpers.cpp: fix cherry pick
...
protected space was broken
2018-08-28 10:13:22 +02:00
TangoCash
153cce9d95
adding some curl helpers
...
Signed-off-by: Thilo Graf <dbt@novatux.de >
NOTE: this pick makes build broken because of some previous declarations
2018-08-23 10:37:56 +02:00
TangoCash
f8b623178e
fix webif xml encoding, part 2
2018-03-31 13:07:36 +02:00
Jacek Jendrzej
7ad4a0e6cc
Merge branch 'master' into pu/mp
2017-10-02 13:56:25 +02:00
Stefan Seyfried
2f39081708
helpers/readFile: limit memory allocations
2017-10-02 13:43:57 +02:00
M. Liebmann
600d215aaf
Merge branch 'master' into pu/mp
2017-09-19 23:21:21 +02:00
M. Liebmann
05d8ed4105
helpers.cpp: Add new functions
...
- readFile()
- parseJsonFromFile()
- parseJsonFromString()
parseJsonFromString() and parseJsonFromFile() use Json::CharReader
instead of the obsolete function Json::Reader
2017-09-19 23:20:39 +02:00
M. Liebmann
bdfccc2f22
Merge branch 'master' into pu/mp
2017-09-14 15:37:58 +02:00
M. Liebmann
020936acbe
system/helpers.cpp: Add cstr_replace()
...
- This is a faster C version of str_replace()
2017-09-14 15:37:36 +02:00
Jacek Jendrzej
2ebb47f519
Merge branch 'master' into pu/mp
2017-09-14 13:54:04 +02:00
svenhoefer
43c7e0ed09
helpers.chh/h: add some helper functions
...
Partial cherry pick from:
https://bitbucket.org/neutrino-images/ni-neutrino-hd
Signed-off-by: Thilo Graf <dbt@novatux.de >
2017-09-14 12:14:41 +02:00
Stefan Seyfried
5c95139207
Merge remote-tracking branch 'tuxbox/master'
2017-02-22 08:44:53 +01:00
M. Liebmann
0c182785e2
src/system/helpers.cpp: Add function readLink()
2017-02-22 06:24:48 +01:00
Stefan Seyfried
e1e2052edb
system/helpers: disable GetWidth4FB_HW_ACC()
...
...will be removed later
2017-02-14 20:01:55 +01:00
Stefan Seyfried
c95601630a
system/helpers: disable GetWidth4FB_HW_ACC()
...
...will be removed later
2017-02-14 00:15:11 +01:00
Stefan Seyfried
e490f84ea8
replace framebuffer.h include with forward declaration
...
instead of including framebuffer.h almost everywhere, replace it with
class CFrameBuffer forward declarations and/or generic system includes.
Add a hack to define fb_pixel_t to config.h (one reason for
framebuffer.h includes was the fb_pixel_t define)
2017-02-07 17:23:42 +01:00
Stefan Seyfried
63b6efd1f5
replace framebuffer.h include with forward declaration
...
instead of including framebuffer.h almost everywhere, replace it with
class CFrameBuffer forward declarations and/or generic system includes.
Add a hack to define fb_pixel_t to config.h (one reason for
framebuffer.h includes was the fb_pixel_t define)
2017-02-05 13:05:07 +01:00