Range request support for desktop #176
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
Invalid
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
LBRYCommunity/lbry-redux!176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "range-request"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
fileInfoafter successfulgetto populate withstreaming_urlpurchasedStreamingUrlsfrom redux, this can now just be accessed fromfileInfoNotes
@akinwale I still think it makes sense to combine
fileandfile_inforeducers. I think it could be valuable to keep purchase history separate, so we can persist that without persisting a user's entirefile_list(maybe?). Maybefileshould be renamed topurchase? Or something similar. Not a big deal now though.@akinwale Do we even need to keep track of
streamingUrlsif we can just access it infileInfo?@ -43,0 +48,4 @@const fileExt = extName ? `.${extName}` : null;const testString = fileName || fileExt;// Get mediaType from file extensionI guess there have been some changes to this in the desktop codebase and we never moved over. Just copy pasting this in so we can switch to it.
Android doesn't use the second argument for this function so changing it should be fine.
@ -43,0 +48,4 @@const fileExt = extName ? `.${extName}` : null;const testString = fileName || fileExt;// Get mediaType from file extensionI also mentioned to you that the SDK now returns a stream type:
The mapping is here - I think it should be able to work with some small adjustments (glaringly missing are fbx/gcode, but not sure if anyone uses those):
lbryio/lbry-sdk@41b866c1ee/lbry/lbry/schema/mime_types.py@shockr can you review/merge before 11am meeting tomorrow?
Just a couple of issues to clarify. Everything else looks good.
@ -5,57 +5,70 @@ import { doToast } from 'redux/actions/notifications';import { selectBalance } from 'redux/selectors/wallet';import { makeSelectFileInfoForUri, selectDownloadingByOutpoint } from 'redux/selectors/file_info';import { makeSelectStreamingUrlForUri } from 'redux/selectors/file';import { makeSelectClaimForUri } from 'redux/selectors/claims';Since
doPurchaseUrialso dispatches the same action, how do we differentiate between the two? I recall using a different action here because it's possible for a purchase to fail due to insufficient credits, the wallet being locked or some other condition, sogetdoesn't actually get called in those scenarios.Can a file be considered downloaded where just
blobs_completed > 0? I believe it's also possible for streamed files to meet the conditionblobs_completed > 0, but I'll have to test this to be sure.The way we have been using this selector in the past is
is any part of it downloaded. Possibly we should add another calledselectFileInfosCompletelyDownloaded? Or something similar.@ -5,57 +5,70 @@ import { doToast } from 'redux/actions/notifications';import { selectBalance } from 'redux/selectors/wallet';import { makeSelectFileInfoForUri, selectDownloadingByOutpoint } from 'redux/selectors/file_info';import { makeSelectStreamingUrlForUri } from 'redux/selectors/file';import { makeSelectClaimForUri } from 'redux/selectors/claims';Ah that's a good point. I just searched for
LOADING_FILE_and didn't find anything so I figured it wasn't needed. That does make sense to have two though. I'll add it back. MaybeGET_FILE_XXXto signal that it's specifically forgetcalls?@ -5,57 +5,70 @@ import { doToast } from 'redux/actions/notifications';import { selectBalance } from 'redux/selectors/wallet';import { makeSelectFileInfoForUri, selectDownloadingByOutpoint } from 'redux/selectors/file_info';import { makeSelectStreamingUrlForUri } from 'redux/selectors/file';import { makeSelectClaimForUri } from 'redux/selectors/claims';GET_FILE_XXXsounds perfect.That makes sense so it's fine as is. For completely downloaded, the condition would have to be something like
fileInfo.completed || fileInfo.written_bytes >= fileInfo.total_bytes.