Merge branch 'master' into i18n
This commit is contained in:
commit
b41b35de13
8 changed files with 38 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
[bumpversion]
|
||||
current_version = 0.11.3
|
||||
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+))?
|
||||
|
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "LBRY",
|
||||
"version": "0.11.3",
|
||||
"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": {
|
||||
|
|
|
@ -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.claimNextPurchaseReward()
|
||||
dispatch({
|
||||
type: types.DOWNLOADING_COMPLETED,
|
||||
data: {
|
||||
|
@ -172,8 +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))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}, () => { });
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "lbry-web-ui",
|
||||
"version": "0.11.3",
|
||||
"version": "0.11.4",
|
||||
"description": "LBRY UI",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
|
|
Loading…
Add table
Reference in a new issue