use of com.rarchives.ripme.ui.RipStatusMessage in project ripme by RipMeApp.
the class AbstractHTMLRipper method downloadExists.
@Override
public /**
* Tells user that a single file in the album they wish to download has
* already been downloaded in the past.
*/
void downloadExists(URL url, File file) {
if (observer == null) {
return;
}
itemsPending.remove(url);
itemsCompleted.put(url, file);
observer.update(this, new RipStatusMessage(STATUS.DOWNLOAD_WARN, url + " already saved as " + file.getAbsolutePath()));
checkIfComplete();
}
use of com.rarchives.ripme.ui.RipStatusMessage in project ripme by RipMeApp.
the class AlbumRipper method downloadExists.
@Override
public /**
* Tells user that a single file in the album they wish to download has
* already been downloaded in the past.
*/
void downloadExists(URL url, File file) {
if (observer == null) {
return;
}
itemsPending.remove(url);
itemsCompleted.put(url, file);
observer.update(this, new RipStatusMessage(STATUS.DOWNLOAD_WARN, url + " already saved as " + file.getAbsolutePath()));
checkIfComplete();
}
use of com.rarchives.ripme.ui.RipStatusMessage in project ripme by RipMeApp.
the class AlbumRipper method downloadErrored.
@Override
public /**
* Cleans up & tells user about failed download.
*/
void downloadErrored(URL url, String reason) {
if (observer == null) {
return;
}
itemsPending.remove(url);
itemsErrored.put(url, reason);
observer.update(this, new RipStatusMessage(STATUS.DOWNLOAD_ERRORED, url + " : " + reason));
checkIfComplete();
}
use of com.rarchives.ripme.ui.RipStatusMessage in project ripme by RipMeApp.
the class AlbumRipper method downloadCompleted.
@Override
public /**
* Cleans up & tells user about successful download
*/
void downloadCompleted(URL url, File saveAs) {
if (observer == null) {
return;
}
try {
String path = Utils.removeCWD(saveAs);
RipStatusMessage msg = new RipStatusMessage(STATUS.DOWNLOAD_COMPLETE, path);
itemsPending.remove(url);
itemsCompleted.put(url, saveAs);
observer.update(this, msg);
checkIfComplete();
} catch (Exception e) {
LOGGER.error("Exception while updating observer: ", e);
}
}
use of com.rarchives.ripme.ui.RipStatusMessage in project ripme by RipMeApp.
the class VideoRipper method downloadExists.
/**
* Runs if user tries to redownload an already existing File.
*
* @param url Target URL
* @param file Existing file
*/
@Override
public void downloadExists(URL url, File file) {
if (observer == null) {
return;
}
observer.update(this, new RipStatusMessage(STATUS.DOWNLOAD_WARN, url + " already saved as " + file));
checkIfComplete();
}
Aggregations