Can I reprioritize the queue in Ubuntu One?

Solution 1:

You cannot change the order, in which Ubuntu One downloads the files. I'm not even sure you can chose to skip certain file formats.

Is it possible for you to sign in on the web, and fetch them directly instead? If you place them in the correct folders, there might be a chance they sync before Ubuntu One download new files.

Solution 2:

I'm half-answering this question with a tiny script that should work in theory.

It searches for a string in --waiting-content, get the IDs and sends them to --schedule-next.

Sadly, it doesn't work because the "u1sdtool --schedule-next" command is failing on a dbus bug and because of this bug report, I don't see a bright future for it.

#!/bin/bash

if [ $1 ]
    then
    search=$1
    else
    echo "You need to provide a search string: u1up <search>"
    exit
fi
FirstResult=$(u1sdtool --waiting-content | grep -i $search)
if [ $FirstResult ]
    then
    node_id=$(echo $FirstResult | sed -n 's/.*node_id=\(.*\)\ share.*/\1/p')
    share_id=$(echo $FirstResult | sed -n 's/.*share_id=\(.*\)\ path.*/\1/p')
    path=$(echo $FirstResult | sed -n 's/.*path=\(.*\)/\1/p')

    echo "Attempting to prioritize $path ..."
    u1sdtool --schedule-next=$share_id $node_id

    else
    echo "Your search did not match any file waiting in the Ubuntu One queue."
    exit
fi

That was an interesting question!