Commit Graph

184 Commits

Author SHA1 Message Date
svenhoefer
45d0a0558c - add multibox
Signed-off-by: Thilo Graf <dbt@novatux.de>

# Conflicts:
#	src/neutrino.cpp
2022-09-16 22:47:14 +02:00
svenhoefer
a82536d38a - neutrino: add mode_moviebrowser
Signed-off-by: Thilo Graf <dbt@novatux.de>
2022-09-13 20:34:33 +02:00
svenhoefer
66e5d9f609 - helpers: fix warning in neutrinoMode_to_string();
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
../src/system/helpers.cpp:114:16: note: declared here
    std::string res = s.str();
                ^~~

Signed-off-by: Thilo Graf <dbt@novatux.de>
2022-04-23 21:30:33 +02:00
GetAway
bf1375e9bb - more readability for modes while logging 2022-03-27 20:35:54 +02:00
svenhoefer
9ed525d199 - sectionsd: move function build_time() to helpers
Signed-off-by: Thilo Graf <dbt@novatux.de>
2022-01-12 10:03:59 +01:00
svenhoefer
f48c390e47 - helpers: simplify: add url to curl error log
Signed-off-by: Thilo Graf <dbt@novatux.de>
2021-10-03 11:12:59 +02:00
TangoCash
e750dceea2 add url to curl error log 2021-10-01 22:00:12 +02:00
Thilo Graf
0341760ef6 helpers.cpp: fix fallback to 'service' as default command
Our buildsystem/image (Yocto/OE) is using systemctl as default and we have defined 'systemctl' as
3rd parameter (e.g. see drivers/lcd4l.cpp), but users of our source could
use systems without 'systemctl' in their own buildsystems/images,
therefore it makes sense to have a fallback to 'service'.
This should avoid patching the sources.
Thx GetAway for hint.
2021-07-13 21:29:58 +02:00
Thilo Graf
aac340a5e0 helpers.cpp: optimize fallback for use with systemd 2021-07-11 17:37:38 +02:00
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