1.1 --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 20:57:59 2007 +0000
1.2 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 21:56:58 2007 +0000
1.3 @@ -185,9 +185,9 @@
1.4
1.5 g_return_val_if_fail (myth_handle->file_transfer != NULL, GNOME_VFS_ERROR_NOT_OPEN);
1.6
1.7 - if ( myth_handle->file_transfer->filesize < 0 && myth_handle->is_livetv ) {
1.8 - myth_handle->content_size = (GnomeVFSFileSize) 0;
1.9 - myth_handle->content_size = gmyth_recorder_get_file_position( myth_handle->livetv->recorder );
1.10 + if ( /*myth_handle->file_transfer->filesize <= 0 && */myth_handle->is_livetv ) {
1.11 + myth_handle->content_size = (GnomeVFSFileSize) - 1;
1.12 + //myth_handle->content_size = gmyth_recorder_get_file_position( myth_handle->livetv->recorder );
1.13 } else
1.14 myth_handle->content_size = myth_handle->file_transfer->filesize;
1.15
1.16 @@ -212,7 +212,7 @@
1.17
1.18 *bytes_read = 0;
1.19
1.20 - if (myth_handle->bytes_read >= myth_handle->content_size)
1.21 + if ( !myth_handle->is_livetv && ( myth_handle->bytes_read >= myth_handle->content_size ) )
1.22 return GNOME_VFS_ERROR_EOF;
1.23
1.24 // fixme: change this to min math function
1.25 @@ -303,10 +303,10 @@
1.26 GnomeVFSContext *context)
1.27 {
1.28 GMythFileTransfer *file_transfer = NULL;
1.29 - //GMythRecorder *recorder = NULL;
1.30 + GMythRecorder *recorder = NULL;
1.31 GMythBackendInfo *backend_info = NULL;
1.32 GMythURI *gmyth_uri = NULL;
1.33 - //GMythSocket *socket = NULL;
1.34 + GMythSocket *socket = NULL;
1.35 gboolean is_livetv = FALSE;
1.36 gboolean ret = TRUE;
1.37
1.38 @@ -338,7 +338,6 @@
1.39
1.40 /* Connect to the backend */
1.41 if ( gmyth_uri != NULL && is_livetv == TRUE ) {
1.42 - #if 0
1.43 gboolean res = TRUE;
1.44
1.45 /* start to get file info from LiveTV remote encoder */
1.46 @@ -386,7 +385,6 @@
1.47
1.48 if ( prog_info != NULL )
1.49 {
1.50 - //gmyth_debug( "New ProgramInfo...\n" );
1.51 gmyth_program_info_print( prog_info );
1.52
1.53 g_print( "path = %s", prog_info->pathname->str );
1.54 @@ -397,7 +395,6 @@
1.55 size = gmyth_recorder_get_file_position( recorder );
1.56 if( size < 0 )
1.57 {
1.58 - //GMythProgramInfo *prog_info = gmyth_recorder_get_current_program_info ( recorder );
1.59 file_info->size = prog_info->filesize;
1.60 }
1.61 else
1.62 @@ -413,9 +410,10 @@
1.63 if ( prog_info != NULL )
1.64 g_object_unref( prog_info );
1.65
1.66 - #endif
1.67 - file_info->size = 0;
1.68 + /*
1.69 + file_info->size = (GnomeVFSFileSize) - 1;
1.70 file_info->name = g_strdup ( "LiveTV.nuv" );
1.71 + */
1.72
1.73 } else {
1.74
1.75 @@ -449,7 +447,7 @@
1.76 file_info->block_count = GNOME_VFS_FILE_INFO_FIELDS_BLOCK_COUNT;
1.77 file_info->io_block_size = GNOME_VFS_FILE_INFO_FIELDS_IO_BLOCK_SIZE;
1.78
1.79 -//error:
1.80 +error:
1.81 if (backend_info)
1.82 g_object_unref (backend_info);
1.83