mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-31 09:21:29 +00:00
fix get_count_for_stream returning [(count, )] instead an int
This commit is contained in:
parent
d1aa69bfa3
commit
e2050b4fc1
2 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ at anytime.
|
||||||
* fix recursion depth error upon failed blob
|
* fix recursion depth error upon failed blob
|
||||||
* call stopProducing in reflector client file_sender when uploading is done
|
* call stopProducing in reflector client file_sender when uploading is done
|
||||||
* ensure streams in stream_info_manager are saved in lbry_file_manager
|
* ensure streams in stream_info_manager are saved in lbry_file_manager
|
||||||
|
* [#470](https://github.com/lbryio/lbry/issues/470)
|
||||||
|
|
||||||
## [0.8.1] - 2017-02-01
|
## [0.8.1] - 2017-02-01
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -281,8 +281,10 @@ class EncryptedFileManager(object):
|
||||||
|
|
||||||
@rerun_if_locked
|
@rerun_if_locked
|
||||||
def _get_count_for_stream_hash(self, stream_hash):
|
def _get_count_for_stream_hash(self, stream_hash):
|
||||||
return self.sql_db.runQuery("select count(*) from lbry_file_options where stream_hash = ?",
|
d = self.sql_db.runQuery("select count(*) from lbry_file_options where stream_hash = ?",
|
||||||
(stream_hash,))
|
(stream_hash,))
|
||||||
|
d.addCallback(lambda r: (r[0][0] if r else 0))
|
||||||
|
return d
|
||||||
|
|
||||||
@rerun_if_locked
|
@rerun_if_locked
|
||||||
def _get_rowid_for_stream_hash(self, stream_hash):
|
def _get_rowid_for_stream_hash(self, stream_hash):
|
||||||
|
|
Loading…
Add table
Reference in a new issue