lbryio / lbry-sdk

The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
https://lbry.com
MIT License
7.19k stars 482 forks source link

Publishing fails with: Enum Country has no value defined for name br #3324

Open ole-tange opened 3 years ago

ole-tange commented 3 years ago

I have problem publishing videos:

Enum Country has no value defined for name br

Given the error I believe it is related to "languages": "pt-br".

Maybe you have not included "pt-br" as a valid language?

{
  "name": "reflections-from-a-lifetime-fighting-to-end-child-poverty",
  "tags": [
    "activism",
    "race",
    "social change",
    "leadership",
    "law",
    "justice system",
    "history",
    "United States",
    "community",
    "poverty",
    "kids",
    "equality"
  ],
  "languages": [
    "ar",
    "en",
    "es",
    "fa",
    "fr",
    "hu",
    "it",
    "ja",
    "ko",
    "pt",
    "pt-br",
    "ro",
    "ru",
    "tr",
    "zh-cn",
    "zh-tw"
  ],
  "author": "Marian Wright Edelman",
  "title": "Reflections from a lifetime fighting to end child poverty",
  "thumbnail_url": "https://pi.tedcdn.com/r/talkstar-photos.s3.amazonaws.com/uploads/93026e44-7062-498c-9c37-4f76436496aa/MarianWrightEdelman_2018W-embed.jpg?quality=89&w=600",
  "file_path": "/home/tange/Reflections from a lifetime fighting to end child poverty-31812.mp4",
  "bid": "",
  "description": "What does it take to build a national movement? In a captivating conversation with TEDWomen curator Pat Mitchell, Marian Wright Edelman reflects on her path to founding the Children's Defense Fund in 1973 -- from the early influence of growing up in the segregated American South to her activism with Dr. Martin Luther King Jr. -- and shares how growing older has only made her more radical.",
  "optimize_file": true,
  "blocking": true
}
ole-tange commented 3 years ago

I get it for 'ca', too. Possibly caused by 'fr-ca':

{
  "name": "the-agony-of-trying-to-unsubscribe",
  "tags": [
    "communication",
    "comedy",
    "technology",
    "humor",
    "business"
  ],
  "languages": [
    "ar",
    "bg",
    "cs",
    "da",
    "de",
    "el",
    "en",
    "es",
    "fa",
    "fi",
    "fr",
    "fr-ca",
    "he",
    "hr",
    "hu",
    "id",
    "it",
    "ja",
    "ko",
    "lt",
    "lv",
    "mn",
    "my",
    "nl",
    "pl",
    "pt",
    "pt-br",
    "ro",
    "ru",
    "sk",
    "sl",
    "sr",
    "sv",
    "th",
    "tr",
    "uk",
    "vi",
    "zh",
    "zh-cn",
    "zh-tw"
  ],
  "author": "James Veitch",
  "title": "The agony of trying to unsubscribe",
  "thumbnail_url": "https://pi.tedcdn.com/r/talkstar-photos.s3.amazonaws.com/uploads/1a025cb9-99b4-41c0-8777-f17e66313276/JamesVeitch_2016T-embed.jpg?quality=89&w=600",
  "file_path": "/home/tange/tmp/lbry-sync-ytdl/The agony of trying to unsubscribe-2577.mp4",
  "bid": "",
  "description": "It happens to all of us: you unsubscribe from an unwanted marketing email, and a few days later another message from the same company pops up in your inbox. Comedian James Veitch turned this frustration into whimsy when a local supermarket refused to take no for an answer. Hijinks ensued.",
  "optimize_file": true,
  "blocking": true
}
tzarebczan commented 3 years ago

We're currently using iso 639-1 and 15924 which make up RFC 5646. These don't have a distinction for Brazilian Portuguese. https://github.com/lbryio/types/blob/f0b4476ef386b096e99e64c6cf8a7ed20ca92d5f/v2/proto/claim.proto

For Chinese (noticed you tried above), they are zh-Hant and zh-Hans respectively.

ole-tange commented 3 years ago

The json is from YouTube videos. Could you consider making an alias - thus be compatible with YouTube?