This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDEConnect-CLI sometimes doesn't share/upload files?

Tags: None
(comma "," separated)
marcusmacahall
Registered Member
Posts
2
Karma
0
I run this script to share my Freetube files to my second computer, keeping all the stuff in sync as if it were linked to an actual account.
The last line runs a kde-connect command, which just moves these 3 files into the right folder on the 2nd computer. However, something goes wrong and the script doesn't always work. The transfer gets stuck at 59% on the second file. Sometimes, killing and rebooting KDE connect fixes it, other times not. What gives?
Code: Select all
#!/bin/bash
kdeconnect-cli --name computer2 --share ~/.config/FreeTube/history.db
kdeconnect-cli --name computer2 --share ~/.config/FreeTube/playlists.db
kdeconnect-cli --name computer2 --share ~/.config/FreeTube/profiles.db
kdeconnect-cli --name computer2 --execute-command _0509c159_1350_4e83_9cca_b42b4273c33c_

in the last line, the command which is remotely executed just uses mv ~/Downloads/*mv ~/.config/FreeTube/.
marcusmacahall
Registered Member
Posts
2
Karma
0
Hey! i figured out a really easy solution! Sleep!!! (which is exactly what i need to do now after fussing over this for so long)
Code: Select all
#!/bin/bash
kdeconnect-cli --name computer2 --share ~/.config/FreeTube/history.db ;
sleep 5 ;
kdeconnect-cli --name computer2 --share ~/.config/FreeTube/playlists.db ;
sleep 5 ;
kdeconnect-cli --name computer2 --share~/.config/FreeTube/profiles.db ;
sleep 5 ;
kdeconnect-cli --name computer2 --execute-command _0509c159_1350_4e83_9cca_b42b4273c33c_ ;


and command "_0509c159_1350_4e83_9cca_b42b4273c33c_", saved on computer2 as freetube-sync.sh =
Code: Select all
#!/bin/bash
mv ~/Downloads/history.db ~/.config/FreeTube/
mv ~/Downloads/playlists.db ~/.config/FreeTube/
mv ~/Downloads/profiles.db ~/.config/FreeTube/


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]