synchronized public void finished(int status, Recording rec){
		// if the video downloaded successful remove the video from the list and
		// update the database that the video download was successful
		if(status == FINISHED_SUCCESSFUL){
			
		    LOG.info("The recording with id " + rec.getId() + " was downloaded sucessfully to " + rec.getFilename());
		    // now find the video with the respective ID again and remove it from the list
			// find out which of the threads was successful and update the database accordingly	
		    try {
		    	for(Recording recording: _recordings){
		    		if(recording.getId().equals(rec.getId())){
		    			recording.setComplete();
		    			break;
		    		}
		    	}
			    _rcm.update(rec);

			    // when everything is complete move the file from the temp directory to the real
			    // download directory
			    try {
			    	File src = new File(Parameter.getTmpDirectory() + "/" + rec.getFilename());
			    	File dest = new File(Parameter.getDownloadDirectory() + "/" + rec.getFilename());
			    	if(!src.renameTo(dest)) LOG.debug("The file " + " was moved successfully to: ..");
			    } catch(Exception e){
			    	LOG.error("Could not move file " +  rec.getFilename() + "from temporary directory to download directory. The error was:" + e.getMessage());
			    }
			   
			    
			} catch (SQLException ex){
				LOG.error("Error when trying to set the recording with id " + rec.getId() + " to complete.");
				LOG.error(ex.getMessage());
			}
		}
		numberOfRunningThreads--;
		
		// start the next download as long as there are videos left in the list
		if(_trackkeeper.size() > 0){
			this.startNext();
		}
		
	}