diff -r fd06870216b8 -r 0469baf4217c libgnomevfs2-mythtv/modules/mythtv-method.c --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Wed May 02 18:26:41 2007 +0100 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Tue May 15 22:14:04 2007 +0100 @@ -161,9 +161,12 @@ { GMythURI *gmyth_uri; GMythBackendInfo *backend_info; + gboolean is_livetv; + gboolean is_local; _GNOME_VFS_METHOD_PARAM_CHECK (info != NULL); +g_debug ("%s - %d", __FUNCTION__, __LINE__); if (myth_handle == NULL) { gchar *tmp_str1; @@ -194,12 +197,13 @@ info->permissions = GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_OTHER_READ | GNOME_VFS_PERM_GROUP_READ; - info->name = g_strdup (gmyth_uri_get_path (gmyth_uri)); - + /* file size for remote files */ - if ( ( myth_handle->is_livetv = gmyth_uri_is_livetv (gmyth_uri) ) == FALSE) { + is_livetv = gmyth_uri_is_livetv (gmyth_uri); + + if (is_livetv == FALSE) { GMythFile *file = NULL; gboolean ret = FALSE; @@ -212,22 +216,23 @@ return GNOME_VFS_ERROR_NOT_FOUND; } - if ( ( myth_handle->is_local_file = gmyth_uri_is_local_file(gmyth_uri) ) == TRUE ) - { - file = GMYTH_FILE( gmyth_file_local_new(backend_info) ); - ret = gmyth_file_local_open ( GMYTH_FILE_LOCAL( file ) ); + is_local = gmyth_uri_is_local_file (gmyth_uri); + if (is_local == TRUE ) { + file = GMYTH_FILE (gmyth_file_local_new(backend_info)); + ret = gmyth_file_local_open (GMYTH_FILE_LOCAL (file)); } else { - file = GMYTH_FILE( gmyth_file_transfer_new(backend_info) ); - ret = gmyth_file_transfer_open ( GMYTH_FILE_TRANSFER(file), gmyth_uri_get_path (gmyth_uri)); + file = GMYTH_FILE (gmyth_file_transfer_new(backend_info)); + ret = gmyth_file_transfer_open (GMYTH_FILE_TRANSFER(file), + gmyth_uri_get_path (gmyth_uri)); } - + if (!ret) { g_object_unref (file); g_object_unref (backend_info); g_debug ("NOT FOUND %s/%d", __FUNCTION__, __LINE__); return GNOME_VFS_ERROR_NOT_FOUND; } - + info->size = gmyth_file_get_filesize (file); info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_SIZE; g_object_unref (file);