Support 0.36 SDK structure: new file/video metadata/mature (NSFW) #485

Closed
opened 2019-03-12 19:43:49 +01:00 by tzarebczan · 1 comment
tzarebczan commented 2019-03-12 19:43:49 +01:00 (Migrated from github.com)

The Issue

Support for new file/video metadata:
a6f2fd6d5f/v2/proto/claim.proto (L29)

includes:
structural changes
file hash/name/size
video height/width/duration
release time (need to discuss how this will affect default sorting + sorting options)
NSFW/Mature field is changing to a tag

Channel metadata: https://github.com/lbryio/lbry-android/issues/484

Claim metadata:


        Create or update a stream claim at a given name (use 'stream create/update' for more control).

        Usage:
            publish (<name> | --name=<name>) [--bid=<bid>] [--file_path=<file_path>]
                    [--tags=<tags>...] [--clear_tags]
                    [--languages=<languages>...] [--clear_languages]
                    [--locations=<locations>...] [--clear_locations]
                    [--fee_currency=<fee_currency>] [--fee_amount=<fee_amount>] [--fee_address=<fee_address>]
                    [--title=<title>] [--description=<description>] [--author=<author>] [--language=<language>]
                    [--license=<license>] [--license_url=<license_url>] [--thumbnail_url=<thumbnail_url>]
                    [--release_time=<release_time>] [--width=<width>] [--height=<height>] [--duration=<duration>]
                    [--channel_id=<channel_id>] [--channel_name=<channel_name>]
                    [--channel_account_id=<channel_account_id>...]
                    [--account_id=<account_id>] [--claim_address=<claim_address>] [--preview]

        Options:
            --name=<name>                  : (str) name of the content (can only consist of a-z A-Z 0-9 and -(dash))
            --bid=<bid>                    : (decimal) amount to back the claim
            --file_path=<file_path>        : (str) path to file to be associated with name.
            --fee_currency=<fee_currency>  : (string) specify fee currency
            --fee_amount=<fee_amount>      : (decimal) content download fee
            --fee_address=<fee_address>    : (str) address where to send fee payments, will use
                                                   value from --claim_address if not provided
            --title=<title>                : (str) title of the publication
            --description=<description>    : (str) description of the publication
            --author=<author>              : (str) author of the publication. The usage for this field is not
                                             the same as for channels. The author field is used to credit an author
                                             who is not the publisher and is not represented by the channel. For
                                             example, a pdf file of 'The Odyssey' has an author of 'Homer' but may
                                             by published to a channel such as '@classics', or to no channel at all
            --clear_tags                   : (bool) clear existing tags (prior to adding new ones)
            --tags=<tags>                  : (list) add content tags
            --clear_languages              : (bool) clear existing languages (prior to adding new ones)
            --languages=<languages>        : (list) languages used by the channel,
                                                    using RFC 5646 format, eg:
                                                    for English `--languages=en`
                                                    for Spanish (Spain) `--languages=es-ES`
                                                    for Spanish (Mexican) `--languages=es-MX`
                                                    for Chinese (Simplified) `--languages=zh-Hans`
                                                    for Chinese (Traditional) `--languages=zh-Hant`
            --clear_locations              : (bool) clear existing locations (prior to adding new ones)
            --locations=<locations>        : (list) locations relevant to the stream, consisting of 2 letter
                                                    `country` code and a `state`, `city` and a postal
                                                    `code` along with a `latitude` and `longitude`.
                                                    for JSON RPC: pass a dictionary with aforementioned
                                                        attributes as keys, eg:
                                                        ...
                                                        "locations": [{'country': 'US', 'state': 'NH'}]
                                                        ...
                                                    for command line: pass a colon delimited list
                                                        with values in the following order:

                                                          "COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE"

                                                        making sure to include colon for blank values, for
                                                        example to provide only the city:

                                                          ... --locations="::Manchester"

                                                        with all values set:

                                                 ... --locations="US:NH:Manchester:03101:42.990605:-71.460989"

                                                        optionally, you can just pass the "LATITUDE:LONGITUDE":

                                                          ... --locations="42.990605:-71.460989"

                                                        finally, you can also pass JSON string of dictionary
                                                        on the command line as you would via JSON RPC

                                                          ... --locations="{'country': 'US', 'state': 'NH'}"

            --license=<license>            : (str) publication license
            --license_url=<license_url>    : (str) publication license url
            --thumbnail_url=<thumbnail_url>: (str) thumbnail url
            --release_time=<release_time>  : (int) original public release of content, seconds since UNIX epoch
            --width=<width>                : (int) image/video width, automatically calculated from media file
            --height=<height>              : (int) image/video height, automatically calculated from media file
            --duration=<duration>          : (int) audio/video duration in seconds, automatically calculated
            --channel_id=<channel_id>      : (str) claim id of the publisher channel
            --channel_name=<channel_name>  : (str) name of publisher channel
          --channel_account_id=<channel_id>: (str) one or more account ids for accounts to look in
                                                   for channel certificates, defaults to all accounts.
            --account_id=<account_id>      : (str) account to use for funding the transaction
            --claim_address=<claim_address>: (str) address where the claim is sent to, if not specified
                                                   it will be determined automatically from the account
            --preview                      : (bool) do not broadcast the transaction

        Returns: {Transaction}

