Copy Selected Tracks
Amarok 2.x Scripts
Score 60%
Description:

'Copy Selected Tracks' to device or local path.
All further updates have been frozen. This code is free with no license, please feel free to take and update as your own...

Features:
• This script will copy tracks that have been highlighted (aka selected) from a playlist to a destination folder.
• Added feature to convert flac files to mp3 - as long as you have flac.soundforge.net and lame.soundforge.net installed (currently does not work in windows platforms).

Selecting Tracks:
In Amarok, tracks can be selected by clicking on the track, holding ctrl and adding each additionally clicked track to the selection or by holding shift and clicking on a range of tracks.

Copy Tracks:
When imported, the "Copy Selected Tracks..." menu item will be added to the tools menu.

Importing Scripts into Amarok:
Amarok looks for scripts in the ~/$KDEHOME/share/apps/amarok/script/yourscriptname/ directory. $KDEHOME is likely .kde, .kde4 or .amarok-nightly if you use Neon.

Pending Updates:
None at the moment, I generally wrote this for myself to copy songs to my media device (mp3 player). But I wanted to share if this is useful to anyone. If you have any ideas, I'd love to hear them.

• Additional languages easily added. Current language found in en.js. If you can translate this file, i'd gladly add additional languages.

Outstanding Issues:
• tbd...

Tags: copy songs, copy tracks, copy files, amarok, media device.
Last changelog:

7 years ago

0.1 - released to public
0.2 - added convert flac to mp3 feature and artist/album folder structure. Conversion requires installation of flac and lame (lame.sourceforge.net and flac.soundforge.net). Not compatible with windows platforms yet.

C

spiritofelric

6 years ago

Hi everyone...
Sorry i haven't updated the code in months. I've been on other projects and wrote this to copy music to my mp3 player back when I used Amarak.

I hope you found it useful. I have no plans to update this further. Anyone can feel free to take the ownership for the script and update their own version.

This is free code and I have no claims or even a need for my signature on it...

Report

e1nste1n

6 years ago

is it possible to save flac tags into converted mp3's?

Report

marcs

6 years ago

I lately make heavy use of this tool, thanks. However, I have different folders in which I copy and always have to click through the directory structure. It would be great if the last 5 folders could be remembered.

Report

DenisSeidel

7 years ago

Thanks for this very useful script. I'm wondering about this isn't almost part of Amarok.However, I'm looking forward for ogg/oga-support for the converting-functionality of your script, because my Mp3-Players only support mp3, wav or wma.

Will it come?

Report

Kirilo

7 years ago

For my home use I translate all Amarok scripts I have into German.
I'm glad I can share it in this case: http://www.cyrilbrosch.net/de.js

Report

C

spiritofelric

7 years ago

Amazing!
Thank you so much. I'll definitely add this.

Report

DenisSeidel

7 years ago

Danke dafür ^^

Report

C

spiritofelric

7 years ago

Okay...

It's in a very beta stage, but it will make a mp3 copy of your flac file on the destination specified. You will need http://flac.sourceforge.net/ and http://lame.sourceforge.net/ installed on your system (you probably already have flac - they're small command line programs).

It takes a while to convert each file - 30seconds approximately.

Let me know if you have any issues.

Report

jabster

7 years ago

Ooh! Just saw this yesterday!

Awesome!

Works great for the FLAC files!

However (you know there's gotta be a however) ;-) ....I wanted it to convert OGG's as well.

But, now that I have a starting point, I am able to use my Amazing Programming Skills(tm) to modify your code! :-)

So, I have now modified it to convert FLAC and OGG to MP3s!

I also modified your code to stop using flac and lame, and to use ffmpeg instead. Not really sure what's better for general distribution tho. Both lame and ffmeg (with mp3 support) need to be installed from outside the "official" repos. But ffmpeg seems to be much quicker.

I will try send the updated files over to you later today. I'll try and make diff files for you.

Thanks again!

-john

Report

jabster

7 years ago

Ok...I'm having trouble with the diff files...so the files are here: http://www.jabster.net/amarok/

main.js & en.js

en.js:
changed to "const LANG_CTconvert="Convert FLAC/OGG files to MP3 (slow)";"

main.js:
-changed function name from "convertFlacToMp3" to "convertToMp3" since it does both now
-test program lines: added check for ffmpeg; changed error messages a bit.
-relevant function conversion line: "pConvert.start("ffmpeg -y -ab 128k -ac 2 -i \"" + strSource + "\" \"" + strDest + "\"");"

Seems to be working fine.

Let me know what you think.

Thanks,
-john

Report

tifff

7 years ago

Using sox as a flac/ogg/... decoder allows to change more attributes. I use it e.g. for tempo control (additionally added to Dialog.js) to adjust tempo for dance competitions.

To play using different tempo (without file conversion) I prefer the dbus-monitor together with dbus-send to stop/pause/restart amarok during playing with sox.

Report

jabster

7 years ago

Hi.
Would it be possible to add a "Convert to MP3 and Copy" option?

Problem is that my wife's MP3 player only plays OGG & MP3, not flac, which is a hefty part of my collection. So if she could just create a playlist in amarok, and then select convert & copy, she would have a really easy time of loading up her mp3 player. Just hard-code to 128 bitrate probably.

If you need "encouragement" let me know, and I'll see what I can do. (I'd try and do it myself but I have very limited programming ability.)

thanks,
john

Report

C

spiritofelric

7 years ago

Hi John,
There are no tools within Amarok for conversion, however, it is still a possibility if I call on an external tool.

What OS are you running on? I could do some research on getting this done... but i'd like to look into your platform first ;).

Cheers, Elric

Report

jabster

7 years ago

Hi.
I'm running Mandriva 2010.0 with the PLF repos. KDE SC 4.4 and amarok 2.2.0.

thanks again,
john

Report

7 years ago

0.1 - released to public
0.2 - added convert flac to mp3 feature and artist/album folder structure. Conversion requires installation of flac and lame (lame.sourceforge.net and flac.soundforge.net). Not compatible with windows platforms yet.

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.2
updated Aug 08 2011
added Jan 25 2010
downloads today
0
page views today 0