! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
hal volume manager backend discards writable CD/DVD media
Status:
CLOSED: FIXED
Product:
Thunar-vfs
Component:
General

Comments

Description Brian J. Tarricone (not reading bugmail) 2006-11-21 08:48:36 CET
Line 1133 of thunar-vfs-volume-hal.c discards any volume that has a volume fsusage that isn't mountable.  This makes thunar-vfs useless as a generic volume manager that can take action based on inserting a blank DVD or CD.  I'm working on a volume manager that pops up a 'what do you want to do?' type dialog when a new device is inserted.  One of the things I'd like it to be able to do is run some kind of GUI CD/DVD burning app when blank media is inserted.  However, thunar-vfs never emits a volumes-added signal since the volume isn't counted at all.

I'm not sure of the right way to make this work without breaking existing apps.  Perhaps for these types of media, thunar_vfs_volume_is_present() should return false?

(Actually, as an aside, I'm not sure how _STATUS_PRESENT could ever *not* be set for a ThunarVfsVolume using the hal backend.  The condition for it being set is that it either is not a disc, or it has data.  If _fsusage() reports that it's mountable, then it has to have data [right?].  So when a volume gets added, _STATUS_PRESENT should always be set, and the only way it would be unset is if you eject it, which, in the case of most volumes, would make the volume actually disappear and be removed from the volume list anyway.)

Anyway, I'll look into working up a patch...
Comment 1 Brian J. Tarricone (not reading bugmail) 2006-11-21 09:07:30 CET
Created attachment 881 
patch to allow blank/audio cds

Ok, this should allow blank CDs to show up in the list.  It also adds THUNAR_VFS_VOLUME_KIND_AUDIO_CD and detects those properly with HAL.  Not sure how to do that with the FreeBSD backend.
Comment 2 Brian J. Tarricone (not reading bugmail) 2006-11-21 09:12:54 CET
Created attachment 882 
better patch with device label

New patch.  Same as before, but sets the device name to "Audio CD".  Adds a string, unfortunately :-P
Comment 3 Brian J. Tarricone (not reading bugmail) 2006-11-21 09:29:15 CET
Created attachment 883 
even better patch, honest

Ok, one last time.  Be a little bit more strict about what's accepted.  If _get_fsusage() says it's not mountable, and it's a disc, then make sure it either has audio, or is blank media.  Without this, my Playstation CDs, while not mountable or usable, show up :-P.

Also, add "Blank Media" for device_label if it's one of the blank media types.  Bah, another new string.
Comment 4 Benedikt Meurer editbugs 2006-11-21 18:36:15 CET
thunar_vfs_volume_is_removable() should return TRUE for audio cds then. And I think CDs with both data and audio should still be handled as mountable data cds.
Comment 5 Benedikt Meurer editbugs 2006-11-21 18:36:31 CET
And the icon lookup must be extended for audio cds.
Comment 6 Brian J. Tarricone (not reading bugmail) 2006-11-21 21:03:52 CET
Created attachment 884 
patch, take 4

Ok, includes stuff from comments #3 and #4.
Comment 7 Brian J. Tarricone (not reading bugmail) 2006-11-21 21:04:18 CET
(In reply to comment #6)
> Created an attachment (id=884) [details]
> patch, take 4
> 
> Ok, includes stuff from comments #3 and #4.

Er, #4 and #5, of course.

Comment 8 Brian J. Tarricone (not reading bugmail) 2006-11-21 21:06:25 CET
Well, except for this part: "And I think CDs with both data and audio should still be handled as mountable data cds."

Not sure what you mean here; can you elaborate?  You can't actually mount an audio CD, or a data CD that doesn't have a recogniseable filesystem on it.  Some virtual layer might be able to handle it (e.g., showing the audio CD as a series of tracks that can be saved as .wav), but that would be out of the scope of thunar-vfs, no?
Comment 9 Benedikt Meurer editbugs 2006-11-21 22:03:45 CET
I'm talking about mixed audio/data CDs, with both an ISO file system and audio tracks on it.
Comment 10 Brian J. Tarricone (not reading bugmail) 2006-11-21 22:35:00 CET
Ah, ok.  Any idea how hal will categorise those?  I don't have any handy to check with, but I'll try to make one tonight...
Comment 11 Benedikt Meurer editbugs 2006-11-21 23:10:38 CET
I guess it'll have both is_audio and is_data set.
Comment 12 Brian J. Tarricone (not reading bugmail) 2006-11-22 07:21:45 CET
Well, in that case, _get_fsusage() should return something reasonable, and it'll just behave as if it were a normal data CD, no?
Comment 13 Brian J. Tarricone (not reading bugmail) 2006-12-02 05:46:13 CET
Created attachment 891 
patch, take 5

Ok, this guy will treat a disc with both data and audio as just a data disc.  I'm not really sure if it's useful to try and handle it in any other way, unless we really want THUNAR_VFS_VOLUME_KIND_DATA_AND_AUDIO_CD.  Do we?
Comment 14 Benedikt Meurer editbugs 2007-01-07 22:58:57 CET
Fixed with revision 24300.

2007-01-07	Benedikt Meurer <benny@xfce.org>

	* thunar-vfs/thunar-vfs-volume-hal.c,
	  thunar-vfs/thunar-vfs-volume.{c,h}: Do not discard blank discs and
	  pure audio discs. Bug #2599.

Bug #2599

Reported by:
Brian J. Tarricone (not reading bugmail)
Reported on: 2006-11-21
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
unspecified

Attachments

patch to allow blank/audio cds (1.62 KB, patch)
2006-11-21 09:07 CET , Brian J. Tarricone (not reading bugmail)
no flags
better patch with device label (3.23 KB, patch)
2006-11-21 09:12 CET , Brian J. Tarricone (not reading bugmail)
no flags
even better patch, honest (3.47 KB, patch)
2006-11-21 09:29 CET , Brian J. Tarricone (not reading bugmail)
no flags
patch, take 4 (4.13 KB, patch)
2006-11-21 21:03 CET , Brian J. Tarricone (not reading bugmail)
no flags
patch, take 5 (4.58 KB, patch)
2006-12-02 05:46 CET , Brian J. Tarricone (not reading bugmail)
no flags

Additional information