mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-15 20:45:37 +00:00
Correction for when history may pull ratingKeys as None, this causes errors later on.
This commit is contained in:
parent
ce8610d0ed
commit
7f20da0ca9
@ -687,7 +687,7 @@ if __name__ == '__main__':
|
|||||||
watched_work(user=user, ratingKey=opts.ratingKey)
|
watched_work(user=user, ratingKey=opts.ratingKey)
|
||||||
|
|
||||||
# Find all items watched by all users
|
# Find all items watched by all users
|
||||||
all_watched = [key for user in user_lst for key in user.watch.keys()]
|
all_watched = [key for user in user_lst for key in user.watch.keys() if key is not None]
|
||||||
counts = Counter(all_watched)
|
counts = Counter(all_watched)
|
||||||
watched_by_all = [id for id in all_watched if counts[id] >= len(user_lst)]
|
watched_by_all = [id for id in all_watched if counts[id] >= len(user_lst)]
|
||||||
watched_by_all = list(set(watched_by_all))
|
watched_by_all = list(set(watched_by_all))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user