Add support for new SDK (0.37.*) and support for upgrading channels and claims to new metadata #28

Merged
nikooo777 merged 37 commits from metadata_upgrade into master 2019-06-13 20:14:14 +02:00
4 changed files with 477 additions and 215 deletions
Showing only changes of commit e73085b6bc - Show all commits

2
go.mod
View file

@ -15,7 +15,7 @@ require (
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/lbryio/errors.go v0.0.0-20180223142025-ad03d3cc6a5c
github.com/lbryio/lbry.go v1.0.6
github.com/lbryio/lbry.go v1.0.7
github.com/lusis/slack-test v0.0.0-20190408224659-6cf59653add2 // indirect
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936
github.com/mitchellh/mapstructure v1.1.2 // indirect

4
go.sum
View file

@ -127,8 +127,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lbryio/errors.go v0.0.0-20180223142025-ad03d3cc6a5c h1:BhdcWGsuKif/XoSZnqVGNqJ1iEmH0czWR5upj+AuR8M=
github.com/lbryio/errors.go v0.0.0-20180223142025-ad03d3cc6a5c/go.mod h1:muH7wpUqE8hRA3OrYYosw9+Sl681BF9cwcjzE+OCNK8=
github.com/lbryio/lbry.go v1.0.6 h1:dGZHwYdD5bb7PCOhG2ksJuvhOjqIARAcXJGggaOhC6o=
github.com/lbryio/lbry.go v1.0.6/go.mod h1:JtyI30bU51rm0LZ/po3mQuzf++14OWb6kR/6mMRAmKU=
github.com/lbryio/lbry.go v1.0.7 h1:CO9wnH/grsrX1O3YpeSBpLVPtc3lOOVTvZCcPFZ2Os0=
github.com/lbryio/lbry.go v1.0.7/go.mod h1:JtyI30bU51rm0LZ/po3mQuzf++14OWb6kR/6mMRAmKU=
github.com/lbryio/lbryschema.go v0.0.0-20190428231007-c54836bca002 h1:urfYK5ElpUrAv90auPLldoVC60LwiGAcY0OE6HJB9KI=
github.com/lbryio/lbryschema.go v0.0.0-20190428231007-c54836bca002/go.mod h1:dAzPCBj3CKKWBGYBZxK6tKBP5SCgY2tqd9SnQd/OyKo=
github.com/lbryio/ozzo-validation v0.0.0-20170323141101-d1008ad1fd04/go.mod h1:fbG/dzobG8r95KzMwckXiLMHfFjZaBRQqC9hPs2XAQ4=

View file

@ -243,7 +243,7 @@ func (s *Sync) ensureChannelOwnership() error {
return errors.Err("no channel name set")
}
//@TODO: get rid of this when imported channels are supported
if s.YoutubeChannelID == "UCkK9UDm_ZNrq_rIXCz3xCGA" || s.YoutubeChannelID == "UCW-thz5HxE-goYq8yPds1Gw" {
if s.YoutubeChannelID == "UCW-thz5HxE-goYq8yPds1Gw" {
return nil
}
channels, err := s.daemon.ChannelList(nil, 1, 50)

View file

@ -12,9 +12,12 @@ const (
Sports = "sports"
Food = "food"
Science = "science"
Fitness = "fitness"
Art = "art"
Nature = "nature"
Beliefs = "beliefs"
Music = "music"
PopCulture = "pop culture"
Weapons = "weapons"
)
func SanitizeTags(tags []string) []string {
@ -385,6 +388,7 @@ var tagsToSkip = map[string]*struct{}{
"2013": nil,
"green": nil,
"la": nil,
"footage": nil,
"london": nil,
"adam": nil,
"jnrsnrgaming": nil,
@ -440,7 +444,11 @@ var tagsToSkip = map[string]*struct{}{
"Shield": nil,
"aventure": nil,
"until dawn": nil,
"mortal": nil,
"camera": nil,
"Team": nil,
"release": nil,
"get": nil,
"florida": nil,
"with": nil,
"battlefield": nil,
@ -468,8 +476,115 @@ var tagsToSkip = map[string]*struct{}{
"UK": nil,
"dean": nil,
"hcg": nil,
"4k": nil,
"cheat": nil,
"60fps": nil,
"latest Bollywood news": nil,
"all": nil,
"x320": nil,
"orange": nil,
"pig": nil,
"cow": nil,
"convention": nil,
"easy": nil,
"achievement": nil,
"direct": nil,
"glitch": nil,
"farming": nil,
"mine": nil,
"wow": nil,
"empire": nil,
"inc": nil,
"source": nil,
"heroes of newerth": nil,
"vlog": nil,
"official": nil,
"awesome": nil,
"super": nil,
"jeux vidéo": nil,
"Hangouts On Air": nil,
"build": nil,
"amazing": nil,
"scary": nil,
"cool": nil,
"no commentary": nil,
"fight": nil,
"pewdiepie": nil,
"India": nil,
"livestream": nil,
"festival": nil,
"Live": nil,
"shooter": nil,
"influencer": nil,
"power": nil,
"black": nil,
"liquid": nil,
"reaction": nil,
"mobile": nil,
"vlogs": nil,
"voice": nil,
"fails": nil,
"deep": nil,
"crazy": nil,
"rants": nil,
"like": nil,
"speed": nil,
"fights": nil,
"Fun": nil,
"friends": nil,
"women": nil,
"old": nil,
"fireworks": nil,
"compilation": nil,
"gopro": nil,
"energy": nil,
"navidad": nil,
"quality": nil,
"farm": nil,
"Commentary": nil,
"Challenges": nil,
"alien": nil,
"house party": nil,
"house flipper": nil,
"kids": nil,
"king": nil,
"beta": nil,
"team": nil,
"Champion": nil,
"vlogger": nil,
"time": nil,
"street": nil,
"bollywood": nil,
"death voice": nil,
"death noise": nil,
"moments": nil,
"injured": nil,
"wounded": nil,
"terror": nil,
"party": nil,
"craft": nil,
"english": nil,
"city": nil,
"dark": nil,
"coplanet": nil,
"solo": nil,
"fighting": nil,
"dead": nil,
"alpha": nil,
"blog": nil,
"colorful": nil,
"futuristic": nil,
"react": nil,
"gay": nil,
"raid": nil,
"mmr": nil,
"high": nil,
"outrageous": nil,
"support": nil,
"relationships": nil,
"base": nil,
"girls": nil,
"sex": nil,
"girl": nil,
"sexy": nil,
}
var mapAndReplace = map[string]string{
"nfl": Sports,
@ -481,120 +596,169 @@ var mapAndReplace = map[string]string{
}
var mapAndKeep = map[string]string{
"dance": Art,
"design": Art,
"fashion": Art,
"creative hairstyles": Art,
"colorful hair": Art,
"cool long hair": Art,
"cartoon": Art,
"comic": Art,
"comics": Art,
"beauty": Art,
"car": Automotive,
"CARS": Automotive,
"4x4": Automotive,
"AUTOMOBILE": Automotive,
"autos": Automotive,
"Carros": Automotive,
"Suv": Automotive,
"TRUCK": Automotive,
"Garage": Automotive,
"auto": Automotive,
"crash": Automotive,
"driving": Automotive,
"cars": Automotive,
"race": Automotive,
"Bmw": Automotive,
"vehicle": Automotive,
"Benz": Automotive,
"Auto Show (Event)": Automotive,
"Mercedes": Automotive,
"engine": Automotive,
"mercedes": Automotive,
"motorcycle": Automotive,
"porsche": Automotive,
"Bus": Automotive,
"jeep": Automotive,
"secular talk": Beliefs,
"atheist": Beliefs,
"atheism": Beliefs,
"agnostic": Beliefs,
"freedom": Beliefs,
"secular": Beliefs,
"religion": Beliefs,
"liberty": Beliefs,
"christian": Beliefs,
"god": Beliefs,
"libertarian": Beliefs,
"guru": Beliefs,
"muslim": Beliefs,
"voluntarism": Beliefs,
"yogi": Beliefs,
"mystic": Beliefs,
"bible": Beliefs,
"jesus": Beliefs,
"anarchism": Beliefs,
"christianity": Beliefs,
"anarchy": Beliefs,
"voluntaryist": Beliefs,
"activism": Beliefs,
"hindu": Beliefs,
"peace": Beliefs,
"love": Beliefs,
"death": Beliefs,
"christmas": Beliefs,
"lord": Beliefs,
"bitcoin": Blockchain,
"cryptocurrency": Blockchain,
"crypto": Blockchain,
"ethereum": Blockchain,
"btc": Blockchain,
"airdrop": Blockchain,
"litecoin": Blockchain,
"eth": Blockchain,
"mining": Blockchain,
"bitcoin news": Blockchain,
"ico": Blockchain,
"crypto news": Blockchain,
"token": Blockchain,
"token free": Blockchain,
"bitcoin price": Blockchain,
"altcoins": Blockchain,
"cryptocurrency news": Blockchain,
"altcoin": Blockchain,
"coin": Blockchain,
"ripple": Blockchain,
"free bitcoin": Blockchain,
"ltc": Blockchain,
"dash": Blockchain,
"eos": Blockchain,
"steemit": Blockchain,
"coinbase": Blockchain,
"cryptocurrencies": Blockchain,
"money": Economics,
"economy": Economics,
"gold": Economics,
"federal reserve": Economics,
"market": Economics,
"investing": Economics,
"dollar": Economics,
"monetary reform": Economics,
"economic": Economics,
"recession": Economics,
"trading": Economics,
"finance": Economics,
"currency": Economics,
"business": Economics,
"health": Food,
"vegan": Food,
"fruits": Food,
"vegán": Food,
"food holidays": Food,
"comedy": Funny,
"fun": Funny,
"Funny": Funny,
"hilarious": Funny,
"lol": Funny,
"satire": Funny,
"humor": Funny,
"funny moments": Funny,
"Comedy": Funny,
"parody": Funny,
"funny video": Funny,
"silly": Funny,
"humour": Funny,
"Satire": Funny,
"gameplay": Gaming,
"games": Gaming,
"News": News,
"game": Gaming,
"politics": News,
"PlayStation 4": Gaming,
"Sony Interactive Entertainment": Gaming,
"walkthrough": Gaming,
"pc": Technology,
"playthrough": Gaming,
"#PS4Live": Gaming,
"let's play": Gaming,
"democrat": News,
"liberal": News,
"progressive": News,
"government": News,
"play": Gaming,
"republican": News,
"conservative": News,
"commentary": News,
"political": News,
"CNN": News,
"tutorial": Learning,
"cbs": News,
"lets play": Gaming,
"MSNBC": News,
"bitcoin": Blockchain,
"minecraft": Gaming,
"twitch": Gaming,
"Video Game (Industry)": Gaming,
"ps4": Gaming,
"#PS4share": Gaming,
"how to": Learning,
"Fox news": News,
"fox": News,
"xbox": Gaming,
"nbc": News,
"Gaming": Gaming,
"comedy": Funny,
"video game": Gaming,
"car": Automotive,
"Education": Learning,
"POLITICS": News,
"Educational": Learning,
"cryptocurrency": Blockchain,
"News & Politics": News,
"fun": Funny,
"playstation": Gaming,
"CARS": Automotive,
"xbox one": Gaming,
"senate": News,
"steam": Gaming,
"4x4": Automotive,
"AUTOMOBILE": Automotive,
"fortnite": Gaming,
"autos": Automotive,
"Sport": Sports,
"crypto": Blockchain,
"Carros": Automotive,
"ethereum": Blockchain,
"Suv": Automotive,
"playstation 4": Gaming,
"TRUCK": Automotive,
"video games": Gaming,
"Funny": Funny,
"Garage": Automotive,
"congress": News,
"lets": Gaming,
"nintendo": Gaming,
"ps3": Gaming,
"auto": Automotive,
"house of representatives": News,
"fps": Gaming,
"rpg": Gaming,
"btc": Blockchain,
"video game (industry)": Gaming,
"multiplayer": Gaming,
"video news": News,
"animated news": News,
"android": Technology,
"computer": Technology,
"how": Learning,
"let's": Gaming,
"donald trump": News,
"Fortnite": Gaming,
"COMO": News,
"online": Technology,
"TRUMP": News,
"mods": Technology,
"tech": Technology,
"hilarious": Funny,
"dota 2": Gaming,
"crash": Automotive,
"PUTIN": News,
"dance": Art,
"money": Economics,
"news radio": News,
"lol": Funny,
"xbox 360": Gaming,
"SALMAN KHAN": Learning,
"airdrop": Blockchain,
"litecoin": Blockchain,
"Sony Computer Entertainment": Gaming,
"pc games": Gaming,
"eth": Blockchain,
"mining": Blockchain,
"ios": Technology,
"linux": Technology,
"sony": Technology,
"space": Nature,
"iphone": Technology,
"education": Learning,
"Gamer": Gaming,
"bitcoin news": Blockchain,
"call of duty": Gaming,
"pokemon": Gaming,
"League": Gaming,
@ -602,209 +766,98 @@ var mapAndKeep = map[string]string{
"Let's": Gaming,
"league of legends": Gaming,
"League Of Legends (Video Game)": Gaming,
"economy": Economics,
"cod": Gaming,
"ico": Blockchain,
"pubg": Gaming,
"gold": Economics,
"Xbox": Gaming,
"pvp": Gaming,
"videogame": Gaming,
"vegan": Food,
"dota": Gaming,
"Games": Gaming,
"let's play fr": Gaming,
"satire": Funny,
"mario": Gaming,
"pc game": Gaming,
"help": Learning,
"PS4": Gaming,
"crypto news": Blockchain,
"humor": Funny,
"let": Gaming,
"fallout 4": Gaming,
"Shooter Game (Media Genre)": Gaming,
"funny moments": Funny,
"Comedy": Funny,
"Playthrough": Gaming,
"gamer": Gaming,
"wii": Gaming,
"playing": Gaming,
"PC": Technology,
"computer game games": Gaming,
"Gameplay": Gaming,
"arcade": Gaming,
"token": Blockchain,
"federal reserve": Economics,
"Video Game Culture": Gaming,
"driving": Automotive,
"plants": Nature,
"trees": Nature,
"eggs": Nature,
"Xbox 360 (Video Game Platform)": Gaming,
"RPG": Gaming,
"design": Art,
"market": Economics,
"cars": Automotive,
"fruits": Food,
"flowers": Nature,
"ram": Technology,
"lessons": Learning,
"token free": Blockchain,
"vegán": Food,
"Game": Gaming,
"investing": Economics,
"samsung": Technology,
"racing": Sports,
"online learning": Learning,
"dollar": Economics,
"software": Technology,
"beach": Nature,
"gta": Gaming,
"windows": Technology,
"lets play": Gaming,
"Minecraft": Gaming,
"race": Automotive,
"skyrim": Gaming,
"rainbow": Nature,
"health": Fitness,
"Action-adventure Game (Media Genre)": Gaming,
"programming": Technology,
"sony interactive entertainment": Gaming,
"dlc": Gaming,
"diy": Learning,
"bitcoin price": Blockchain,
"monetary reform": Economics,
"xbox360": Gaming,
"zelda": Gaming,
"Steam": Gaming,
"capcom": Gaming,
"economic": Economics,
"simulation": Technology,
"recession": Economics,
"fortnite battle royale": Gaming,
"altcoins": Blockchain,
"facebook": Technology,
"cryptocurrency news": Blockchain,
"singleplayer": Gaming,
"altcoin": Blockchain,
"pacman": Gaming,
"fashion": Art,
"gta 5": Gaming,
"Grand Theft Auto V": Gaming,
"valve": Gaming,
"Massively Multiplayer Online Role-playing Game (Video Game Genre)": Gaming,
"#gaming": Gaming,
"Bmw": Automotive,
"halo": Gaming,
"Hillary Clinton": News,
"trading": Economics,
"computer games": Gaming,
"vehicle": Automotive,
"desktop": Technology,
"coin": Blockchain,
"water": Nature,
"nintendo switch": Gaming,
"progressive talk": News,
"3d games": Gaming,
"animals": Nature,
"install": Technology,
"MOBA": Gaming,
"Ps2": Gaming,
"Role-playing Video Game (Media Genre)": Gaming,
"trump": News,
"ripple": Blockchain,
"parody": Funny,
"supercell": Gaming,
"dota2": Gaming,
"microsoft": Technology,
"sims": Gaming,
"barack obama": News,
"funny video": Funny,
"finance": Economics,
"floral": Nature,
"creative hairstyles": Art,
"food holidays": Food,
"colorful hair": Art,
"currency": Economics,
"free bitcoin": Blockchain,
"how-to": Learning,
"pc gaming": Gaming,
"Playstation 4": Gaming,
"twitter": Technology,
"battle royale": Gaming,
"rpg games": Gaming,
"sims 4": Gaming,
"Android": Technology,
"Benz": Automotive,
"silly": Funny,
"roblox": Gaming,
"Mw3": Gaming,
"humour": Funny,
"far cry 5": Gaming,
"Mobile": Technology,
"squad gameplay": Gaming,
"tf2": Gaming,
"Auto Show (Event)": Automotive,
"business": Economics,
"apple": Technology,
"Ps3": Gaming,
"Resident Evil": Gaming,
"iOS": Technology,
"Mercedes": Automotive,
"engine": Automotive,
"indie game": Gaming,
"overwatch": Gaming,
"brawl": Gaming,
"ltc": Blockchain,
"Call of Duty®: Black Ops III": Gaming,
"Donald Trump": News,
"dash": Blockchain,
"newscast": News,
"server": Technology,
"gardening": Nature,
"console": Gaming,
"mugen": Gaming,
"Play": Gaming,
"Nvidia": Technology,
"cool long hair": Art,
"howto": Learning,
"Mass effect": Gaming,
"mercedes": Automotive,
"ubisoft": Gaming,
"open source": Technology,
"Minecraft: PlayStation®4 Edition": Gaming,
"rts": Gaming,
"mmorpg": Gaming,
"first person shooter": Gaming,
"eos": Blockchain,
"motorcycle": Automotive,
"Action Role-playing Game (Video Game Genre)": Gaming,
"steemit": Blockchain,
"porsche": Automotive,
"sport": Sports,
"training": Sports,
"Apple": Technology,
"coinbase": Blockchain,
"Role-playing Game (Game Genre)": Gaming,
"sonic": Gaming,
"advice": Learning,
"videogames": Gaming,
"Simulator": Gaming,
"level": Gaming,
"apps": Technology,
"sims 3": Gaming,
"Satire": Funny,
"esports": Gaming,
"Minecraft (Video Game)": Gaming,
"simulator": Gaming,
"horrible gamers": Gaming,
"Bus": Automotive,
"moba": Gaming,
"football": Sports,
"cryptocurrencies": Blockchain,
"the game": Gaming,
"laptop": Technology,
"link": Gaming,
"Game Reviews": Gaming,
"sims 5": Gaming,
@ -813,6 +866,215 @@ var mapAndKeep = map[string]string{
"squad game": Gaming,
"switch": Gaming,
"Lets Play": Gaming,
"portal": Gaming,
"boss": Gaming,
"mod": Gaming,
"strategy": Gaming,
"stream": Gaming,
"Stream": Gaming,
"galaxy": Gaming,
"tutorial": Learning,
"how to": Learning,
"Education": Learning,
"Educational": Learning,
"how": Learning,
"SALMAN KHAN": Learning,
"education": Learning,
"help": Learning,
"lessons": Learning,
"online learning": Learning,
"diy": Learning,
"school": Learning,
"how-to": Learning,
"howto": Learning,
"advice": Learning,
"history": Learning,
"inspirational": Learning,
"drum and bass": Music,
"bass": Music,
"dubstep": Music,
"song": Music,
"rap": Music,
"remix": Music,
"drum": Music,
"house": Music,
"drum bass": Music,
"darkstep": Music,
"guitar": Music,
"drumstep": Music,
"techstep": Music,
"metal": Music,
"dj": Music,
"rock": Music,
"New Music": Music,
"hip hop": Music,
"cover": Music,
"instrumental": Music,
"electronic": Music,
"alternative": Music,
"space": Nature,
"plants": Nature,
"trees": Nature,
"eggs": Nature,
"flowers": Nature,
"beach": Nature,
"rainbow": Nature,
"water": Nature,
"animals": Nature,
"floral": Nature,
"gardening": Nature,
"garden": Nature,
"survival": Nature,
"world": Nature,
"dog": Nature,
"travel": Nature,
"rv": Nature,
"Survival": Nature,
"outdoor": Nature,
"full time rving": Nature,
"rv park": Nature,
"travel trailer": Nature,
"Environment": Nature,
"News": News,
"politics": News,
"democrat": News,
"liberal": News,
"progressive": News,
"government": News,
"republican": News,
"conservative": News,
"commentary": News,
"political": News,
"CNN": News,
"cbs": News,
"MSNBC": News,
"Fox news": News,
"fox": News,
"nbc": News,
"POLITICS": News,
"News & Politics": News,
"senate": News,
"congress": News,
"house of representatives": News,
"video news": News,
"animated news": News,
"donald trump": News,
"COMO": News,
"TRUMP": News,
"PUTIN": News,
"news radio": News,
"Hillary Clinton": News,
"progressive talk": News,
"trump": News,
"barack obama": News,
"Donald Trump": News,
"newscast": News,
"racism": News,
"jeep": Automotive,
"war": News,
"horror": PopCulture,
"zombies": PopCulture,
"Next Media Animation": PopCulture,
"adventure": PopCulture,
"epic": PopCulture,
"anime": PopCulture,
"trailer": PopCulture,
"reviews": PopCulture,
"movie": PopCulture,
"indie": PopCulture,
"pro": PopCulture,
"animation": PopCulture,
"zombie": PopCulture,
"star": PopCulture,
"film": PopCulture,
"magic": PopCulture,
"ninja": PopCulture,
"top 10": PopCulture,
"wwe": PopCulture,
"loot": PopCulture,
"marvel": PopCulture,
"manga": PopCulture,
"puzzle": PopCulture,
"hero": PopCulture,
"retro": PopCulture,
"disney": PopCulture,
"dc": PopCulture,
"next animation studio": PopCulture,
"Next Animation Studio": PopCulture,
"cosplay": PopCulture,
"dragoncon": PopCulture,
"comiccon": PopCulture,
"stories": PopCulture,
"unboxing": PopCulture,
"fail": PopCulture,
"dragon": PopCulture,
"Reaction": PopCulture,
"meme": PopCulture,
"family friendly": PopCulture,
"random": PopCulture,
"vlogging": PopCulture,
"React": PopCulture,
"Trailer": PopCulture,
"REACTION": PopCulture,
"toys": PopCulture,
"reacts": PopCulture,
"cute": PopCulture,
"weed": PopCulture,
"drunkfx": PopCulture,
"happy": PopCulture,
"Anime": PopCulture,
"family": PopCulture,
"memes": PopCulture,
"wtf": PopCulture,
"Sport": Sports,
"racing": Sports,
"sport": Sports,
"training": Sports,
"football": Sports,
"pc": Technology,
"android": Technology,
"computer": Technology,
"online": Technology,
"mods": Technology,
"tech": Technology,
"ios": Technology,
"linux": Technology,
"sony": Technology,
"iphone": Technology,
"PC": Technology,
"ram": Technology,
"samsung": Technology,
"software": Technology,
"windows": Technology,
"programming": Technology,
"simulation": Technology,
"facebook": Technology,
"desktop": Technology,
"install": Technology,
"microsoft": Technology,
"twitter": Technology,
"Android": Technology,
"Mobile": Technology,
"apple": Technology,
"iOS": Technology,
"server": Technology,
"Nvidia": Technology,
"open source": Technology,
"Apple": Technology,
"apps": Technology,
"laptop": Technology,
"podcast": Technology,
"hack": Technology,
"guns": Weapons,
"shooting": Weapons,
"trophy": Weapons,
"combat": Weapons,
"fire": Weapons,
"gun": Weapons,
"tactical": Weapons,
"firearms": Weapons,
"rocket": Weapons,
"sniper": Weapons,
"knife": Weapons,
"trap": Weapons,
"assault": Weapons,
}