GNOME Bugzilla – Bug 329267
Rename filenames when drag-and-dropping from Rhythmbox
Last modified: 2018-05-24 11:11:48 UTC
When I view tracks from my ipod in Rhythmbox and drag them to a folder in Nautilus it would be nice if Rhythmbox renamed them to something more meaningful than the filenames they have on the ipod.
I'm not sure if this is easyily doable, since Rhythmbox just hands the URL of the file to Nautilus, which does the copying.
This also causes problem copying multiple files with the same filename. Those files are located in different directories. When dragging them to nautilus, they get copied to the same directory. The copying operation will stop right after file duplication so other files will not be copied :(
Created attachment 58808 [details] [review] patch to allow rhythmbox write songs to a directory I take another approach which is similar to "Burn CD Audio" feature. This patch write songs to a specified directory (copy them, or link them to save space). Actually i based on rb-playlist-source-recorder.[ch]. The patch is not clean. If you see it good, I will clean it up. Also it'd better using async ops instead of sync ops as of now.
Patch won't compile cleanly against CVS HEAD. Can you update? I'd like to test, it seems handy. gcc -DHAVE_CONFIG_H -I. -I. -I.. -DGNOMELOCALEDIR=\"/usr/local//share/locale\" -DG_LOG_DOMAIN=\"Rhythmbox\" -I.. -I../lib -I../lib -I../corba -I../corba -I../rhythmdb -I../metadata -I../widgets -I../library -I../player -I../iradio -I../podcast -I../shell -I../daapsharing -I../metadata -DPIXMAP_DIR=\"/usr/local//share/pixmaps\" -DSHARE_DIR=\"/usr/local//share/rhythmbox\" -DDATADIR=\"/usr/local//share\" -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -pthread -DORBIT2=1 -I/usr/include/totem/1/plparser -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gnome-vfs-module-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/libnautilus-burn -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DORBIT2=1 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/libglade-2.0 -I/usr/include/gnome-vfs-module-2.0 -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libsoup-2.2 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -Wcomment -Wformat -Wnonnull -Wimplicit-int -Wimplicit -Wmain -Wmissing-braces -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused-function -Wunused-label -Wunused-value -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wall -Werror -std=gnu89 -MT rb-playlist-source.lo -MD -MP -MF .deps/rb-playlist-source.Tpo -c rb-playlist-source.c -fPIC -DPIC -o .libs/rb-playlist-source.o rb-playlist-source.c: In function 'export_playlist_iter_func': rb-playlist-source.c:525: error: dereferencing pointer to incomplete type rb-playlist-source.c:526: error: dereferencing pointer to incomplete type rb-playlist-source.c:527: error: dereferencing pointer to incomplete type rb-playlist-source.c:528: error: dereferencing pointer to incomplete type make[2]: *** [rb-playlist-source.lo] Error 1 make[2]: Leaving directory `/home/alex/src/remote-cvs/gnome.org/rhythmbox/sources' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/alex/src/remote-cvs/gnome.org/rhythmbox' make: *** [all] Error 2
Created attachment 59707 [details] [review] new patch
Patch works, but obviously needs some touch-ups! (Still says exporting Audio CD). I like the idea. It needs a better icon so that it isn't confused with the audio CD. I would use it to export to an SD memory card, for example. (Especially since I just noticed that if I drag and drop a track to the desktop, then it creates a duplicate inside the library. Note: I don't have watch enabled, so I can't figure out why it would keep track of the exported file. This is probably a separate bug, however.)
(In reply to comment #6) > (Especially since I just noticed that if I drag and drop a track to the > desktop, then it creates a duplicate inside the library. Note: I don't have > watch enabled, so I can't figure out why it would keep track of the exported > file. This is probably a separate bug, however.) Filed: bug #331774.
Glad you like it. I will clean it up and repost soon.
Ping? Any chance this patch could be updated to CVS? Also does it preserve the original directory hierarchies, I don't remember from when I tested it. The issue of preserving the original directory hierarchies surfaced on the mailing list recently: http://mail.gnome.org/archives/rhythmbox-devel/2006-April/msg00023.html
This should probably be re-done as a plugin. If the new track-transfer stuff got used, it would also be fairly easy to add a "transcode to [format]" option.
Created attachment 66265 [details] [review] exporter.diff Made it a plugin. I still don't know how to add to playlists' context menu. Not examined track transfer yet.
*** Bug 508274 has been marked as a duplicate of this bug. ***
What is described in bug #171655 might be helpful
I had a brief look through the X Direct Save spec and it appears that it doesn't really cover this use case, but we could probably make it work anyway. It seems like it would help for drag and drop from daap shares, since the drag source app does the transfer, but that's a different bug. Then there's the question of when this would be applied. I certainly wouldn't want it applied for any drag and drop to a file manager.
*** Bug 569396 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/130.