[fix] Download Logic
This commit is contained in:
@@ -227,12 +227,12 @@ class TransmissionScreenViewModel @Inject constructor(
|
|||||||
|
|
||||||
downloads.clear()
|
downloads.clear()
|
||||||
idToState.clear()
|
idToState.clear()
|
||||||
downloaded.filter { it.extras.getString("type", "") == "main" }.sortedWith(compareBy(naturalOrder()) { it.extras.getString("name", "") })
|
downloaded.forEach { d ->
|
||||||
.forEach { d ->
|
val s = downloadToState(d)
|
||||||
val s = downloadToState(d)
|
downloads.add(s)
|
||||||
downloads.add(s)
|
idToState[s.id] = s
|
||||||
idToState[s.id] = s
|
|
||||||
|
|
||||||
|
if (d.extras.getString("type", "") == "main") {
|
||||||
if (!videoLibrary.classes.contains(s.klass))
|
if (!videoLibrary.classes.contains(s.klass))
|
||||||
videoLibrary.classes.add(s.klass)
|
videoLibrary.classes.add(s.klass)
|
||||||
|
|
||||||
@@ -246,6 +246,7 @@ class TransmissionScreenViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user