copyplaylist2 (amaroK script)

Amarok 1.x Scripts

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Description:
This small script copies the current playlist to a certain directory.

For use with mobile devices like mp3-players or usb-sticks.
Can also be used to create a tree of directories for CD/DVD archiving.
Last changelog:

Changelog:

1.0 (March 8th, 2006)
- configuration preset buttons replaced with user-definable configuration sets
(idea: Juan Ignacio Pumarino)
- integration in amarok context menu, blank->underscore conversion
(idea/code: Todd Sepke)
- on copy error, you can also Skip or Skip All Errors instead of just
aborting the whole copy process
- the playlist is found in arbitrary locations (needed for klik users)
- Tab order fixed, keyboard shortcuts introduced

0.5 (uploaded December 28th, 2005)
- Bugfix: Track number (%N) not available in amarok 1.3 (thanks to Steve Herrel for reporting this defect)
- added new naming component for real directory name of file (%D) and an option to remove leading text from the path name (like /home/songs)

0.4 (October 9th, 2005)
- Two bugfixes:
Script failed if there was only one track on the playlist
Starting Number setting was ignored in the actual file copy process

0.3 (August 24th, 2005)
- Added Qt GUI [Qt is supposed to be installed anyway since amaroK requires it,
only perlqt is needed in addition.]
- Renaming of files is possible with configurable format
- Directory trees are created if the name format contains slashes "/"
- Symlinks / hardlinks can be created as an alternative to copying files
- Size of current playlist is displayed and refreshed on request, allowing user
to fine-tune the playlist size until it fits in the destination directory

0.2a
- Another info dialog in case of not enough free diskspace

0.2
- Checks free disk space and playlist size before it starts to copy
- Shows another dialog with playlist items

0.1
- Initial release


Ratings & Comments

19 Comments

twelve17

I just got a cell phone that has a very crude mp3 player. It requires all the files to be on the same folder, which is nice and annoying. I almost started to write a hack to do what this plugin does much more elegantly. Thanks for this nice tool.

hugogblanco

Hi, After executing (in Suse 10.1, Amarok 1.4.0, Kde 3.5.3) I get next error message: Can't locate XML/Simple.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at /home/hugo/.kde/share/apps/amarok/scripts/amarok-copyplaylist2/copyplaylist2.pl line 572. BEGIN failed--compilation aborted at /home/hugo/.kde/share/apps/amarok/scripts/amarok-copyplaylist2/copyplaylist2.pl line 572. Any idea? By, Hugo.

hugogblanco

Forget it. Solved one instaled perl xml simple. But keeps on not working because it needs more perl modules I don't have. By

DoM

Nice tool =) I have a wish: can you add an option to clear the directory before copy the playlist?

pouletfou

Great job, I was looking for this functionnality long time. I think it would be cool to have the playlist title as a variable like "%p" in addition to all others (track name, artist, etc..)

carstenjahn

Hi All, the new version of copyplaylist2 features user-defined configuration sets and has some smaller improvements. Please see the supplied README file. The existing config file is not reused due to the change to a new file format. You will notice that the dialog does not pop up. The script runs in the background until you right-click an item in your playlist and select "Copy Playlist Files / Open CopyPlaylist2 Dialog" from the context menu, or click "Configure" in the Script Manager. If you program in perl, get in contact with me in case you want to implement any of the remaining ToDo items or what you think would benefit this small script. Have fun, Carsten

jipumarino

It would be nice to get customizable 'Naming Presets' as you call them now. I find myself using different patterns when copying files to my mp3 player:

  • Albums, one per folder (ARTIST-ALBUM/NUMBER TITLE)
  • Random songs (Various/ARTIST-TITLE)
  • Podcasts
  • etc.

gisli

I have not tested copyplaylist2. I am basing my understanding of its functionality on its description. It seems that copying the files on the playlist to the usb is only desired the first time and that on subsequent envocations one would like the playlist and the usb to be syncronized, such as one might achieve with rsync. Rsync would not copy files already found on the usb device and could be instructed to remove files from the usb that are no longer found in the playlist. Has anyone given this any thought? A brute force solution might be to create a directory tree of symbolic links to the songs in the playlist and then envoke rsync, telling it to expand links to actual files as it syncronizes the usb with the directory of symlinks. Comments?

carstenjahn

I think it depends on your usage pattern, but it's definitely an interesting feature if the user has a device with a large filesystem. However, the sync does not work as expected if the %S placeholder is used: When songs are inserted in the middle of the playlist, all following sequence counts shift. But that's a minor drawback.

tasador

For some reason, when I use the %N parameter for the track number, it always results in 00, although the track number is properly displayed in the amarok playlist.

carstenjahn

The %N parameter does not work with newer versions of amarok. I have already fixed this problem in copyplaylist2 version 0.5, but I'm waiting for mkae to upload the improved version. I'll send you version 0.5 seperately by email... Regards, Carsten

tasador

I'm glad to hear a fix is on its way :-) I didn't receive your mail, but that's okay, as I guess it will be uploaded soon. Thanks!

hothead

Hi, nice skript. But I do have a problem. My system is utf8 encoded and I do mount my mp3 player with the option iocharset=utf8. Unfortunately the filename encoding is changed by your skript so every special character (like german umlauts, french accents etc.) gets garbled. How can that be changed? Regards hothead

carstenjahn

Hi, I have to look into this -- I even have the same problem with umlauts. One umlaut results in TWO "broken" chracters in my filesystem filenames. I suspect that perl uses UTF8 internally (coding the umlaut in two bytes) and my filesystem doesn't. The File::Copy call does not mediate the situation either. What is the exact problem with your filenames? Is a character missing in the destination filename right after the umlaut? I'll try to fix this, but I wonder why Perl filesystem modules are not aware of the conversion problem. Regards, Carsten

juanlutz

Hi, to run the script seems to be necesary to load some perl modules: XML::Simple File::Copy File::Basename Filesys::Df I am user of suse9.1 and was able to load only the fisrt one. Where can I get the rest of these modules? File::Copy, File::Basename and the Filesys::Df THX for any Support. Juan_Lutz

mkae

I wrote the script under Debian and got all the perl-stuff from cpan.org. Unfortunately i don't know if there are any packages for SuSE 9.1. E.g. perl -MCPAN -e 'install Filesys::Df' might help you.

Superstoned

what I am looking for is a way to see the size of files. I have a 512 mb usb mp3 player, and I want to have it full. so I have to copy a bunch of files, hope they'll fit, then try to add as many as I can. If I had some way of knowing how big the files in my playlist where (eg have I reached 512 mb yet or not) then being able to copy all files in my playlist with 1 click (or drag'n'drop) to my usbstick would work. now it doesn't... :(

mkae

I think this can only be implemented in amarok itself. In the 0.2a version of the script you can see the size of the playlist and the free space on the selected device.

Superstoned

LOVE!!! :D

Pling
0 Affiliates
Details
license
version 1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

Other Amarok 1.x Scripts:

Gnome Play Video in Totem
mwheatland
last update date: 19 years ago

Score 5.0

editLyrics-gnome
ZeeD
last update date: 19 years ago

Score 5.0

amarok Alarm
aroth
last update date: 16 years ago

Score 5.0

amaroK Web Collection V xmms
pti-jean
last update date: 16 years ago

Score 5.0

SongLogger
lucatnt
last update date: 17 years ago

Score 5.0

amaroK Web Collection
pti-jean
last update date: 16 years ago

Score 5.0



System Tags