# HG changeset patch # User melunko # Date 1165427949 0 # Node ID 6b697111497bab912cc7d817a445ac04e49be2f7 # Parent f70332afb8d0a47ac16a40a240cce1e581411b67 [svn r208] Added filesize field at RecordedInfo diff -r f70332afb8d0 -r 6b697111497b gmyth/src/gmyth_scheduler.c --- a/gmyth/src/gmyth_scheduler.c Wed Dec 06 14:32:10 2006 +0000 +++ b/gmyth/src/gmyth_scheduler.c Wed Dec 06 17:59:09 2006 +0000 @@ -259,7 +259,7 @@ g_string_printf (query_str, "SELECT recordid,programid,chanid,starttime,progstart," - "endtime,progend,title,subtitle,description,category,basename FROM recorded WHERE recgroup != 'LiveTV'"); + "endtime,progend,title,subtitle,description,category,filesize,basename FROM recorded WHERE recgroup != 'LiveTV'"); if (scheduler->msqlquery == NULL) { g_warning ("[%s] Scheduler db connection not initialized", __FUNCTION__); @@ -278,9 +278,9 @@ while((row = mysql_fetch_row (msql_res))!=NULL){ record = g_new0(RecordedInfo, 1); - record->record_id = g_ascii_strtoull (row[0], NULL, 10); - record->program_id = g_ascii_strtoull (row[1], NULL, 10); - record->channel_id = g_ascii_strtoull (row[2], NULL, 10); + record->record_id = (guint) g_ascii_strtoull (row[0], NULL, 10); + record->program_id = (guint) g_ascii_strtoull (row[1], NULL, 10); + record->channel_id = (guint) g_ascii_strtoull (row[2], NULL, 10); /* the db field time already contains the date. therefore * we are not using the date field */ @@ -302,9 +302,10 @@ record->subtitle = g_string_new (row[8]); record->description = g_string_new (row[9]); record->category = g_string_new (row[10]); - record->basename = g_string_new (row[11]); + record->filesize = g_ascii_strtoull (row[11], NULL, 10); + record->basename = g_string_new (row[12]); - *recorded_list = g_list_append (*recorded_list, record); + *recorded_list = g_list_append (*recorded_list, record); } } diff -r f70332afb8d0 -r 6b697111497b gmyth/src/gmyth_scheduler.h --- a/gmyth/src/gmyth_scheduler.h Wed Dec 06 14:32:10 2006 +0000 +++ b/gmyth/src/gmyth_scheduler.h Wed Dec 06 17:59:09 2006 +0000 @@ -113,19 +113,21 @@ } ScheduleInfo; typedef struct { - gint record_id; - gint program_id; - gint channel_id; + guint record_id; + guint program_id; + guint channel_id; time_t start_time; time_t end_time; - GString *title; - GString *subtitle; - GString *description; - GString *category; + GString *title; + GString *subtitle; + GString *description; + GString *category; - GString *basename; + GString *basename; + + guint64 filesize; } RecordedInfo;