diff -r 84fb21f6941f -r 64ded911540b libgnomevfs2-mythtv/modules/mythtv-method.c --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 21:56:58 2007 +0000 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 22:03:26 2007 +0000 @@ -216,7 +216,8 @@ return GNOME_VFS_ERROR_EOF; // fixme: change this to min math function - if (myth_handle->content_size > 0 && num_bytes > ( myth_handle->content_size - myth_handle->bytes_read )) + if (!myth_handle->is_livetv && ( myth_handle->content_size > 0 ) && + ( num_bytes > ( myth_handle->content_size - myth_handle->bytes_read ) ) ) bytes_to_read = myth_handle->content_size - myth_handle->bytes_read; else bytes_to_read = num_bytes; @@ -232,7 +233,7 @@ gint len = gmyth_file_transfer_read (myth_handle->file_transfer, tmp_buffer, MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain, TRUE); - if (len < 0) { + if (!myth_handle->is_livetv && len < 0) { g_byte_array_free (tmp_buffer, TRUE); g_print ("Fail to read bytes"); return GNOME_VFS_ERROR_IO; @@ -391,16 +392,8 @@ file_info->name = g_strdup ( g_strrstr( prog_info->pathname->str, "/" ) ); - gint64 size = 0; - size = gmyth_recorder_get_file_position( recorder ); - if( size < 0 ) - { - file_info->size = prog_info->filesize; - } - else - file_info->size = size; - } else { + file_info->name = g_strdup ( "LiveTV.nuv" ); file_info->size = gmyth_recorder_get_file_position( recorder ); } @@ -410,10 +403,7 @@ if ( prog_info != NULL ) g_object_unref( prog_info ); - /* file_info->size = (GnomeVFSFileSize) - 1; - file_info->name = g_strdup ( "LiveTV.nuv" ); - */ } else {