Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
config: move general/base configuration to the simple node system
  • Loading branch information
perexg committed Sep 14, 2015
1 parent 4844b32 commit e8ca1e6
Show file tree
Hide file tree
Showing 29 changed files with 521 additions and 993 deletions.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -193,6 +193,7 @@ I18N-C += $(SRCS-SATIP-SERVER)

SRCS-2 = \
src/api.c \
src/api/api_config.c \
src/api/api_status.c \
src/api/api_idnode.c \
src/api/api_input.c \
Expand Down
1 change: 1 addition & 0 deletions src/api.c
Expand Up @@ -121,6 +121,7 @@ void api_init ( void )

/* Subsystems */
api_idnode_init();
api_config_init();
api_input_init();
api_mpegts_init();
api_service_init();
Expand Down
1 change: 1 addition & 0 deletions src/api.h
Expand Up @@ -60,6 +60,7 @@ int api_exec ( access_t *perm, const char *subsystem,
*/
void api_init ( void );
void api_done ( void );
void api_config_init ( void );
void api_idnode_init ( void );
void api_input_init ( void );
void api_service_init ( void );
Expand Down
36 changes: 36 additions & 0 deletions src/api/api_config.c
@@ -0,0 +1,36 @@
/*
* API - SAT>IP Server related calls
*
* Copyright (C) 2015 Jaroslav Kysela
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; withm even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "tvheadend.h"
#include "channels.h"
#include "access.h"
#include "api.h"
#include "config.h"

void
api_config_init ( void )
{
static api_hook_t ah[] = {
{ "config/load", ACCESS_ADMIN, api_idnode_load_simple, &config },
{ "config/save", ACCESS_ADMIN, api_idnode_save_simple, &config },
{ NULL },
};

api_register_all(ah);
}
6 changes: 3 additions & 3 deletions src/channels.c
Expand Up @@ -557,11 +557,11 @@ channel_get_icon ( channel_t *ch )
{
static char buf[512], buf2[512];
idnode_list_mapping_t *ilm;
const char *chicon = config_get_chicon_path(),
*picon = config_get_picon_path(),
const char *chicon = config.chicon_path,
*picon = config.picon_path,
*icon = ch->ch_icon,
*chname;
uint32_t id, i, pick, prefer = config_get_prefer_picon() ? 1 : 0;
uint32_t id, i, pick, prefer = config.prefer_picon ? 1 : 0;

if (icon && *icon == '\0')
icon = NULL;
Expand Down

0 comments on commit e8ca1e6

Please sign in to comment.