1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-21 23:38:50 -05:00

Use the same key type for all cache entries

This commit is contained in:
Reinhard Pointner 2019-05-17 00:03:35 +07:00
parent 674170a250
commit fab38b54a1

View File

@ -49,10 +49,10 @@ public enum ThumbnailServices implements ThumbnailProvider {
protected Set<Integer> getIndex() throws Exception {
Cache cache = getCache(ResolutionVariant.NORMAL);
byte[] bytes = cache.bytes("index.txt.xz", n -> new URL(getResource(n)), XZInputStream::new).expire(Cache.ONE_MONTH).get();
byte[] bytes = cache.bytes(0, n -> new URL(getResource("index.txt.xz")), XZInputStream::new).expire(Cache.ONE_MONTH).get();
// all data files are UTF-8 encoded XZ compressed text files
return NEWLINE.splitAsStream(UTF_8.decode(ByteBuffer.wrap(bytes))).filter(s -> s.length() > 0).map(Integer::parseInt).collect(toSet());
return NEWLINE.splitAsStream(UTF_8.decode(ByteBuffer.wrap(bytes))).map(Integer::parseInt).collect(toSet());
}
private final Resource<Set<Integer>> index = Resource.lazy(this::getIndex);