diff -r 6d9f4e8468b3 -r 84fb21f6941f libgnomevfs2-mythtv/modules/mythtv-method.c --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 20:57:59 2007 +0000 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 21:56:58 2007 +0000 @@ -185,9 +185,9 @@ g_return_val_if_fail (myth_handle->file_transfer != NULL, GNOME_VFS_ERROR_NOT_OPEN); - if ( myth_handle->file_transfer->filesize < 0 && myth_handle->is_livetv ) { - myth_handle->content_size = (GnomeVFSFileSize) 0; - myth_handle->content_size = gmyth_recorder_get_file_position( myth_handle->livetv->recorder ); + if ( /*myth_handle->file_transfer->filesize <= 0 && */myth_handle->is_livetv ) { + myth_handle->content_size = (GnomeVFSFileSize) - 1; + //myth_handle->content_size = gmyth_recorder_get_file_position( myth_handle->livetv->recorder ); } else myth_handle->content_size = myth_handle->file_transfer->filesize; @@ -212,7 +212,7 @@ *bytes_read = 0; - if (myth_handle->bytes_read >= myth_handle->content_size) + if ( !myth_handle->is_livetv && ( myth_handle->bytes_read >= myth_handle->content_size ) ) return GNOME_VFS_ERROR_EOF; // fixme: change this to min math function @@ -303,10 +303,10 @@ GnomeVFSContext *context) { GMythFileTransfer *file_transfer = NULL; - //GMythRecorder *recorder = NULL; + GMythRecorder *recorder = NULL; GMythBackendInfo *backend_info = NULL; GMythURI *gmyth_uri = NULL; - //GMythSocket *socket = NULL; + GMythSocket *socket = NULL; gboolean is_livetv = FALSE; gboolean ret = TRUE; @@ -338,7 +338,6 @@ /* Connect to the backend */ if ( gmyth_uri != NULL && is_livetv == TRUE ) { - #if 0 gboolean res = TRUE; /* start to get file info from LiveTV remote encoder */ @@ -386,7 +385,6 @@ if ( prog_info != NULL ) { - //gmyth_debug( "New ProgramInfo...\n" ); gmyth_program_info_print( prog_info ); g_print( "path = %s", prog_info->pathname->str ); @@ -397,7 +395,6 @@ size = gmyth_recorder_get_file_position( recorder ); if( size < 0 ) { - //GMythProgramInfo *prog_info = gmyth_recorder_get_current_program_info ( recorder ); file_info->size = prog_info->filesize; } else @@ -413,9 +410,10 @@ if ( prog_info != NULL ) g_object_unref( prog_info ); - #endif - file_info->size = 0; + /* + file_info->size = (GnomeVFSFileSize) - 1; file_info->name = g_strdup ( "LiveTV.nuv" ); + */ } else { @@ -449,7 +447,7 @@ file_info->block_count = GNOME_VFS_FILE_INFO_FIELDS_BLOCK_COUNT; file_info->io_block_size = GNOME_VFS_FILE_INFO_FIELDS_IO_BLOCK_SIZE; -//error: +error: if (backend_info) g_object_unref (backend_info);