mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-02 22:30:40 +00:00
Fix fallback to cache results
This commit is contained in:
parent
6e14acc685
commit
fbd9345cf8
1 changed files with 2 additions and 1 deletions
|
@ -79,7 +79,7 @@ abstract class SubscriptionsTaskFetchAlgorithm(
|
||||||
if(result != null) {
|
if(result != null) {
|
||||||
if(result.pager != null)
|
if(result.pager != null)
|
||||||
taskResults.add(result);
|
taskResults.add(result);
|
||||||
else if(result.exception != null) {
|
if(result.exception != null) {
|
||||||
val ex = result.exception;
|
val ex = result.exception;
|
||||||
if(ex != null) {
|
if(ex != null) {
|
||||||
val nonRuntimeEx = findNonRuntimeException(ex);
|
val nonRuntimeEx = findNonRuntimeException(ex);
|
||||||
|
@ -198,6 +198,7 @@ abstract class SubscriptionsTaskFetchAlgorithm(
|
||||||
Logger.i(StateSubscriptions.TAG, "Channel ${task.sub.channel.name} failed, substituting with cache");
|
Logger.i(StateSubscriptions.TAG, "Channel ${task.sub.channel.name} failed, substituting with cache");
|
||||||
pager = ChannelContentCache.instance.getChannelCachePager(task.sub.channel.url);
|
pager = ChannelContentCache.instance.getChannelCachePager(task.sub.channel.url);
|
||||||
taskEx = ex;
|
taskEx = ex;
|
||||||
|
return@submit SubscriptionTaskResult(task, pager, taskEx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return@submit SubscriptionTaskResult(task, null, taskEx);
|
return@submit SubscriptionTaskResult(task, null, taskEx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue