johang/btfs

btfs script

Pednick opened this issue · 2 comments

Ok first I should say I did not write this script, I just did a copy and paste from sources found on the web. Its suppose sound off a notification sound, which it does when it's done but seems like it didn't actually finish downloading and it shouldn't close until it's done. Here's the script:

#!/bin/bash

btfs --keep "$(xclip -o -selection clipboard)" mnt
paplay /usr/share/sounds/freedesktop/stereo/complete.oga && exit

Anyway if anyone wants to know how to create a desktop icon on ubuntu or I'm guessing on other distros too, I'm including it below, now the Exec and Icon path are obviousy going to be different on your end as well as the Icon pic which you can just browse on you search engine for one. Username is going to be whichever username you have, obvious not including my actual username for security reasons. With Ubuntu the desktop shortcut goes in .local/share/applications

Desktop shortcut:

[Desktop Entry]
Name=btfs
Exec=/home/username/Downloads/mpvstuff/usr/bin/btfs
Comment=
Terminal=true
Icon=/home/username/icons/BTFS.jpg
Type=Application

Well I figured one thing out, when I add the option "-f -o auto_unmount" (without the quotes) It shows the download information in the forground but it doesn't unmount after the download stops. Here's how it starts:

Got metadata. Now ready to start downloading.
handle_piece_finished_alert: 352(a series of those lines with differnt numbers until it stops downloading)
Then the download is finished but it should also unmount automatically.