[svn r494] Added function to get the channel list from the MythTV backend. trunk
authorrosfran
Tue Apr 03 19:48:52 2007 +0100 (2007-04-03)
branchtrunk
changeset 4891f143a0376aa
parent 488 f12aac49c2a5
child 490 b15d16fb4039
[svn r494] Added function to get the channel list from the MythTV backend.
gmyth/src/gmyth_util.c
     1.1 --- a/gmyth/src/gmyth_util.c	Tue Apr 03 19:42:53 2007 +0100
     1.2 +++ b/gmyth/src/gmyth_util.c	Tue Apr 03 19:48:52 2007 +0100
     1.3 @@ -565,15 +565,14 @@
     1.4      res = gmyth_recorder_setup (recorder);
     1.5  
     1.6      if (res == TRUE) {
     1.7 -        channel_list = gmyth_recorder_get_channel_list( recorder );        
     1.8 +        //GList* channel_list = gmyth_recorder_get_channel_list( recorder );        
     1.9          gmyth_debug( "Yeah, got channel list!!!" );
    1.10 -        /*
    1.11          GList* ch = NULL;
    1.12          GMythChannelInfo* channel_info = NULL;
    1.13          
    1.14          for ( ch = gmyth_recorder_get_channel_list( recorder ); ch != NULL; )
    1.15          {
    1.16 -            channel_info = g_malloc0(GMythChannelInfo, sizeof(GMythChannelInfo));
    1.17 +            channel_info = g_malloc0( sizeof(GMythChannelInfo) );
    1.18              channel_info->channel_ID = 0;
    1.19              channel_info->channel_num = g_string_new ( g_strdup( (gchar*)ch->data ) );
    1.20              channel_info->channel_name = g_string_new ("");
    1.21 @@ -585,15 +584,14 @@
    1.22              if ( channel_info != NULL )
    1.23                  g_free( channel_info );
    1.24          }
    1.25 -        
    1.26 -        */        
    1.27 -        
    1.28  
    1.29      } /* if */
    1.30      else {
    1.31          gmyth_debug( "No, couldn't get the channel list!!!" );
    1.32      }
    1.33      
    1.34 +    gmyth_debug( "Got %d channels!!!", g_list_length( channel_list ) );
    1.35 +    
    1.36      g_object_unref (recorder);
    1.37      
    1.38      return channel_list;