Bug 116472

Summary: cdda:// url doesnt work
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Dennis Conrad <dcon>
Component: GNOMEAssignee: Federico Mena Quintero <federico>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: federico, frederik.vos
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: All   
Whiteboard:
Found By: Beta-NTS Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 118098    
Bug Blocks:    
Attachments: Backtrace of Nautilus when accessing audio cd
gnome-cdda-handler script from Fedora
cdda-url-handler.schemas from Fedora; this installs the shell script above as the handler for "cdda://" URIs
gnome-vfs2-116472-disable-cdda.diff
Updated gvm-schema-defaults.patch for gnome-volume-manager
gnome-cdda-handler script that I'll use in the gnome-volume-manager package
cdda-url-handler.schemas for gnome-volume-manager

Description Dennis Conrad 2005-09-12 13:12:07 UTC
The cdda:// url doesn't work in GNOME.  How to reproduce:

* Insert audio cd
* Right click on Icon on desktop
* Choose "Open" or "Browse Folder"
Comment 1 Stanislav Brabec 2005-09-12 13:20:09 UTC
Upstream now disables it by default. Do we really want to enable it?

--enable-cdda Enable cdda module (not recommended).
Comment 2 Dennis Conrad 2005-09-12 13:34:55 UTC
I didn't see that.  Hmmm... don't know, I personally think it was a useless
feature anyway.  It's just this "there's a button and it doesn't work".
Comment 3 Stanislav Brabec 2005-09-12 14:27:56 UTC
Well. It is marked as not recommended, but nautilus still requires it, so we
should re-enable it.

Fix is trivial and cannot break anything, because cdda is in a separate module.
Comment 4 Dennis Conrad 2005-09-15 11:06:07 UTC
Seems it's in now, but unfortunately it crashed nautilus completely.  Backtrace
attached.
Comment 5 Dennis Conrad 2005-09-15 11:18:27 UTC
Created attachment 50012 [details]
Backtrace of Nautilus when accessing audio cd
Comment 6 JP Rosevear 2005-09-15 12:28:51 UTC
I believe it was intentionally turned off upstream because of security and other
issues.

Federico, do you have more details?
Comment 7 Stanislav Brabec 2005-09-15 13:20:48 UTC
It was turned off intentionally in gnome-vfs. But unintentionally Nautilus still
requires it and complains otherwise.

Maybe nautilus crashes, if it fails to load file names from CDDB.

gnomevfs-ls cdda:///dev/hdc returns:
do_open_directory () in uri: /dev/hdc
Error: Failed to read disc contents
                (Regular, audio/x-wav)  size 58753024   mode 0000
                (Regular, audio/x-wav)  size 25591808   mode 0000
                (Regular, audio/x-wav)  size 48660480   mode 0000
                (Regular, audio/x-wav)  size 29556736   mode 0000
                (Regular, audio/x-wav)  size 33341440   mode 0000
                (Regular, audio/x-wav)  size 52625408   mode 0000
                (Regular, audio/x-wav)  size 48480256   mode 0000
                (Regular, audio/x-wav)  size 48660480   mode 0000
                (Regular, audio/x-wav)  size 39649280   mode 0000
                (Regular, audio/x-wav)  size 47398912   mode 0000
                (Regular, audio/x-wav)  size 38748160   mode 0000
                (Regular, audio/x-wav)  size 40189952   mode 0000
                (Regular, audio/x-wav)  size 37847040   mode 0000
                (Regular, audio/x-wav)  size 38207488   mode 0000
                (Regular, audio/x-wav)  size 36945920   mode 0000
                (Regular, audio/x-wav)  size 49201152   mode 0000
                (Regular, audio/x-wav)  size 25772032   mode 0000
                (Regular, audio/x-wav)  size 55148544   mode 0000
                (Regular, audio/x-wav)  size 36945920   mode 0000
Comment 8 Federico Mena Quintero 2005-09-15 14:16:37 UTC
Yeah, it is disabled upstream and the intention is to remove it completely (at
least for now).  I know someone is working on a replacement, but the preferred
method to access CD audio data is through Sound Juicer.

The upstream bug to remove cdda is http://bugzilla.gnome.org/show_bug.cgi?id=315877

(The remaining work in that bug is to remove the cdda module from
default-modules.conf and to fix gnome-vfs-hal-mounts not to create cdda:// URIs)
Comment 9 Stanislav Brabec 2005-09-15 14:22:15 UTC
... And not require cdda:// when clicking to audio CD icon in nautilus.
Comment 10 Federico Mena Quintero 2005-09-19 17:34:54 UTC
*** Bug 116374 has been marked as a duplicate of this bug. ***
Comment 11 Federico Mena Quintero 2005-09-19 17:49:41 UTC
I tested a gnome-vfs2 package with the patch included in
http://bugzilla.gnome.org/show_bug.cgi?id=315877 but it's not working yet.

If I have an audio CD in the drive and I log in, and I then double-click on the
CD icon in the desktop, I get a dialog with
"x-nautilus-desktop:///CD-RW%2FDVD-ROM%20Drive.volume is not a valid location"
--- not very friendly :)

