public void pauseDownload(final int gid) {

        switch (downloads.get(gid).getStatus()) {
        case ACTIVE:
        case WAITING:
            taskManager.pause(gid);
            break;

        default:
            break;
        }
    }