[svn r944] Now add/cancel a schedule recording while livetv is running is finnaly working fine. trunk
authormelunko
Mon Mar 03 11:33:49 2008 +0000 (2008-03-03)
branchtrunk
changeset 935067904b6921f
parent 934 608cb47819c6
child 936 d389914210cf
[svn r944] Now add/cancel a schedule recording while livetv is running is finnaly working fine.
gmyth/gmyth/gmyth_scheduler.c
gmyth/gmyth/gmyth_scheduler.h
gmyth/gmyth/gmyth_util.c
     1.1 --- a/gmyth/gmyth/gmyth_scheduler.c	Sat Mar 01 23:15:42 2008 +0000
     1.2 +++ b/gmyth/gmyth/gmyth_scheduler.c	Mon Mar 03 11:33:49 2008 +0000
     1.3 @@ -61,6 +61,10 @@
     1.4                                       GMythProgramInfo *prog_info,
     1.5                                       gchar *new_group);
     1.6  
     1.7 +static gint
     1.8 +gmyth_scheduler_query_schedule_list (GMythScheduler * scheduler,
     1.9 +                                     GList ** schedule_list,
    1.10 +                                     gchar *filter);
    1.11  
    1.12  
    1.13  static gboolean update_backend(GMythScheduler * scheduler, gint record_id);
    1.14 @@ -225,25 +229,62 @@
    1.15   * @return The amount of schedules retrieved from database, or -1 if error.
    1.16   */
    1.17  gint
    1.18 -gmyth_scheduler_get_schedule_list(GMythScheduler * scheduler,
    1.19 -                                  GList ** schedule_list)
    1.20 +gmyth_scheduler_get_schedule_list (GMythScheduler * scheduler,
    1.21 +                                   GList ** schedule_list)
    1.22  {
    1.23 +    return gmyth_scheduler_query_schedule_list (scheduler, schedule_list, NULL);
    1.24 +}
    1.25 +
    1.26 +ScheduleInfo*
    1.27 +gmyth_scheduler_get_schedule (GMythScheduler * scheduler, gint sched_id)
    1.28 +{
    1.29 +    GList *sched_list = NULL;
    1.30 +    ScheduleInfo *schedule = NULL;
    1.31 +    gchar *filter;
    1.32 +    gint count;
    1.33 +
    1.34 +    filter = g_strdup_printf ("WHERE recordid=%d", sched_id);
    1.35 +
    1.36 +    count = gmyth_scheduler_query_schedule_list (scheduler, &sched_list, filter);
    1.37 +    if ((count > 0) && (sched_list != NULL)) {
    1.38 +        schedule = (ScheduleInfo*) sched_list->data;
    1.39 +	g_list_free (sched_list);
    1.40 +    }
    1.41 +
    1.42 +    g_free (filter);
    1.43 +    return schedule;
    1.44 +}
    1.45 +
    1.46 +static gint
    1.47 +gmyth_scheduler_query_schedule_list (GMythScheduler * scheduler,
    1.48 +		                     GList ** schedule_list,
    1.49 +				     gchar *filter)
    1.50 +{
    1.51 +	
    1.52      ScheduleInfo   *schedule;
    1.53      MYSQL_RES      *msql_res;
    1.54      GString        *query_str = g_string_new("");
    1.55      gchar          *date_time = NULL;
    1.56  
    1.57      assert(scheduler);
    1.58 -
    1.59 -    g_string_printf(query_str,
    1.60 -                    "SELECT recordid,programid,chanid,starttime,startdate,"
    1.61 -                    "endtime,enddate,title,subtitle,description,category,type,parentid,seriesid FROM record;");
    1.62 -
    1.63      if (scheduler->msqlquery == NULL) {
    1.64          g_warning("[%s] Scheduler db connection not initialized",
    1.65                    __FUNCTION__);
    1.66          return -1;
    1.67      }
    1.68 +
    1.69 +    if (filter == NULL) {
    1.70 +        g_string_printf(query_str,
    1.71 +                        "SELECT recordid,programid,chanid,starttime,startdate,"
    1.72 +                        "endtime,enddate,title,subtitle,description,category,type,parentid,seriesid FROM record;");
    1.73 +    } else {
    1.74 +        g_string_printf(query_str,
    1.75 +                        "SELECT recordid,programid,chanid,starttime,startdate,"
    1.76 +                        "endtime,enddate,title,subtitle,description,category,type,parentid,seriesid FROM record "
    1.77 +			"%s;", filter);
    1.78 +
    1.79 +    }
    1.80 +
    1.81      msql_res =
    1.82          gmyth_query_process_statement(scheduler->msqlquery,
    1.83                                        query_str->str);
    1.84 @@ -496,7 +537,7 @@
    1.85                               ScheduleInfo * schedule_info, GMythScheduleType type)
    1.86  {
    1.87      MYSQL_RES      *msql_res;
    1.88 -    gchar          *query_str = "INSERT record (recordid) VALUE (0);";
    1.89 +    gchar          *query_str = NULL;
    1.90      gchar          *station = NULL;
    1.91      gulong          rec_id;
    1.92  
    1.93 @@ -521,9 +562,9 @@
    1.94  	gint recorder_num = 
    1.95                  gmyth_scheduler_is_program_live_recorded (scheduler, schedule_info,
    1.96                                                            &prog_info);
    1.97 -	if (recorder_num > 0) {
    1.98 -	    g_debug ("Recording already found in livetv... setting live record");
    1.99 +	if ((recorder_num > 0) && (prog_info != NULL)) {
   1.100              gmyth_scheduler_change_record_group (scheduler, prog_info, "Default");
   1.101 +	    schedule_info->schedule_id = prog_info->recordid;
   1.102  
   1.103              return gmyth_scheduler_set_live_record (scheduler, schedule_info,
   1.104  			recorder_num, TRUE);
   1.105 @@ -532,7 +573,8 @@
   1.106  
   1.107      msql_res =
   1.108          gmyth_query_process_statement_with_increment(scheduler->msqlquery,
   1.109 -                                                     query_str, &rec_id);
   1.110 +			              "INSERT record (recordid) VALUE (0);",
   1.111 +                                      &rec_id);
   1.112      mysql_free_result(msql_res);
   1.113  
   1.114      // Retrieves the station info
   1.115 @@ -665,13 +707,12 @@
   1.116          GList *iter = list;
   1.117  	while (iter) {
   1.118  	    GMythRecorder *recorder = GMYTH_RECORDER ( iter->data );
   1.119 -	    g_debug ("XXXX verifying the recorder %d", recorder->recorder_num);
   1.120  	    
   1.121              if (gmyth_recorder_is_recording (recorder)) {
   1.122                  GMythProgramInfo *pinfo = gmyth_recorder_get_current_program_info (recorder);
   1.123  		if (pinfo != NULL) {
   1.124 -		    if ((schedule_info->channel_id == pinfo->channel_id)) {
   1.125 -			g_debug ("XXXXXX recorder %d is recording the program", recorder->recorder_num);
   1.126 +		    if ((schedule_info->channel_id == pinfo->channel_id) &&
   1.127 +			(schedule_info->start_time->tv_sec == pinfo->startts->tv_sec)) {
   1.128  			recorder_num = recorder->recorder_num;
   1.129                          *prog_info = pinfo;
   1.130  			break;
   1.131 @@ -708,7 +749,6 @@
   1.132  
   1.133      socket = gmyth_backend_info_get_connected_socket (scheduler->backend_info);
   1.134      if (socket != NULL) {
   1.135 -	    g_debug ("XXXX sending command for live recording");
   1.136          ret = (gmyth_socket_sendreceive_stringlist(socket, strlist) > 0);
   1.137          g_object_unref (socket);
   1.138      } else {
   1.139 @@ -734,10 +774,8 @@
   1.140          return FALSE;
   1.141      }
   1.142  
   1.143 -    //prog_info->recstartts->tv_sec += 60*60*2;
   1.144      startts = gmyth_util_time_to_string_from_time_val (prog_info->recstartts);
   1.145  
   1.146 -    g_debug ("\n\n%s\n\n", startts);
   1.147      query_str = g_strdup_printf("UPDATE recorded SET recgroup = \"%s\" "
   1.148                      "WHERE chanid = \"%d\" AND starttime = \"%s\"",
   1.149                       new_group, prog_info->channel_id, startts);
   1.150 @@ -759,11 +797,10 @@
   1.151   * @return gboolean TRUE if success, FALSE if error
   1.152   */
   1.153  gboolean
   1.154 -gmyth_scheduler_delete_schedule(GMythScheduler * scheduler, gint schedule_id)
   1.155 +gmyth_scheduler_delete_schedule (GMythScheduler * scheduler, gint schedule_id)
   1.156  {
   1.157 -
   1.158 -    MYSQL_RES      *msql_res;
   1.159 -    GString        *query_str = NULL;
   1.160 +    MYSQL_RES *msql_res;
   1.161 +    GString *query_str = NULL;
   1.162  
   1.163      g_return_val_if_fail (scheduler != NULL, FALSE);
   1.164  
   1.165 @@ -774,6 +811,28 @@
   1.166          return FALSE;
   1.167      }
   1.168  
   1.169 +    {
   1.170 +        /* Before adding the schedule, we need to check if program is been played */
   1.171 +        GMythProgramInfo *prog_info = NULL;
   1.172 +        ScheduleInfo *sched_info = NULL;
   1.173 +
   1.174 +        sched_info = gmyth_scheduler_get_schedule (scheduler, schedule_id);
   1.175 +        if (sched_info != NULL) {
   1.176 +            gint recorder_num =
   1.177 +                gmyth_scheduler_is_program_live_recorded (scheduler, sched_info,
   1.178 +                                                          &prog_info);
   1.179 +            if ((recorder_num > 0) && (prog_info != NULL)) {
   1.180 +		gboolean ret;
   1.181 +                gmyth_scheduler_change_record_group (scheduler, prog_info, "LiveTV");
   1.182 +
   1.183 +                ret = gmyth_scheduler_set_live_record (scheduler, sched_info,
   1.184 +                            recorder_num, FALSE);
   1.185 +                gmyth_schedule_info_free (sched_info);
   1.186 +		return ret;		
   1.187 +            } 
   1.188 +	}
   1.189 +    }
   1.190 +
   1.191      query_str = g_string_new("");
   1.192      g_string_printf(query_str,
   1.193                      "DELETE FROM record WHERE recordid=%d", schedule_id);
   1.194 @@ -883,175 +942,6 @@
   1.195      return FALSE;
   1.196  }
   1.197  
   1.198 -
   1.199 -gboolean gmyth_scheduler_reactivate_schedule(GMythScheduler* scheduler, gint channel_id,
   1.200 -                                             time_t start_time)
   1.201 -
   1.202 -{
   1.203 -    MYSQL_RES      *msql_res;
   1.204 -    GString        *query_str = g_string_new("");
   1.205 -
   1.206 -    assert(scheduler);
   1.207 -    g_string_printf(query_str, "SELECT callsign FROM channel "
   1.208 -                    "WHERE chanid = \"%d\"", channel_id);
   1.209 -
   1.210 -    msql_res = gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
   1.211 -    if (msql_res) {
   1.212 -        MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
   1.213 -        if (msql_row) {
   1.214 -            GString* callsign = g_string_new(msql_row[0]);
   1.215 -            GString* startts = gmyth_util_time_to_string(start_time);
   1.216 -            g_string_printf(query_str, "UPDATE oldrecorded SET reactivate = 1 "
   1.217 -                            "WHERE station = \"%s\" AND starttime = \"%s\"",
   1.218 -                            callsign->str, startts->str);
   1.219 -            gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
   1.220 -            g_string_free(callsign, TRUE);
   1.221 -            g_string_free(startts, TRUE);
   1.222 -            g_string_free(query_str, TRUE);
   1.223 -            return TRUE;
   1.224 -        }
   1.225 -
   1.226 -    }
   1.227 -
   1.228 -    return FALSE;
   1.229 -}
   1.230 -
   1.231 -
   1.232 -/*
   1.233 - * This should only be used in special situations. We do not know the time that
   1.234 - * the recording was set. We just know that it is an "ongoing" record and then
   1.235 - * we have to use this to get it's info. It's always the oldest one -> first on list
   1.236 - *
   1.237 - */
   1.238 -GMythProgramInfo*
   1.239 -gmyth_scheduler_get_recorded_on_time(GMythScheduler* scheduler,
   1.240 -                                     guint channel_id)
   1.241 -{
   1.242 -    MYSQL_RES      *msql_res;
   1.243 -    GMythProgramInfo *proginfo = NULL;
   1.244 -    GString        *query_str = g_string_new("");
   1.245 -
   1.246 -    assert(scheduler);
   1.247 -
   1.248 -    g_string_printf(query_str,
   1.249 -                    "SELECT recorded.chanid,starttime,endtime,title,"
   1.250 -                    "subtitle,description,channel.channum,"
   1.251 -                    "channel.callsign,channel.name,channel.commfree,"
   1.252 -                    "channel.outputfilters,seriesid,programid,filesize,"
   1.253 -                    "lastmodified,stars,previouslyshown,originalairdate,"
   1.254 -                    "hostname,recordid,transcoder,playgroup,"
   1.255 -                    "recorded.recpriority,progstart,progend,basename,recgroup,"
   1.256 -                    "category,findid,duplicate "
   1.257 -                    "FROM recorded " "LEFT JOIN channel "
   1.258 -                    "ON recorded.chanid = channel.chanid "
   1.259 -                    "WHERE recorded.chanid = %d "
   1.260 -                    "ORDER BY starttime DESC", channel_id);
   1.261 -
   1.262 -    msql_res =
   1.263 -        gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
   1.264 -
   1.265 -    if (msql_res) {
   1.266 -        MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
   1.267 -
   1.268 -        if (msql_row) {
   1.269 -            proginfo = gmyth_program_info_new();
   1.270 -
   1.271 -            proginfo->channel_id = (gint) g_ascii_strtoull (msql_row[0], NULL, 10);
   1.272 -            proginfo->recstartts = gmyth_util_string_to_time_val(msql_row[1]);
   1.273 -            proginfo->recendts = gmyth_util_string_to_time_val(msql_row[2]);
   1.274 -
   1.275 -            proginfo->title = g_string_new(msql_row[3]);
   1.276 -            proginfo->subtitle = g_string_new(msql_row[4]);
   1.277 -            proginfo->description = g_string_new(msql_row[5]);
   1.278 -
   1.279 -            proginfo->chanstr = g_string_new(msql_row[6]);
   1.280 -            proginfo->chansign = g_string_new(msql_row[7]);
   1.281 -            proginfo->channame = g_string_new(msql_row[8]);
   1.282 -            proginfo->chancommfree = (gint) g_ascii_strtoull(msql_row[9], NULL, 10);
   1.283 -            proginfo->chanOutputFilters = g_string_new(msql_row[10]);
   1.284 -            proginfo->seriesid = g_string_new(msql_row[11]);
   1.285 -            proginfo->program_id = g_string_new(msql_row[12]);
   1.286 -            proginfo->filesize = g_ascii_strtoull(msql_row[13], NULL, 10);
   1.287 -
   1.288 -            proginfo->lastmodified = gmyth_util_string_to_time_val(msql_row[14]);
   1.289 -            proginfo->stars = g_ascii_strtod(msql_row[15], NULL);
   1.290 -            proginfo->repeat = (gint)g_ascii_strtoull(msql_row[16], NULL, 10);
   1.291 -
   1.292 -            if (msql_row[17] == NULL) {
   1.293 -                proginfo->originalAirDate = 0;
   1.294 -                proginfo->hasAirDate = FALSE;
   1.295 -            } else {
   1.296 -                proginfo->originalAirDate = gmyth_util_string_to_time_val(msql_row[17]);
   1.297 -                proginfo->hasAirDate = TRUE;
   1.298 -            }
   1.299 -
   1.300 -            proginfo->hostname = g_string_new(msql_row[18]);
   1.301 -            proginfo->recordid = (gint) g_ascii_strtoull(msql_row[19], NULL, 10);
   1.302 -            proginfo->transcoder = (gint) g_ascii_strtoull(msql_row[20], NULL, 10);
   1.303 -
   1.304 -            proginfo->playgroup = g_string_new(msql_row[21]);
   1.305 -            proginfo->recpriority = (gint) g_ascii_strtoull(msql_row[22], NULL, 10);
   1.306 -
   1.307 -            proginfo->startts = gmyth_util_string_to_time_val(msql_row[23]);
   1.308 -            proginfo->endts = gmyth_util_string_to_time_val(msql_row[24]);
   1.309 -            proginfo->pathname = g_string_new(g_strdup(msql_row[25]));
   1.310 -            proginfo->recgroup = g_string_new(msql_row[26]);
   1.311 -            proginfo->category = g_string_new(msql_row[27]);
   1.312 -            proginfo->findid = (gint) g_ascii_strtoull(msql_row[28], NULL, 10);
   1.313 -
   1.314 -            proginfo->recpriority2 = 0;
   1.315 -
   1.316 -            g_string_printf(query_str,
   1.317 -                            "SELECT dupmethod,dupin,parentid,type "
   1.318 -                            "FROM record WHERE recordid = \"%d\"", proginfo->recordid);
   1.319 -
   1.320 -            msql_res =
   1.321 -                gmyth_query_process_statement(scheduler->msqlquery,
   1.322 -                                              query_str->str);
   1.323 -
   1.324 -            if (msql_res) {
   1.325 -                MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
   1.326 -
   1.327 -                if (msql_row) {
   1.328 -                    proginfo->dupmethod = (gint) g_ascii_strtoull(msql_row[0], NULL, 10);
   1.329 -                    proginfo->dupin = (gint) g_ascii_strtoull(msql_row[1], NULL, 10);
   1.330 -                    proginfo->parentid = (gint) g_ascii_strtoull(msql_row[2], NULL, 10);
   1.331 -                    proginfo->rectype = 0;
   1.332 -                }
   1.333 -            }
   1.334 -
   1.335 -
   1.336 -            g_string_printf(query_str,
   1.337 -                            "SELECT sourceid,cardid,cardinputid,shareable "
   1.338 -                            "FROM cardinput");
   1.339 -
   1.340 -            msql_res =
   1.341 -                gmyth_query_process_statement(scheduler->msqlquery,
   1.342 -                                              query_str->str);
   1.343 -
   1.344 -            if (msql_res) {
   1.345 -                MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
   1.346 -
   1.347 -                if (msql_row) {
   1.348 -                    proginfo->sourceid = 0;
   1.349 -                    proginfo->cardid = 0;
   1.350 -                    proginfo->inputid = 0;
   1.351 -                    if (msql_row[3] != NULL && g_ascii_strcasecmp("Y", msql_row[3]) == 0)
   1.352 -                        proginfo->shareable = 1;
   1.353 -                    else
   1.354 -                        proginfo->shareable = 0;
   1.355 -                }
   1.356 -            }
   1.357 -
   1.358 -
   1.359 -
   1.360 -        }
   1.361 -    }
   1.362 -
   1.363 -    g_string_free(query_str, TRUE);
   1.364 -    return proginfo;
   1.365 -}
   1.366 -
   1.367  /** Retrieves an existing recorded item information from database. The information
   1.368   * is used to fill the returned GMythProgramInfo.
   1.369   * 
   1.370 @@ -1167,114 +1057,6 @@
   1.371      return proginfo;
   1.372  }
   1.373  
   1.374 -gboolean
   1.375 -gmyth_scheduler_stop_recording (GMythScheduler * scheduler,
   1.376 -                                gint channel_id)
   1.377 -{
   1.378 -    GMythProgramInfo *program;
   1.379 -    GMythSocket    *socket;
   1.380 -    gboolean        res = FALSE;
   1.381 -    GMythStringList *slist;
   1.382 -
   1.383 -    socket = gmyth_backend_info_get_connected_socket (scheduler->backend_info);
   1.384 -    program = gmyth_scheduler_get_recorded_on_time (scheduler, channel_id);
   1.385 -
   1.386 -    if (program) {
   1.387 -        slist = gmyth_string_list_new();
   1.388 -        gmyth_string_list_append_char_array(slist, "STOP_RECORDING");
   1.389 -
   1.390 -        gmyth_string_list_append_string(slist, program->title);        /* 0 */
   1.391 -        gmyth_string_list_append_string(slist, program->subtitle);     /* 1 */
   1.392 -        gmyth_string_list_append_string(slist, program->description);  /* 2 */
   1.393 -        gmyth_string_list_append_string(slist, program->category);     /* 3 */
   1.394 -        gmyth_string_list_append_int(slist, program->channel_id);   /* 4 */
   1.395 -        gmyth_string_list_append_string(slist, program->chanstr);      /* 5 */
   1.396 -        gmyth_string_list_append_string(slist, program->chansign);     /* 6 */
   1.397 -        gmyth_string_list_append_string(slist, program->channame);     /* 7 */
   1.398 -        gmyth_string_list_append_string(slist, program->pathname);     /* 8 */
   1.399 -        gmyth_string_list_append_int64(slist, program->filesize);      /* 9 */
   1.400 -
   1.401 -        if (program->startts)
   1.402 -            gmyth_string_list_append_int(slist, program->startts->tv_sec); /* 10 */
   1.403 -        else
   1.404 -            gmyth_string_list_append_int(slist, 0);
   1.405 -
   1.406 -        if (program->endts)
   1.407 -            gmyth_string_list_append_int(slist, program->endts->tv_sec);   /* 11 */
   1.408 -        else
   1.409 -            gmyth_string_list_append_int(slist, 0);
   1.410 -
   1.411 -        gmyth_string_list_append_int(slist, program->duplicate);   /* 12 */
   1.412 -        gmyth_string_list_append_int(slist, program->shareable);   /* 13 */
   1.413 -        gmyth_string_list_append_int(slist, program->findid);      /* 14 */
   1.414 -        gmyth_string_list_append_string(slist, program->hostname); /* 15 */
   1.415 -        gmyth_string_list_append_int(slist, program->sourceid);    /* 16 */
   1.416 -        gmyth_string_list_append_int(slist, program->cardid);      /* 17 */
   1.417 -        gmyth_string_list_append_int(slist, program->inputid);     /* 18 */
   1.418 -        gmyth_string_list_append_int(slist, program->recpriority); /* 19 */
   1.419 -
   1.420 -        // recstatus == recording
   1.421 -        gmyth_string_list_append_int(slist, -3);                   /* 20 */
   1.422 -
   1.423 -        gmyth_string_list_append_int(slist, program->recordid);    /* 21 */
   1.424 -        gmyth_string_list_append_int(slist, program->rectype);     /* 22 */
   1.425 -        gmyth_string_list_append_int(slist, program->dupin);       /* 23 */
   1.426 -        gmyth_string_list_append_int(slist, program->dupmethod);   /* 24 */
   1.427 -
   1.428 -
   1.429 -        //fixme
   1.430 -        program->recstartts->tv_sec -= (60*60);
   1.431 -
   1.432 -        gmyth_string_list_append_int(slist, 
   1.433 -                                     program->recstartts != NULL ?
   1.434 -                                     program->recstartts->tv_sec : 0);   /* 26 */
   1.435 -
   1.436 -        gmyth_string_list_append_int(slist, 
   1.437 -                                     program->recendts != NULL ?
   1.438 -                                     program->recendts->tv_sec : 0);    /* 27 */
   1.439 -
   1.440 -        gmyth_string_list_append_int(slist, program->repeat);       /* 28 */
   1.441 -        gmyth_string_list_append_int(slist, program->programflags); /* 29 */
   1.442 -
   1.443 -        gmyth_string_list_append_char_array(slist, 
   1.444 -                                            program->recgroup != NULL ?
   1.445 -                                            program->recgroup->str : "Default");  /* 30 */
   1.446 -
   1.447 -        gmyth_string_list_append_int(slist, program->chancommfree);         /* 31 */
   1.448 -        gmyth_string_list_append_string(slist, program->chanOutputFilters); /* 32 */
   1.449 -        gmyth_string_list_append_string(slist, program->seriesid);          /* 33 */
   1.450 -        gmyth_string_list_append_string(slist, program->program_id);     /* 34 */
   1.451 -
   1.452 -        gmyth_string_list_append_int(slist,
   1.453 -                                     program->lastmodified != NULL ?
   1.454 -                                     program->lastmodified->tv_sec : 0);   /* 35 */
   1.455 -
   1.456 -        gmyth_string_list_append_float(slist, program->stars); /* 36 */
   1.457 -
   1.458 -        gmyth_string_list_append_int(slist,
   1.459 -                                     program->originalAirDate != NULL ?
   1.460 -                                     program->originalAirDate->tv_sec : 0); /* 37 */
   1.461 -
   1.462 -        gmyth_string_list_append_int(slist, program->hasAirDate);  /* 38 */
   1.463 -
   1.464 -        gmyth_string_list_append_char_array(slist,
   1.465 -                                            program->playgroup != NULL ?
   1.466 -                                            program->playgroup->str : "Default");  /* 39 */
   1.467 -
   1.468 -        gmyth_string_list_append_int(slist, program->recpriority2); /* 40 */
   1.469 -        gmyth_string_list_append_int(slist, program->recpriority2); /* 40 */
   1.470 -
   1.471 -        gmyth_socket_sendreceive_stringlist(socket, slist);
   1.472 -        res = (gmyth_string_list_get_int(slist, 0) == 1);
   1.473 -
   1.474 -        g_object_unref (program);
   1.475 -        g_object_unref (slist);
   1.476 -    }
   1.477 -
   1.478 -    g_object_unref (socket);
   1.479 -    return res;
   1.480 -}
   1.481 -
   1.482  
   1.483  /** Notifies the backend of an update in the db.
   1.484   * 
     2.1 --- a/gmyth/gmyth/gmyth_scheduler.h	Sat Mar 01 23:15:42 2008 +0000
     2.2 +++ b/gmyth/gmyth/gmyth_scheduler.h	Mon Mar 03 11:33:49 2008 +0000
     2.3 @@ -149,18 +149,12 @@
     2.4  gboolean            gmyth_scheduler_disconnect              (GMythScheduler * scheduler);
     2.5  gint                gmyth_scheduler_get_schedule_list       (GMythScheduler * scheduler,
     2.6                                                               GList ** sched_list);
     2.7 +ScheduleInfo*       gmyth_scheduler_get_schedule            (GMythScheduler * scheduler,
     2.8 +		                                             gint schedule_id);
     2.9  gint                gmyth_scheduler_get_recorded_list       (GMythScheduler * scheduler,
    2.10                                                               GList ** rec_list);
    2.11  RecordedInfo*       gmyth_scheduler_get_recorded_info       (GMythScheduler *scheduler,
    2.12                                                               const char *basename);
    2.13 -gboolean            gmyth_scheduler_was_recorded_before     (GMythScheduler* scheduler,
    2.14 -                                                             gint channel_id,
    2.15 -                                                             time_t start_time);
    2.16 -gboolean            gmyth_scheduler_reactivate_schedule     (GMythScheduler* scheduler,
    2.17 -                                                             gint channel_id,
    2.18 -                                                             time_t start_time);
    2.19 -GMythProgramInfo*   gmyth_scheduler_get_recorded_on_time    (GMythScheduler* scheduler,
    2.20 -                                                             guint channel_id);
    2.21  GMythProgramInfo*   gmyth_scheduler_get_recorded            (GMythScheduler * scheduler,
    2.22                                                               GString * channel,
    2.23                                                               GTimeVal * starttime);
    2.24 @@ -179,8 +173,6 @@
    2.25                                                               gint record_id);
    2.26  gint                gmyth_scheduler_delete_recorded         (GMythScheduler * scheduler,
    2.27                                                               gint record_id);
    2.28 -gboolean            gmyth_scheduler_stop_recording          (GMythScheduler * scheduler,
    2.29 -                                                             gint channel_id);
    2.30  void                gmyth_scheduler_recorded_info_get_preview(RecordedInfo * info,
    2.31                                                               GByteArray * data);
    2.32  
     3.1 --- a/gmyth/gmyth/gmyth_util.c	Sat Mar 01 23:15:42 2008 +0000
     3.2 +++ b/gmyth/gmyth/gmyth_util.c	Mon Mar 03 11:33:49 2008 +0000
     3.3 @@ -95,7 +95,7 @@
     3.4   * @param time_value the GTimeValue to be converted
     3.5   * @return GString* the converted isoformat string 
     3.6   */
     3.7 -gchar          *
     3.8 +gchar*
     3.9  gmyth_util_time_to_isoformat_from_time_val_fmt(const gchar * fmt_string,
    3.10                                                 const GTimeVal * time_val)
    3.11  {