1.1 --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Wed May 02 18:26:41 2007 +0100
1.2 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Wed May 30 19:52:46 2007 +0100
1.3 @@ -161,9 +161,12 @@
1.4 {
1.5 GMythURI *gmyth_uri;
1.6 GMythBackendInfo *backend_info;
1.7 + gboolean is_livetv;
1.8 + gboolean is_local;
1.9
1.10 _GNOME_VFS_METHOD_PARAM_CHECK (info != NULL);
1.11
1.12 +g_debug ("%s - %d", __FUNCTION__, __LINE__);
1.13
1.14 if (myth_handle == NULL) {
1.15 gchar *tmp_str1;
1.16 @@ -194,12 +197,13 @@
1.17 info->permissions = GNOME_VFS_PERM_USER_READ |
1.18 GNOME_VFS_PERM_OTHER_READ |
1.19 GNOME_VFS_PERM_GROUP_READ;
1.20 -
1.21
1.22 info->name = g_strdup (gmyth_uri_get_path (gmyth_uri));
1.23 -
1.24 +
1.25 /* file size for remote files */
1.26 - if ( ( myth_handle->is_livetv = gmyth_uri_is_livetv (gmyth_uri) ) == FALSE) {
1.27 + is_livetv = gmyth_uri_is_livetv (gmyth_uri);
1.28 +
1.29 + if (is_livetv == FALSE) {
1.30 GMythFile *file = NULL;
1.31 gboolean ret = FALSE;
1.32
1.33 @@ -212,22 +216,23 @@
1.34 return GNOME_VFS_ERROR_NOT_FOUND;
1.35 }
1.36
1.37 - if ( ( myth_handle->is_local_file = gmyth_uri_is_local_file(gmyth_uri) ) == TRUE )
1.38 - {
1.39 - file = GMYTH_FILE( gmyth_file_local_new(backend_info) );
1.40 - ret = gmyth_file_local_open ( GMYTH_FILE_LOCAL( file ) );
1.41 + is_local = gmyth_uri_is_local_file (gmyth_uri);
1.42 + if (is_local == TRUE ) {
1.43 + file = GMYTH_FILE (gmyth_file_local_new(backend_info));
1.44 + ret = gmyth_file_local_open (GMYTH_FILE_LOCAL (file));
1.45 } else {
1.46 - file = GMYTH_FILE( gmyth_file_transfer_new(backend_info) );
1.47 - ret = gmyth_file_transfer_open ( GMYTH_FILE_TRANSFER(file), gmyth_uri_get_path (gmyth_uri));
1.48 + file = GMYTH_FILE (gmyth_file_transfer_new(backend_info));
1.49 + ret = gmyth_file_transfer_open (GMYTH_FILE_TRANSFER(file),
1.50 + gmyth_uri_get_path (gmyth_uri));
1.51 }
1.52 -
1.53 +
1.54 if (!ret) {
1.55 g_object_unref (file);
1.56 g_object_unref (backend_info);
1.57 g_debug ("NOT FOUND %s/%d", __FUNCTION__, __LINE__);
1.58 return GNOME_VFS_ERROR_NOT_FOUND;
1.59 }
1.60 -
1.61 +
1.62 info->size = gmyth_file_get_filesize (file);
1.63 info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_SIZE;
1.64 g_object_unref (file);