You are not logged in.
Pages: 1
I got me a shuffle a while back, but I noticed that you need to rebuild the databse EVERY time you add music to it.
So rather than using ITUNES that renames them and sticks them in different directories on the shuffle, I found a small python script called rebuild_db.py that scans the shuffle and makes the database for you WITHOUT renaming or moving the music, so you can just have all the music in one folder.
This seemed alot easyer, BUT then I still need to run it before I run umount.
So I though I would throw a small script together:
mount /mnt/ipod
konkorer /mnt/ipod/music (spellings)
python /mnt/ipod/.rebuild_db.py
umount /mnt/ipod
This seemed to do the job, but the first problem was that it takes the Ipod a few seconds to sort itself out before you can mount it, so I had to add:
sleep 4
at the start of the wee script.
Problem number 2 was if I load up another konkorer (spellings) and closed the Ipod one, it didnt carry on till I closed both. And sometimes it seemed to crash the script because it was still mounted after KonK was closed.
To get some debug outa it I added a line to open a xterm displaying 'FINISHED' for 2 seconds after the umount.
So atleast I knew when the script finished.
But if you leave the konk open for a while it seems to just stop the script come going on.
I now just have a icon to the device on desktop that I click then open Konk in the /mnt/ipod/music dir to copy over music, then when finished I click another icon (linked to the rebild_db.py script) then I right click the Ipod icon and umount it.
It seems to work alot better but its abit to long winded.
What im after is a way to get fstab or whatever to run the python script just before every umount of the ipod.
I like using the python script coz its fast, and small.
But overall I wanna plugin my Ipod, find my music I want, right click and 'copy to /mnt/ipod/music' after that it runs the python one, then it umounts it so I can just unplug it and off I go.
It would be nice if I had something that mounts it for a short time only when its being accessed.
Any ideas, or programs for ipods?
I want a quick and easy solid way to stick stuff on it, hastle free.
Thoughts?
Offline
Offline
Oh.. I got it automounting with that autofs:
http://wiki.archlinux.org/index.php/AutoFS_HowTo
But I can just do it direct with udev without needing the autofs?
So if I use that block of script at the bottom, do I just add a line before the umount to run the python script I need?
Offline
but you'vs gonna run into trouble with the 2G iPod Shuffle there :-)
(Ok, I don't know how it was with 1G Shuffle's)
since you mount /dev/sda (as vfat) ... no sda1 or sda2 or sda3 ... etc ...
so it seems better to use ivman, since you can setup a few recursive matches to only mount if it's the 2G shuffle ...
don't ask me how yet, haven't quite figured that out yet :-)
Offline
don't ask me how yet, haven't quite figured that out yet :-)
ok, wasn't that hard of a nut to crack :-)
here's what I've added to /etc/ivman/IvmConfigActions.xml :
<!-- example - mount /dev/sda # ipod: Dulli -->
<!-- -->
<ivm:Match name="hal.info.category" value="portable_audio_player">
<ivm:Match name="hal.storage.serial" value="Apple_iPod_000A270010BF9175">
<ivm:Match name="hal.portable_audio_player.type" value="ipod">
<ivm:Option name="exec" value="/bin/mount /mnt/dulli" />
</ivm:Match>
</ivm:Match>
</ivm:Match>
<!-- -->So, don't forget to change the value for "hal.storage.serial" to $YOURz
Maybe, one could use:
name="hal.usb_device.product_id" value="4865"
or
name="hal.usb.product_id" value="4865"
instead of "hal.storage.serial", if one wants to mount every 2G Shuffle in the world :-) (not just your specific copy) ... but I'm not sure it's the generic product_id for all 2G iPod Shuffle's ....
Offline
Pages: 1