Private
Public Access
Read ahead on mobile data too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
29ed836b4c
commit
08590f3224
1 file changed
+3
-2
@@ -353,10 +353,11 @@ public class PlayerService extends Service implements MediaPlayer.OnPreparedList
|
||||
});
|
||||
}
|
||||
|
||||
/** Fetches the next track whole in the background (Wi-Fi only), if it isn't here yet. Main thread. */
|
||||
/** Fetches the next track whole in the background (Wi-Fi or mobile data: it's the same bytes as streaming,
|
||||
* only earlier; a skipped track is the only waste), if it isn't here yet. Main thread. */
|
||||
private void maybePrefetch() {
|
||||
final App app = App.get();
|
||||
if (prefetchBusy || app.library == null || app.onMobileData()) return;
|
||||
if (prefetchBusy || app.library == null) return;
|
||||
PlayQueue q = PlayQueue.get();
|
||||
final Item next = q.peekNext();
|
||||
if (next == null || next == track || next.ratingKey.equals(prefetchKey) || Downloads.get().fileFor(next) != null) return;
|
||||
|
||||
Reference in new issue
Block a user