Claim sample:

  {
    "address": "bLzLCM4fPya9kUbXrme1Gjf6aMM9rpon38",
    "amount": "0.0001",
    "claim_id": "3ecd483fa98f93024de36648fa2786f6b2d244f6",
    "claim_op": "create",
    "confirmations": 2,
    "height": 556667,
    "is_change": false,
    "is_channel_signature_valid": true,
    "is_mine": true,
    "name": "NewMetadataPub01",
    "nout": 0,
    "permanent_url": "lbry://NewMetadataPub01#3ecd483fa98f93024de36648fa2786f6b2d244f6",
    "signing_channel": {
      "claim_id": "04c91cf3dd1dfcb4414efc3eca24dc449fc28d4b",
      "name": "@NewMetadataChannel",
      "value": {
        "cover": {
          "url": "https://spee.ch/5/tom-banner.jpg"
        },
        "description": "My Channel Description",
        "email": "tom@lbry.com",
        "featured": [
          "cda25338628bada976a78e7d04367ca075bde397"
        ],
        "languages": [
          "en",
          "es"
        ],
        "locations": [
          {
            "latitude": 429906050,
            "longitude": -714609890
          },
          {
            "city": "Manchester"
          }
        ],
        "public_key": "3056301006072a8648ce3d020106052b8104000a034200042030108c1670b7c204c8a30643e8779699978d8aa6556de154fb231bfc72c369a48c4c97f71de9a3dc5afa7ad020231c3051e933b5598816434d8680de21d6b1",
        "tags": [
          "tag1 chan",
          "tag2 chan"
        ],
        "thumbnail": {
          "url": "https://spee.ch/4/tom-z.jpg"
        },
        "title": "My Channel Title",
        "website_url": "lbry.com"
      }
    },
    "txid": "369264300c06247cb1d101e03ba778b9ec6a05a85094073e20c89df2915f5ec4",
    "type": "claim",
    "value": {
      "author": "Author Test",
      "description": "My Claim Description",
      "fee": {
        "address": "bLzLCM4fPya9kUbXrme1Gjf6aMM9rpon38",
        "amount": 1.0,
        "currency": "LBC"
      },
      "languages": [
        "en",
        "es"
      ],
      "license": "All Rights Reserved Test",
      "license_url": "https://www.tom.com",
      "locations": [
        {
          "latitude": 429906050,
          "longitude": -714609890
        },
        {
          "city": "Manchester"
        }
      ],
      "release_time": "1555951910",
      "source": {
        "hash": "8480f4a320b4cff22e060fc3691a215bbf11d1e9af580b36861ea425d525b8b3",
        "media_type": "video/mp4",
        "name": "TQUS44N6e6moJzrHJc8lQ6OC_3.mp4",
        "sd_hash": "14503ca14b52eed15be1c7fd0dc14afa1e30a146b47b55de50e87c6aaa261ce88e6b07a986a212386face73c8cbf7083",
        "size": "13474499"
      },
      "stream_type": "video",
      "tags": [
        "tag1",
        "tag2"
      ],
      "thumbnail": {
        "url": "https://spee.ch/4/tom-z.jpg"
      },
      "title": "Test Title",
      "video": {
        "duration": 10,
        "height": 360,
        "width": 480
      }
    },
    "value_type": "stream"
  },

System Configuration

  • Device:
  • Android version:

