mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-04-20 13:51:24 +00:00
-[#1060] Added toggle to disable thumbnail loading.
-Added button to wipe metadata cache. -Added more paddings on player buttons. -Added new animations to main player secondary controls and play queue expand/collapse. -Refactored play queue item touch callback for use in all players. -Improved MediaSourceManager to better handle expired stream reloading. -[#1186] Changed live sync button text to "LIVE". -Removed MediaSourceManager loader coupling on main players. -Moved service dependent expiry resolution to ServiceHelper. -[#1186] Fixed livestream timeline updates causing negative time position. -[#1186] Fixed livestream not starting from live-edge. -Fixed main player system UI not retracting on playback start.
This commit is contained in:
@@ -43,7 +43,6 @@ public final class InfoCache {
|
||||
* Trim the cache to this size
|
||||
*/
|
||||
private static final int TRIM_CACHE_TO = 30;
|
||||
private static final int DEFAULT_TIMEOUT_HOURS = 4;
|
||||
|
||||
private static final LruCache<String, CacheData> lruCache = new LruCache<>(MAX_ITEMS_ON_CACHE);
|
||||
|
||||
@@ -66,13 +65,7 @@ public final class InfoCache {
|
||||
public void putInfo(int serviceId, @NonNull String url, @NonNull Info info) {
|
||||
if (DEBUG) Log.d(TAG, "putInfo() called with: info = [" + info + "]");
|
||||
|
||||
final long expirationMillis;
|
||||
if (info.getServiceId() == SoundCloud.getServiceId()) {
|
||||
expirationMillis = TimeUnit.MILLISECONDS.convert(15, TimeUnit.MINUTES);
|
||||
} else {
|
||||
expirationMillis = TimeUnit.MILLISECONDS.convert(DEFAULT_TIMEOUT_HOURS, TimeUnit.HOURS);
|
||||
}
|
||||
|
||||
final long expirationMillis = ServiceHelper.getCacheExpirationMillis(info.getServiceId());
|
||||
synchronized (lruCache) {
|
||||
final CacheData data = new CacheData(info, expirationMillis);
|
||||
lruCache.put(keyOf(serviceId, url), data);
|
||||
|
||||
Reference in New Issue
Block a user