chris:b Posted September 10, 2004 Report Share Posted September 10, 2004 Mandrake has a nice package: kdebase-servicemenus which adds more 'actions' when you are right clicking on a file or folder. Five of those let you encode/decode mp3/wav/ogg/mpg within konqueror as file manager. The problem: they don't work for files with 'spaces' in the filename, and most ripped files have this format, eg: artist - my song.mp3 (while artist-mysong.mp3 works perfectly) Example of a line in one of the servicemenu script (/usr/share/apps/konqueror/servicemenus/lame-decode.desktop): Exec=lame --decode %f `echo %f | sed 's/\\\\\\\\.mp3$$//'`.wav Can anyone help me to change this command so that it identifies 'artist - my song.mp3' as ONE filename. I can't code or script and don't know what %f or | sed 's/\\\\\\\\ means :-[ Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 19, 2004 Report Share Posted September 19, 2004 Comment out this line: Exec=lame --decode %f `echo %f | sed 's/\\\\\\\\.mp3$$//'`.wav like this: #Exec=lame --decode %f `echo %f | sed 's/\\\\\\\\.mp3$$//'`.wav and try this: music=$(echo %f | sed 's/\ /\_/g') Exec=lame --decode $music `echo $music | sed 's/\\\\\\\\.mp3$$//'`.wav Quote Link to comment Share on other sites More sharing options...
chris:b Posted September 20, 2004 Author Report Share Posted September 20, 2004 Thx, Steve :-) Tried that. - Errors out in a kde window, now all mp3 files even without spaces, with: (translated) 'Can't find program: lame --decode $music `echo $music | sed 's/\\\\\\\\.mp3$$//'`.wav The original line errored out only when using on files with spaces in the name with: 'Can't find program lame --decode %f `echo %f | sed 's/\\\\\\\\.mp3$$//'`.wav' Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 20, 2004 Report Share Posted September 20, 2004 Let's try this: Exec=lame --decode "%f" `echo "%f" | sed 's/\\\\\\\\.mp3$$//'`.wav When I get a chance, I'll install the pkg myself and fool around with it. It may be later tonight before I can get to it. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 20, 2004 Report Share Posted September 20, 2004 (edited) I've fiddled with it a little so far and I've gotten it to not give me an error and it says it is encoding, but when it's done, there is no .wav file in the directory that I can see. I'll keep you posted. Hmmmm...as a matter of fact, when I do it on a filename without any spaces using the unedited script, it doesn't make the *.wav file as far I can find. Is there some secret place it sends them to? Edited September 20, 2004 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
chris:b Posted September 20, 2004 Author Report Share Posted September 20, 2004 (edited) The unedit script works here with the non-space filenames, the .wav file is placed in the same dir as the orig. mp3 file, and then gets the name <mysong.mp3.wav> (haha) Do you use a different version maybe - all I do is, in konqueror as filemanager right click on the mp3 file, choose actions --> decode to wav, done. And I see the new wav file. You sure you have lame installed? Will try the new line ... Edited September 20, 2004 by anna Quote Link to comment Share on other sites More sharing options...
chris:b Posted September 20, 2004 Author Report Share Posted September 20, 2004 (edited) The new code works now with filenames without spaces, but not yet for the ones with spaces. Programm "lame --decode "%f" `echo "%f" | sed 's/\\\\.mp3$//'`.wav" ist nicht auffindbar Edited September 20, 2004 by anna Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 21, 2004 Report Share Posted September 21, 2004 (edited) I've tried everything and only know of a workaround. Make sure that none of the directories in the path to the ripped mp3s contain spaces either. Open a console and cd to the directory containing the ripped files and run: find . -name "* *" -exec sh -c 'mv "${0}" "${0// /_}"' {} \; ( Command thanks to aru and JoeronM: http://mandrakeusers.org/index.php?showtopic=10556 ) That changes all spaces in all the filenames in your current directory to _. Then you can run the right-click "Encode..." function in konqueror. The problem that I had was the there was a parent directory of my mp3s that also had a space, so it wouldn't work for me even for files with no spaces, because the path contained a space (%f contains the whole path and not just the filename). I hope this is understandable. Edited September 22, 2004 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
chris:b Posted September 21, 2004 Author Report Share Posted September 21, 2004 Thanks a lot, Steve. Great workaround. Very useful not only for audio files. I never create files with spaces, but my partner, and I am the one who is backing up all the stuff on cd-rw, grabbing the files via smb share and burn them. Thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.