Anything Else

Screenshots

Internal Use

Acceptance Criteria

Definition of Done

  • Tested against acceptance criteria
  • Tested against the assumptions of the user story
  • The project builds without errors
  • Unit tests are written and passing
  • Tests on devices/browsers listed in the issue have passed
  • QA performed & issues resolved
  • Refactoring completed
  • Any configuration or build changes documented
  • Documentation updated
  • Peer Code Review performed
<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. We are also available on live chat at https://chat.lbry.io --> ## The Issue Support for new file/video metadata: https://github.com/lbryio/types/blob/a6f2fd6d5f382f0012383b9076d650c1f6791ada/v2/proto/claim.proto#L29 includes: structural changes file hash/name/size video height/width/duration release time (need to discuss how this will affect default sorting + sorting options) NSFW/Mature field is changing to a tag Channel metadata: https://github.com/lbryio/lbry-android/issues/484 Claim metadata: ``` Create or update a stream claim at a given name (use 'stream create/update' for more control). Usage: publish (<name> | --name=<name>) [--bid=<bid>] [--file_path=<file_path>] [--tags=<tags>...] [--clear_tags] [--languages=<languages>...] [--clear_languages] [--locations=<locations>...] [--clear_locations] [--fee_currency=<fee_currency>] [--fee_amount=<fee_amount>] [--fee_address=<fee_address>] [--title=<title>] [--description=<description>] [--author=<author>] [--language=<language>] [--license=<license>] [--license_url=<license_url>] [--thumbnail_url=<thumbnail_url>] [--release_time=<release_time>] [--width=<width>] [--height=<height>] [--duration=<duration>] [--channel_id=<channel_id>] [--channel_name=<channel_name>] [--channel_account_id=<channel_account_id>...] [--account_id=<account_id>] [--claim_address=<claim_address>] [--preview] Options: --name=<name> : (str) name of the content (can only consist of a-z A-Z 0-9 and -(dash)) --bid=<bid> : (decimal) amount to back the claim --file_path=<file_path> : (str) path to file to be associated with name. --fee_currency=<fee_currency> : (string) specify fee currency --fee_amount=<fee_amount> : (decimal) content download fee --fee_address=<fee_address> : (str) address where to send fee payments, will use value from --claim_address if not provided --title=<title> : (str) title of the publication --description=<description> : (str) description of the publication --author=<author> : (str) author of the publication. The usage for this field is not the same as for channels. The author field is used to credit an author who is not the publisher and is not represented by the channel. For example, a pdf file of 'The Odyssey' has an author of 'Homer' but may by published to a channel such as '@classics', or to no channel at all --clear_tags : (bool) clear existing tags (prior to adding new ones) --tags=<tags> : (list) add content tags --clear_languages : (bool) clear existing languages (prior to adding new ones) --languages=<languages> : (list) languages used by the channel, using RFC 5646 format, eg: for English `--languages=en` for Spanish (Spain) `--languages=es-ES` for Spanish (Mexican) `--languages=es-MX` for Chinese (Simplified) `--languages=zh-Hans` for Chinese (Traditional) `--languages=zh-Hant` --clear_locations : (bool) clear existing locations (prior to adding new ones) --locations=<locations> : (list) locations relevant to the stream, consisting of 2 letter `country` code and a `state`, `city` and a postal `code` along with a `latitude` and `longitude`. for JSON RPC: pass a dictionary with aforementioned attributes as keys, eg: ... "locations": [{'country': 'US', 'state': 'NH'}] ... for command line: pass a colon delimited list with values in the following order: "COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE" making sure to include colon for blank values, for example to provide only the city: ... --locations="::Manchester" with all values set: ... --locations="US:NH:Manchester:03101:42.990605:-71.460989" optionally, you can just pass the "LATITUDE:LONGITUDE": ... --locations="42.990605:-71.460989" finally, you can also pass JSON string of dictionary on the command line as you would via JSON RPC ... --locations="{'country': 'US', 'state': 'NH'}" --license=<license> : (str) publication license --license_url=<license_url> : (str) publication license url --thumbnail_url=<thumbnail_url>: (str) thumbnail url --release_time=<release_time> : (int) original public release of content, seconds since UNIX epoch --width=<width> : (int) image/video width, automatically calculated from media file --height=<height> : (int) image/video height, automatically calculated from media file --duration=<duration> : (int) audio/video duration in seconds, automatically calculated --channel_id=<channel_id> : (str) claim id of the publisher channel --channel_name=<channel_name> : (str) name of publisher channel --channel_account_id=<channel_id>: (str) one or more account ids for accounts to look in for channel certificates, defaults to all accounts. --account_id=<account_id> : (str) account to use for funding the transaction --claim_address=<claim_address>: (str) address where the claim is sent to, if not specified it will be determined automatically from the account --preview : (bool) do not broadcast the transaction Returns: {Transaction} ``` Claim sample: ``` { "address": "bLzLCM4fPya9kUbXrme1Gjf6aMM9rpon38", "amount": "0.0001", "claim_id": "3ecd483fa98f93024de36648fa2786f6b2d244f6", "claim_op": "create", "confirmations": 2, "height": 556667, "is_change": false, "is_channel_signature_valid": true, "is_mine": true, "name": "NewMetadataPub01", "nout": 0, "permanent_url": "lbry://NewMetadataPub01#3ecd483fa98f93024de36648fa2786f6b2d244f6", "signing_channel": { "claim_id": "04c91cf3dd1dfcb4414efc3eca24dc449fc28d4b", "name": "@NewMetadataChannel", "value": { "cover": { "url": "https://spee.ch/5/tom-banner.jpg" }, "description": "My Channel Description", "email": "tom@lbry.com", "featured": [ "cda25338628bada976a78e7d04367ca075bde397" ], "languages": [ "en", "es" ], "locations": [ { "latitude": 429906050, "longitude": -714609890 }, { "city": "Manchester" } ], "public_key": "3056301006072a8648ce3d020106052b8104000a034200042030108c1670b7c204c8a30643e8779699978d8aa6556de154fb231bfc72c369a48c4c97f71de9a3dc5afa7ad020231c3051e933b5598816434d8680de21d6b1", "tags": [ "tag1 chan", "tag2 chan" ], "thumbnail": { "url": "https://spee.ch/4/tom-z.jpg" }, "title": "My Channel Title", "website_url": "lbry.com" } }, "txid": "369264300c06247cb1d101e03ba778b9ec6a05a85094073e20c89df2915f5ec4", "type": "claim", "value": { "author": "Author Test", "description": "My Claim Description", "fee": { "address": "bLzLCM4fPya9kUbXrme1Gjf6aMM9rpon38", "amount": 1.0, "currency": "LBC" }, "languages": [ "en", "es" ], "license": "All Rights Reserved Test", "license_url": "https://www.tom.com", "locations": [ { "latitude": 429906050, "longitude": -714609890 }, { "city": "Manchester" } ], "release_time": "1555951910", "source": { "hash": "8480f4a320b4cff22e060fc3691a215bbf11d1e9af580b36861ea425d525b8b3", "media_type": "video/mp4", "name": "TQUS44N6e6moJzrHJc8lQ6OC_3.mp4", "sd_hash": "14503ca14b52eed15be1c7fd0dc14afa1e30a146b47b55de50e87c6aaa261ce88e6b07a986a212386face73c8cbf7083", "size": "13474499" }, "stream_type": "video", "tags": [ "tag1", "tag2" ], "thumbnail": { "url": "https://spee.ch/4/tom-z.jpg" }, "title": "Test Title", "video": { "duration": 10, "height": 360, "width": 480 } }, "value_type": "stream" }, ``` ## System Configuration - Device: - Android version: ## Anything Else <!-- Include anything else that does not fit into the above sections --> ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here --> ## Internal Use ### Acceptance Criteria 1. 2. 3. ### Definition of Done - [ ] Tested against acceptance criteria - [ ] Tested against the assumptions of the user story - [ ] The project builds without errors - [ ] Unit tests are written and passing - [ ] Tests on devices/browsers listed in the issue have passed - [ ] QA performed & issues resolved - [ ] Refactoring completed - [ ] Any configuration or build changes documented - [ ] Documentation updated - [ ] Peer Code Review performed
kauffj commented 2019-03-25 18:58:22 +01:00 (Migrated from github.com)

Changing the UI around hidden objectionable content should change at the same time as this. We should not show tiles representing objectionable content at all.

Changing the UI around hidden objectionable content should change at the same time as this. We should not show tiles representing objectionable content at all.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#485
No description provided.