From ca4442f767b4c95b406460742e13814957bee70c Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman <kauffj@gmail.com> Date: Fri, 26 May 2017 11:56:32 -0400 Subject: [PATCH 1/7] featured download reward --- ui/js/actions/content.js | 2 +- ui/js/rewards.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index 0e7366dca..aab6cdbf4 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -122,7 +122,7 @@ export function doUpdateLoadStatus(uri, outpoint) { } else if (fileInfo.completed) { // TODO this isn't going to get called if they reload the client before // the download finished - rewards.claimNextPurchaseReward() + rewards.claimEligiblePurchaseRewards() dispatch({ type: types.DOWNLOADING_COMPLETED, data: { diff --git a/ui/js/rewards.js b/ui/js/rewards.js index a77ccde01..a3ac1e958 100644 --- a/ui/js/rewards.js +++ b/ui/js/rewards.js @@ -76,6 +76,7 @@ rewards.TYPE_FIRST_CHANNEL = "new_channel", rewards.TYPE_FIRST_STREAM = "first_stream", rewards.TYPE_MANY_DOWNLOADS = "many_downloads", rewards.TYPE_FIRST_PUBLISH = "first_publish"; +rewards.TYPE_FEATURED_DOWNLOAD = "featured_download"; rewards.claimReward = function (type) { @@ -155,9 +156,10 @@ rewards.claimReward = function (type) { }); } -rewards.claimNextPurchaseReward = function() { +rewards.claimEligiblePurchaseRewards = function() { let types = {} types[rewards.TYPE_FIRST_STREAM] = false + types[rewards.TYPE_FEATURED_DOWNLOAD] = false types[rewards.TYPE_MANY_DOWNLOADS] = false lbryio.call('reward', 'list', {}).then((userRewards) => { userRewards.forEach((reward) => { @@ -166,11 +168,14 @@ rewards.claimNextPurchaseReward = function() { } }) let unclaimedType = Object.keys(types).find((type) => { - return types[type] === false; + return types[type] === false && type !== rewards.TYPE_FEATURED_DOWNLOAD; //handled below }) if (unclaimedType) { rewards.claimReward(unclaimedType); } + if (types[rewards.TYPE_FEATURED_DOWNLOAD] === false) { + rewards.claimReward(rewards.TYPE_FEATURED_DOWNLOAD) + } }, () => { }); } From 526881c2610db476827fab1816a6cb31fb41897d Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman <kauffj@gmail.com> Date: Fri, 26 May 2017 11:58:56 -0400 Subject: [PATCH 2/7] move up time of rewad claim for downloads --- ui/js/actions/content.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index aab6cdbf4..9322e8220 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -122,7 +122,6 @@ export function doUpdateLoadStatus(uri, outpoint) { } else if (fileInfo.completed) { // TODO this isn't going to get called if they reload the client before // the download finished - rewards.claimEligiblePurchaseRewards() dispatch({ type: types.DOWNLOADING_COMPLETED, data: { @@ -174,6 +173,9 @@ export function doDownloadFile(uri, streamInfo) { outpoint: streamInfo.outpoint, claimId: streamInfo.claim_id, }).catch(() => {}) + + rewards.claimEligiblePurchaseRewards() + dispatch(doUpdateLoadStatus(uri, streamInfo.outpoint)) } } From 82bdf6324dada1f71b60728f21ea3bf6b1ac2416 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Fri, 26 May 2017 22:17:01 +0400 Subject: [PATCH 3/7] Lookup cost info on file page if it hasn't already been looked up --- ui/js/page/filePage/index.js | 6 +++++- ui/js/page/filePage/view.jsx | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/js/page/filePage/index.js b/ui/js/page/filePage/index.js index f61a3e803..4dae3db60 100644 --- a/ui/js/page/filePage/index.js +++ b/ui/js/page/filePage/index.js @@ -11,6 +11,9 @@ import { import { makeSelectFileInfoForUri, } from 'selectors/file_info' +import { + doFetchCostInfoForUri, +} from 'actions/cost_info' import { makeSelectClaimForUri, makeSelectContentTypeForUri, @@ -41,7 +44,8 @@ const makeSelect = () => { const perform = (dispatch) => ({ navigate: (path, params) => dispatch(doNavigate(path, params)), - fetchFileInfo: (uri) => dispatch(doFetchFileInfo(uri)) + fetchFileInfo: (uri) => dispatch(doFetchFileInfo(uri)), + fetchCostInfo: (uri) => dispatch(doFetchCostInfoForUri(uri)), }) export default connect(makeSelect, perform)(FilePage) diff --git a/ui/js/page/filePage/view.jsx b/ui/js/page/filePage/view.jsx index 2373588b7..e7a1e2068 100644 --- a/ui/js/page/filePage/view.jsx +++ b/ui/js/page/filePage/view.jsx @@ -46,6 +46,7 @@ class FilePage extends React.Component{ componentDidMount() { this.fetchFileInfo(this.props) + this.fetchCostInfo(this.props) } componentWillReceiveProps(nextProps) { @@ -58,6 +59,12 @@ class FilePage extends React.Component{ } } + fetchCostInfo(props) { + if (props.costInfo === undefined) { + props.fetchCostInfo(props.uri) + } + } + render() { const { claim, From 66bbf30482c418a31b86ab5328b55c428b1057dd Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman <kauffj@gmail.com> Date: Fri, 26 May 2017 14:19:41 -0400 Subject: [PATCH 4/7] fix claim id parameter --- ui/js/actions/content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index 9322e8220..023a3c65a 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -171,11 +171,11 @@ export function doDownloadFile(uri, streamInfo) { lbryio.call('file', 'view', { uri: uri, outpoint: streamInfo.outpoint, - claimId: streamInfo.claim_id, + claim_id: streamInfo.claim_id, }).catch(() => {}) rewards.claimEligiblePurchaseRewards() - + dispatch(doUpdateLoadStatus(uri, streamInfo.outpoint)) } } From 2c42097eeb57f3616bcfdffd28dda8b034285d46 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman <kauffj@gmail.com> Date: Fri, 26 May 2017 14:21:55 -0400 Subject: [PATCH 5/7] add changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e640b44c9..6a774a33f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Web UI version numbers should always match the corresponding version of LBRY App ## [Unreleased] ### Added - * + * New reward for watching weekly featured content * ### Changed @@ -16,8 +16,8 @@ Web UI version numbers should always match the corresponding version of LBRY App * ### Fixed - * - * + * Video playback will always properly fetch cost info (this was a big playback bug) + * Fixed view rewards ### Deprecated * From 8ba2e96b241e52559bb1769010dbf9ad6b38f184 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman <kauffj@gmail.com> Date: Fri, 26 May 2017 14:22:15 -0400 Subject: [PATCH 6/7] =?UTF-8?q?Bump=20version:=200.11.3=20=E2=86=92=200.11?= =?UTF-8?q?.4rc1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- app/package.json | 2 +- ui/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b541729bc..effbc79af 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.11.3 +current_version = 0.11.4rc1 commit = True tag = True parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<candidate>\d+))? diff --git a/app/package.json b/app/package.json index d00c85f0a..4c8273016 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.11.3", + "version": "0.11.4rc1", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/ui/package.json b/ui/package.json index bf2d03720..db5efe54c 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.11.3", + "version": "0.11.4rc1", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", From d878d3b693945b0d50088b4ce81d66ed35be8b33 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman <kauffj@gmail.com> Date: Fri, 26 May 2017 14:26:53 -0400 Subject: [PATCH 7/7] =?UTF-8?q?Bump=20version:=200.11.4rc1=20=E2=86=92=200?= =?UTF-8?q?.11.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGELOG.md | 18 +++++++++++++++--- app/package.json | 2 +- ui/package.json | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index effbc79af..8403ec135 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.11.4rc1 +current_version = 0.11.4 commit = True tag = True parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<candidate>\d+))? diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a774a33f..1a7f237d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Web UI version numbers should always match the corresponding version of LBRY App ## [Unreleased] ### Added - * New reward for watching weekly featured content + * * ### Changed @@ -16,8 +16,8 @@ Web UI version numbers should always match the corresponding version of LBRY App * ### Fixed - * Video playback will always properly fetch cost info (this was a big playback bug) - * Fixed view rewards + * + * ### Deprecated * @@ -27,6 +27,18 @@ Web UI version numbers should always match the corresponding version of LBRY App * * +## [0.11.4] - 2017-05-26 + +### Added + * New reward for watching weekly featured content + + +### Fixed + * Video playback will always properly fetch cost info (this was a big playback bug) + * Fixed view rewards + + + ## [0.11.3] - 2017-05-26 ### Fixed diff --git a/app/package.json b/app/package.json index 4c8273016..a3c2e86fd 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.11.4rc1", + "version": "0.11.4", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/ui/package.json b/ui/package.json index db5efe54c..7ee6d6272 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.11.4rc1", + "version": "0.11.4", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1",