[svn r208] Added filesize field at RecordedInfo trunk
authormelunko
Wed Dec 06 17:59:09 2006 +0000 (2006-12-06)
branchtrunk
changeset 2076b697111497b
parent 206 f70332afb8d0
child 208 c3c073032757
[svn r208] Added filesize field at RecordedInfo
gmyth/src/gmyth_scheduler.c
gmyth/src/gmyth_scheduler.h
     1.1 --- a/gmyth/src/gmyth_scheduler.c	Wed Dec 06 14:32:10 2006 +0000
     1.2 +++ b/gmyth/src/gmyth_scheduler.c	Wed Dec 06 17:59:09 2006 +0000
     1.3 @@ -259,7 +259,7 @@
     1.4      
     1.5      g_string_printf (query_str, 
     1.6      	"SELECT recordid,programid,chanid,starttime,progstart,"
     1.7 -    	"endtime,progend,title,subtitle,description,category,basename FROM recorded WHERE recgroup != 'LiveTV'");
     1.8 +    	"endtime,progend,title,subtitle,description,category,filesize,basename FROM recorded WHERE recgroup != 'LiveTV'");
     1.9  
    1.10  	if (scheduler->msqlquery == NULL) {
    1.11  		g_warning ("[%s] Scheduler db connection not initialized", __FUNCTION__);
    1.12 @@ -278,9 +278,9 @@
    1.13          while((row = mysql_fetch_row (msql_res))!=NULL){
    1.14          	record = g_new0(RecordedInfo, 1);
    1.15              
    1.16 -            record->record_id  = g_ascii_strtoull (row[0], NULL, 10);
    1.17 -            record->program_id = g_ascii_strtoull (row[1], NULL, 10);
    1.18 -            record->channel_id = g_ascii_strtoull (row[2], NULL, 10);
    1.19 +            record->record_id  = (guint) g_ascii_strtoull (row[0], NULL, 10);
    1.20 +            record->program_id = (guint) g_ascii_strtoull (row[1], NULL, 10);
    1.21 +            record->channel_id = (guint) g_ascii_strtoull (row[2], NULL, 10);
    1.22              
    1.23              /* the db field time already contains the date. therefore
    1.24               * we are not using the date field */
    1.25 @@ -302,9 +302,10 @@
    1.26              record->subtitle = g_string_new (row[8]);
    1.27              record->description = g_string_new (row[9]);
    1.28              record->category = g_string_new (row[10]);
    1.29 -            record->basename = g_string_new (row[11]);
    1.30 +            record->filesize = g_ascii_strtoull (row[11], NULL, 10);
    1.31 +            record->basename = g_string_new (row[12]);
    1.32  
    1.33 -		    *recorded_list = g_list_append (*recorded_list, record);
    1.34 + 	    *recorded_list = g_list_append (*recorded_list, record);
    1.35      	}
    1.36      }
    1.37      
     2.1 --- a/gmyth/src/gmyth_scheduler.h	Wed Dec 06 14:32:10 2006 +0000
     2.2 +++ b/gmyth/src/gmyth_scheduler.h	Wed Dec 06 17:59:09 2006 +0000
     2.3 @@ -113,19 +113,21 @@
     2.4  } ScheduleInfo;
     2.5  
     2.6  typedef struct {
     2.7 -    gint    record_id;
     2.8 -    gint    program_id;
     2.9 -    gint    channel_id;
    2.10 +    guint    record_id;
    2.11 +    guint    program_id;
    2.12 +    guint    channel_id;
    2.13  
    2.14      time_t start_time;
    2.15      time_t end_time;
    2.16  
    2.17 -	GString *title;
    2.18 -	GString *subtitle;
    2.19 -	GString *description;
    2.20 -	GString *category;
    2.21 +    GString *title;
    2.22 +    GString *subtitle;
    2.23 +    GString *description;
    2.24 +    GString *category;
    2.25      
    2.26 -	GString *basename;
    2.27 +    GString *basename;
    2.28 +
    2.29 +    guint64 filesize;
    2.30      
    2.31  } RecordedInfo;
    2.32