diff --git a/app/modules/themoviedb/tmdb_cache.py b/app/modules/themoviedb/tmdb_cache.py index 4beb82bf..d832ab28 100644 --- a/app/modules/themoviedb/tmdb_cache.py +++ b/app/modules/themoviedb/tmdb_cache.py @@ -182,7 +182,7 @@ class TmdbCache(metaclass=Singleton): new_meta_data.pop(k) else: count = 0 - keys = random.sample(new_meta_data.keys(), 25) + keys = random.sample(sorted(new_meta_data.keys()), 25) for k in keys: info = new_meta_data.get(k) expire = info.get(CACHE_EXPIRE_TIMESTAMP_STR) diff --git a/app/modules/transmission/transmission.py b/app/modules/transmission/transmission.py index 24f0c0b4..031dbc55 100644 --- a/app/modules/transmission/transmission.py +++ b/app/modules/transmission/transmission.py @@ -72,7 +72,7 @@ class Transmission(metaclass=Singleton): continue # 种子标签 labels = [str(tag).strip() - for tag in torrent.labels.split(',')] if hasattr(torrent, "labels") else [] + for tag in torrent.labels] if hasattr(torrent, "labels") else [] if tags and not set(tags).issubset(set(labels)): continue ret_torrents.append(torrent)