forked from LBRYCommunity/lbry-sdk
Merge pull request #517 from lbryio/fix-filter-by-outpoint
fix filter files by outpoint
This commit is contained in:
commit
74754c9870
3 changed files with 6 additions and 3 deletions
|
@ -23,7 +23,7 @@ at anytime.
|
||||||
### Fixed
|
### Fixed
|
||||||
* Added string comparison to ClaimOutpoint (needed to look things up by outpoint)
|
* Added string comparison to ClaimOutpoint (needed to look things up by outpoint)
|
||||||
* Remove unused API commands from daemon
|
* Remove unused API commands from daemon
|
||||||
*
|
* Fix file filter `outpoint`
|
||||||
*
|
*
|
||||||
|
|
||||||
## [0.9.0rc12] - 2017-03-06
|
## [0.9.0rc12] - 2017-03-06
|
||||||
|
|
|
@ -15,6 +15,7 @@ from lbrynet.lbryfile.client.EncryptedFileDownloader import EncryptedFileDownloa
|
||||||
from lbrynet.lbryfilemanager.EncryptedFileStatusReport import EncryptedFileStatusReport
|
from lbrynet.lbryfilemanager.EncryptedFileStatusReport import EncryptedFileStatusReport
|
||||||
from lbrynet.interfaces import IStreamDownloaderFactory
|
from lbrynet.interfaces import IStreamDownloaderFactory
|
||||||
from lbrynet.lbryfile.StreamDescriptor import save_sd_info
|
from lbrynet.lbryfile.StreamDescriptor import save_sd_info
|
||||||
|
from lbrynet.core.Wallet import ClaimOutpoint
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -49,6 +50,7 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver):
|
||||||
self.sd_hash = None
|
self.sd_hash = None
|
||||||
self.txid = None
|
self.txid = None
|
||||||
self.nout = None
|
self.nout = None
|
||||||
|
self.outpoint = None
|
||||||
self.name = None
|
self.name = None
|
||||||
self.claim_id = None
|
self.claim_id = None
|
||||||
self.rowid = rowid
|
self.rowid = rowid
|
||||||
|
@ -118,6 +120,7 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.txid = txid
|
self.txid = txid
|
||||||
self.nout = nout
|
self.nout = nout
|
||||||
|
self.outpoint = ClaimOutpoint(self.txid, self.nout)
|
||||||
else:
|
else:
|
||||||
raise NoSuchSDHash(self.sd_hash)
|
raise NoSuchSDHash(self.sd_hash)
|
||||||
self.claim_id = yield self.wallet.get_claimid(self.name, self.txid, self.nout)
|
self.claim_id = yield self.wallet.get_claimid(self.name, self.txid, self.nout)
|
||||||
|
|
|
@ -88,10 +88,10 @@ class Wallet(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_claim_metadata_for_sd_hash(self, sd_hash):
|
def get_claim_metadata_for_sd_hash(self, sd_hash):
|
||||||
return "fakeuri", "faketxid", "fakenout"
|
return "fakeuri", "aa04a949348f9f094d503e5816f0cfb57ee68a22f6d08d149217d071243e0377", 1
|
||||||
|
|
||||||
def get_claimid(self, name, txid=None, nout=None):
|
def get_claimid(self, name, txid=None, nout=None):
|
||||||
return "fake claimid"
|
return "aa04a949348f9f094d503e5816f0cfb57ee68a22f6d08d149217d071243e0378"
|
||||||
|
|
||||||
|
|
||||||
class PeerFinder(object):
|
class PeerFinder(object):
|
||||||
|
|
Loading…
Reference in a new issue