I'll investigate; Nautilus probably needs a special case somewhere --- audio CDs
cannot be mounted.
Comment 12 Federico Mena Quintero 2005-09-20 16:45:38 UTC
On the upstream bug, Alex says that it's fine if we generate cdda:// URIs, but
currently there's no URI handler for that.

Fedora has a patch that installs a shell script as a URI handler for those.

The right solution in the context of GNOME is to make the default CD player in
GNOME accept "cdda://" URIs, and to install it as the handler for those URIs. 
The default CD player is the default value for the
/desktop/gnome/volume_manager/autoplay_cda_command key in gconf.

For Novell, we change that key to be banshee.  If banshee supports "cdda://"
URIs on the command line, that solution would work as well.
Comment 13 Federico Mena Quintero 2005-09-20 17:52:32 UTC
See the discussion uptream:
http://mail.gnome.org/archives/desktop-devel-list/2005-September/msg00161.html
Comment 14 Federico Mena Quintero 2005-09-20 17:58:48 UTC
I've just filed bug #118098 requesting that Banshee support cdda URIs.
Comment 15 Federico Mena Quintero 2005-09-20 18:01:24 UTC
Created attachment 50455 [details]
gnome-cdda-handler script from Fedora
Comment 16 Federico Mena Quintero 2005-09-20 18:02:17 UTC
Created attachment 50456 [details]
cdda-url-handler.schemas from Fedora; this installs the shell script above as the handler for "cdda://" URIs
Comment 17 Federico Mena Quintero 2005-09-22 00:14:56 UTC
Created attachment 50589 [details]
gnome-vfs2-116472-disable-cdda.diff

I'll use this for gnome-vfs2.  This just disables the cdda module in the
default-modules.conf.
Comment 18 Federico Mena Quintero 2005-09-22 00:16:40 UTC
Created attachment 50590 [details]
Updated gvm-schema-defaults.patch for gnome-volume-manager

This is for gnome-volume-manager.  It sets the autoplay_cda_command key to
"banshee %d" instead of just "banshee", so that banshee will get the device
node.  Note that this depends on the bug I filed for banshee.
Comment 19 Federico Mena Quintero 2005-09-22 00:18:01 UTC
Created attachment 50591 [details]
gnome-cdda-handler script that I'll use in the gnome-volume-manager package

This is the helper script to be used as the handler for cdda:// URIs. 
Gnome-vfs will pick this up and invoke it.
Comment 20 Federico Mena Quintero 2005-09-22 00:19:19 UTC
Created attachment 50592 [details]
cdda-url-handler.schemas for gnome-volume-manager

... and this is the cdda-url-handler.schemas that I'll install from the
gnome-volume-manager package.  This is what plugs the gnome-cdda-handler script
into gnome-vfs's database of URI handlers.
Comment 21 Federico Mena Quintero 2005-09-22 02:07:05 UTC
OK, I submitted updated versions of gnome-vfs2 and gnome-volume-manager to
autobuild.  The fixes will appear in gnome-vfs2-2.12.0-11 or later, and
gnome-volume-manager-1.5.1-4 or later, respectively.

I won't mark this as FIXED, as it still depends on Banshee being fixed to
support being passed device files on the command line.  That's bug #118098.
Comment 22 JP Rosevear 2006-01-05 15:00:19 UTC
*** Bug 138267 has been marked as a duplicate of this bug. ***
Comment 23 Federico Mena Quintero 2006-01-23 21:40:45 UTC
Banshee has the required functionality now, and it is configured correctly in our packages.  But now, when you double-click on the CD icon in your desktop, Nautilus opens a file manager window with a single, unnamed file of type "WAV Audio".  I'll investigate.
Comment 24 Federico Mena Quintero 2006-01-24 02:09:37 UTC
Huh, Nautilus thinks that this is a normal directory and it tries to show it in a normal file manager window.  I'm having trouble finding the code that says "there's a special URL handler for this".
Comment 25 Federico Mena Quintero 2006-01-24 19:40:29 UTC
OK, I submitted a fix to autobuild.  We just had to stop passing --enable-cdda to gnome-vfs's configure script.

The fix will be in gnome-vfs2-2.12.2-8 or later.  Make sure you are running recent versions of gnome-volume-manager and banshee as well.