use of com.rarchives.ripme.ui.RipStatusMessage in project ripme by RipMeApp.
the class AbstractHTMLRipper 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 AbstractHTMLRipper 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 AbstractJSONRipper 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 AbstractJSONRipper 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 AbstractJSONRipper 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);
}
}
Aggregations