showError("error.download");
return;
}
boolean isAlreadyLocked = typeToDownload.isLocked(ores);
try {
lockResult = typeToDownload.acquireLock(ores, ureq.getIdentity());
if(lockResult==null || (lockResult!=null && lockResult.isSuccess() && !isAlreadyLocked)) {
MediaResource mr = typeToDownload.getAsMediaResource(ores);
if(mr!=null) {
RepositoryManager.getInstance().incrementDownloadCounter(repositoryEntry);
ureq.getDispatchResult().setResultingMediaResource(mr);