catch exceprion in playheads() and postPlayheads() & update agp
* fix a crash, if there is no internet connection while in playback (closes #60) * agp 7.2.0 -> 7.2.1
This commit is contained in:
@ -550,8 +550,11 @@ object Crunchyroll {
|
||||
|
||||
return try {
|
||||
requestGet(playheadsEndpoint, parameters)
|
||||
}catch (ex: SerializationException) {
|
||||
Log.e(TAG, "SerializationException in upNextSeries().", ex)
|
||||
} catch (ex: SerializationException) {
|
||||
Log.e(TAG, "SerializationException in playheads().", ex)
|
||||
emptyMap()
|
||||
} catch (ex: Throwable) {
|
||||
Log.e(TAG, "Exception in playheads().", ex.cause)
|
||||
emptyMap()
|
||||
}
|
||||
}
|
||||
@ -571,7 +574,11 @@ object Crunchyroll {
|
||||
put("playhead", playhead)
|
||||
}
|
||||
|
||||
requestPost(playheadsEndpoint, parameters, json)
|
||||
try {
|
||||
requestPost(playheadsEndpoint, parameters, json)
|
||||
} catch (ex: Throwable) {
|
||||
Log.e(TAG, "Exception in postPlayheads()", ex.cause)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user