diff --git a/lbry/wallet/server/db/common.py b/lbry/wallet/server/db/common.py index 8f75737e7..d1b88d49d 100644 --- a/lbry/wallet/server/db/common.py +++ b/lbry/wallet/server/db/common.py @@ -13,209 +13,306 @@ STREAM_TYPES = { 'model': 6 } +# 9/21/2020 +MOST_USED_TAGS = { + "gaming", + "people & blogs", + "entertainment", + "music", + "pop culture", + "education", + "technology", + "blockchain", + "news", + "funny", + "science & technology", + "learning", + "gameplay", + "news & politics", + "comedy", + "bitcoin", + "beliefs", + "nature", + "art", + "economics", + "film & animation", + "lets play", + "games", + "sports", + "howto & style", + "game", + "cryptocurrency", + "playstation 4", + "automotive", + "crypto", + "mature", + "sony interactive entertainment", + "walkthrough", + "tutorial", + "video game", + "weapons", + "pc", + "playthrough", + "anime", + "how to", + "btc", + "fun", + "ethereum", + "food", + "travel & events", + "minecraft", + "science", + "autos & vehicles", + "play", + "politics", + "commentary", + "twitch", + "ps4live", + "love", + "ps4", + "nonprofits & activism", + "ps4share", + "fortnite", + "xbox", + "porn", + "video games", + "trump", + "espaƱol", + "money", + "music video", + "movie", + "coronavirus", + "nintendo", + "donald trump", + "steam", + "trailer", + "android", + "podcast", + "xbox one", + "survival", + "linux", + "travel", + "funny moments", + "audio", + "litecoin", + "animation", + "gamer", + "lets", + "playstation", + "bitcoin news", + "history", + "fox news", + "xxx", + "god", + "dance", + "adventure", + "liberal", + "horror", + "government", + "freedom", + "2020", + "reaction", + "meme", + "photography", + "truth" +} + MATURE_TAGS = [ 'nsfw', 'porn', 'xxx', 'mature', 'adult', 'sex' ] + +def normalize_tag(tag): + return tag.replace(" ", "_").replace("&", "and").replace("-", "_") + + COMMON_TAGS = { - "gaming": "gaming", - "people & blogs": "people_and_blogs", - "pop culture": "pop_culture", - "entertainment": "entertainment", - "technology": "technology", - "music": "music", - "funny": "funny", - "education": "education", - "learning": "learning", - "news": "news", - "gameplay": "gameplay", - "science & technology": "science_and_technology", - "playstation 4": "playstation_4", - "beliefs": "beliefs", - "nature": "nature", - "news & politics": "news_and_politics", - "comedy": "comedy", - "games": "games", - "sony interactive entertainment": "sony_interactive_entertainment", - "film & animation": "film_and_animation", - "game": "game", - "howto & style": "howto_and_style", - "weapons": "weapons", - "blockchain": "blockchain", - "video game": "video_game", - "sports": "sports", - "walkthrough": "walkthrough", - "ps4live": "ps4live", - "art": "art", - "pc": "pc", - "economics": "economics", - "automotive": "automotive", - "minecraft": "minecraft", - "playthrough": "playthrough", - "ps4share": "ps4share", - "tutorial": "tutorial", - "play": "play", - "twitch": "twitch", - "how to": "how_to", - "ps4": "ps4", - "bitcoin": "bitcoin", - "fortnite": "fortnite", - "commentary": "commentary", - "lets play": "lets_play", - "fun": "fun", - "politics": "politics", - "xbox": "xbox", - "autos & vehicles": "autos_and_vehicles", - "travel & events": "travel_and_events", - "food": "food", - "science": "science", - "mature": "mature", - "xbox one": "xbox_one", - "liberal": "liberal", - "democrat": "democrat", - "progressive": "progressive", - "survival": "survival", - "nonprofits & activism": "nonprofits_and_activism", - "cryptocurrency": "cryptocurrency", - "playstation": "playstation", - "nintendo": "nintendo", - "government": "government", - "steam": "steam", - "podcast": "podcast", - "horror": "horror", - "conservative": "conservative", - "reaction": "reaction", - "trailer": "trailer", - "love": "love", - "cnn": "cnn", - "republican": "republican", - "gamer": "gamer", - "political": "political", - "hangoutsonair": "hangoutsonair", - "hoa": "hoa", - "msnbc": "msnbc", - "cbs": "cbs", - "donald trump": "donald_trump", - "fiction": "fiction", - "fox news": "fox_news", - "anime": "anime", - "crypto": "crypto", - "ethereum": "ethereum", - "call of duty": "call_of_duty", - "multiplayer": "multiplayer", - "android": "android", - "epic": "epic", - "rpg": "rpg", - "adventure": "adventure", - "secular talk": "secular_talk", - "btc": "btc", - "atheist": "atheist", - "atheism": "atheism", - "ps3": "ps3", - "video games": "video_games", - "cod": "cod", - "agnostic": "agnostic", - "movie": "movie", - "online": "online", - "fps": "fps", - "mod": "mod", - "reviews": "reviews", - "sharefactory": "sharefactory", - "world": "world", - "space": "space", - "hilarious": "hilarious", - "stream": "stream", - "lol": "lol", - "sony": "sony", - "god": "god", - "lets": "lets", - "dance": "dance", - "pvp": "pvp", - "tech": "tech", - "zombies": "zombies", - "pokemon": "pokemon", - "fail": "fail", - "xbox 360": "xbox_360", - "film": "film", - "unboxing": "unboxing", - "animation": "animation", - "travel": "travel", - "money": "money", - "wwe": "wwe", - "how": "how", - "mods": "mods", - "pubg": "pubg", - "indie": "indie", - "strategy": "strategy", - "history": "history", - "rap": "rap", - "ios": "ios", - "sony computer entertainment": "sony_computer_entertainment", - "mobile": "mobile", - "trump": "trump", - "flat earth": "flat_earth", - "hack": "hack", - "trap": "trap", - "fox": "fox", - "vlogging": "vlogging", - "news radio": "news_radio", - "humor": "humor", - "facebook": "facebook", - "edm": "edm", - "fitness": "fitness", - "vaping": "vaping", - "hip hop": "hip_hop", - "secular": "secular", - "jesus": "jesus", - "vape": "vape", - "song": "song", - "remix": "remix", - "guitar": "guitar", - "daily": "daily", - "mining": "mining", - "diy": "diy", - "videogame": "videogame", - "pets & animals": "pets_and_animals", - "funny moments": "funny_moments", - "religion": "religion", - "death": "death", - "media": "media", - "nbc": "nbc", - "war": "war", - "freedom": "freedom", - "viral": "viral", - "meme": "meme", - "family": "family", - "gold": "gold", - "photography": "photography", - "chill": "chill", - "zombie": "zombie", - "computer": "computer", - "sniper": "sniper", - "bible": "bible", - "linux": "linux", - "overwatch": "overwatch", - "pro": "pro", - "dragon": "dragon", - "litecoin": "litecoin", - "gta": "gta", - "iphone": "iphone", - "house": "house", - "bass": "bass", - "bitcoin news": "bitcoin_news", - "wii": "wii", - "crash": "crash", - "league of legends": "league_of_legends", - "grand theft auto v": "grand_theft_auto_v", - "mario": "mario", - "mmorpg": "mmorpg", - "satire": "satire", - "fire": "fire", - "racing": "racing", - "apple": "apple", - "health": "health", - "instrumental": "instrumental", - "destiny": "destiny", - "truth": "truth", - "race": "race" + tag: normalize_tag(tag) for tag in list(MOST_USED_TAGS) } + +INDEXED_LANGUAGES = [ + 'en', + 'aa', + 'ab', + 'ae', + 'af', + 'ak', + 'am', + 'an', + 'ar', + 'as', + 'av', + 'ay', + 'az', + 'ba', + 'be', + 'bg', + 'bh', + 'bi', + 'bm', + 'bn', + 'bo', + 'br', + 'bs', + 'ca', + 'ce', + 'ch', + 'co', + 'cr', + 'cs', + 'cu', + 'cv', + 'cy', + 'da', + 'de', + 'dv', + 'dz', + 'ee', + 'el', + 'eo', + 'es', + 'et', + 'eu', + 'fa', + 'ff', + 'fi', + 'fj', + 'fo', + 'fr', + 'fy', + 'ga', + 'gd', + 'gl', + 'gn', + 'gu', + 'gv', + 'ha', + 'he', + 'hi', + 'ho', + 'hr', + 'ht', + 'hu', + 'hy', + 'hz', + 'ia', + 'id', + 'ie', + 'ig', + 'ii', + 'ik', + 'io', + 'is', + 'it', + 'iu', + 'ja', + 'jv', + 'ka', + 'kg', + 'ki', + 'kj', + 'kk', + 'kl', + 'km', + 'kn', + 'ko', + 'kr', + 'ks', + 'ku', + 'kv', + 'kw', + 'ky', + 'la', + 'lb', + 'lg', + 'li', + 'ln', + 'lo', + 'lt', + 'lu', + 'lv', + 'mg', + 'mh', + 'mi', + 'mk', + 'ml', + 'mn', + 'mr', + 'ms', + 'mt', + 'my', + 'na', + 'nb', + 'nd', + 'ne', + 'ng', + 'nl', + 'nn', + 'no', + 'nr', + 'nv', + 'ny', + 'oc', + 'oj', + 'om', + 'or', + 'os', + 'pa', + 'pi', + 'pl', + 'ps', + 'pt', + 'qu', + 'rm', + 'rn', + 'ro', + 'ru', + 'rw', + 'sa', + 'sc', + 'sd', + 'se', + 'sg', + 'si', + 'sk', + 'sl', + 'sm', + 'sn', + 'so', + 'sq', + 'sr', + 'ss', + 'st', + 'su', + 'sv', + 'sw', + 'ta', + 'te', + 'tg', + 'th', + 'ti', + 'tk', + 'tl', + 'tn', + 'to', + 'tr', + 'ts', + 'tt', + 'tw', + 'ty', + 'ug', + 'uk', + 'ur', + 'uz', + 've', + 'vi', + 'vo', + 'wa', + 'wo', + 'xh', + 'yi', + 'yo', + 'za', + 'zh', + 'zu' +]