|
#1
|
|||
|
|||
|
Hi everyone... here is a small script (/bin/bash) made for synchronize your .m3u files created by known media players (I just proved it for Banshee 1.2) to your UMS-P2 (you can change device and folder destination). At the end, you will have your song path same as in your machine, without the /path/before/your/Music/folder preffix which is replace by /your_device/Music_folder.
Save next code in a executable file (e.g. syncMP3) into a bin folder. Code:
#!/bin/bash
device=/media/P2
folder=Music
while read line; do
song=${line}
path=${song#*/music_folder/} # replace music_folder/ by your Music Folder (e.g. /home/foo/MUSIC -- use MUSIC/ instead)
path=${path%/*}
file=${song##*/}
if [[ ${song:0:1} != "#" ]]; then
if [ -d $device/$folder ]; then
echo -e $song
mkdir -p "$device/$folder/$path"
cp -r "$song" "$device/$folder/$path/"
else
echo "El directorio destino NO EXISTE"
echo "Por favor checa el directorio destino"
exit
fi
fi
done < $1
echo "Archivos copiados con éxito"
Code:
syncMP3 yourplaylist.m3u I suggest at first try with a TMP folder made by yourself, don't forget to change folder (destination) variable. Any debug or suggestion are welcome. Thank you for this forum. Last edited by jgustavogm; 10-06-2008 at 05:58 AM. |
| Advertisement | [Remove Advertisement] |
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 01:17 AM.











Linear Mode
