Improve logging
This commit is contained in:
parent
80071a1eb4
commit
f170ce2b07
|
@ -135,6 +135,8 @@ public class HlsDownload extends AbstractHlsDownload {
|
||||||
} catch(HttpException e) {
|
} catch(HttpException e) {
|
||||||
if(e.getResponseCode() == 404) {
|
if(e.getResponseCode() == 404) {
|
||||||
LOG.debug("Playlist not found (404). Model {} probably went offline", model);
|
LOG.debug("Playlist not found (404). Model {} probably went offline", model);
|
||||||
|
} else if(e.getResponseCode() == 403) {
|
||||||
|
LOG.debug("Playlist access forbidden (403). Model {} probably went private or offline", model);
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,6 +219,16 @@ public class MergedHlsDownload extends AbstractHlsDownload {
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch(HttpException e) {
|
||||||
|
String modelName = model != null ? model.getName() : "n/a";
|
||||||
|
if(e.getResponseCode() == 404) {
|
||||||
|
LOG.debug("Playlist not found (404). Model {} probably went offline", modelName);
|
||||||
|
} else if(e.getResponseCode() == 403) {
|
||||||
|
LOG.debug("Playlist access forbidden (403). Model {} probably went private or offline", modelName);
|
||||||
|
} else {
|
||||||
|
LOG.info("Unexpected error while downloading {}", modelName, e);
|
||||||
|
}
|
||||||
|
running = false;
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
if(model != null) {
|
if(model != null) {
|
||||||
LOG.info("Unexpected error while downloading {}", model.getName(), e);
|
LOG.info("Unexpected error while downloading {}", model.getName(), e);
|
||||||
|
|
Loading…
Reference in New Issue