1.1 --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 21:56:58 2007 +0000
1.2 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Thu Feb 08 23:07:59 2007 +0000
1.3 @@ -216,7 +216,8 @@
1.4 return GNOME_VFS_ERROR_EOF;
1.5
1.6 // fixme: change this to min math function
1.7 - if (myth_handle->content_size > 0 && num_bytes > ( myth_handle->content_size - myth_handle->bytes_read ))
1.8 + if (!myth_handle->is_livetv && ( myth_handle->content_size > 0 ) &&
1.9 + ( num_bytes > ( myth_handle->content_size - myth_handle->bytes_read ) ) )
1.10 bytes_to_read = myth_handle->content_size - myth_handle->bytes_read;
1.11 else
1.12 bytes_to_read = num_bytes;
1.13 @@ -232,7 +233,7 @@
1.14 gint len = gmyth_file_transfer_read (myth_handle->file_transfer,
1.15 tmp_buffer, MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain, TRUE);
1.16
1.17 - if (len < 0) {
1.18 + if (!myth_handle->is_livetv && len < 0) {
1.19 g_byte_array_free (tmp_buffer, TRUE);
1.20 g_print ("Fail to read bytes");
1.21 return GNOME_VFS_ERROR_IO;
1.22 @@ -391,16 +392,8 @@
1.23
1.24 file_info->name = g_strdup ( g_strrstr( prog_info->pathname->str, "/" ) );
1.25
1.26 - gint64 size = 0;
1.27 - size = gmyth_recorder_get_file_position( recorder );
1.28 - if( size < 0 )
1.29 - {
1.30 - file_info->size = prog_info->filesize;
1.31 - }
1.32 - else
1.33 - file_info->size = size;
1.34 -
1.35 } else {
1.36 + file_info->name = g_strdup ( "LiveTV.nuv" );
1.37 file_info->size = gmyth_recorder_get_file_position( recorder );
1.38 }
1.39
1.40 @@ -410,10 +403,7 @@
1.41 if ( prog_info != NULL )
1.42 g_object_unref( prog_info );
1.43
1.44 - /*
1.45 file_info->size = (GnomeVFSFileSize) - 1;
1.46 - file_info->name = g_strdup ( "LiveTV.nuv" );
1.47 - */
1.48
1.49 } else {
1.50