Nested functions are the devil, especially ones that
use variables from the outer scope. Refactoring
_download_name to use a helper class helps make
the scoping more explicit and will undoubtably
prevent bugs in the future.
I think this makes _download_name drastically more readable.
Also cleaned up some duplicated code and
made download_directory respect the passed in parameter
instead of being the default.
Move parameter handling into its own function and
better use the `.get()` function for dictionaries.
Early return on the failed checks is more readable.
The lambda function in the callback was long and
hard to read so moved it out.
-previously the check for a new ui version was only at startup, which
resulted in bugs persisting after they’d been fixed
-add option to skip requirements check
-try to load an existing ui if it can’t be obtained from github
-adds a base set of metadata fields required for results to be rendered
in conf.py, including language and content-type
-dont support old style claims on the new blockchain
-file_name is the name of the file in the downloads folder
-stream_info is a dict of the metadata in a name claim, it can be used
to download streams where the claim hasn’t yet been added to the
nametrie
the purpose of the autofetcher was to automatically back up and host
published content, it is simpler to do this in a separate script that
uses existing daemon functions than to have it be built in
-fix daemon functions to start/stop lbry files
-remove unused stuff in LBRYFileManager
-improve and use new get_lbry_file function instead of _check_history,
which didn’t use the lbry file manager
-use said function to let delete_lbry_file use the same search keys
(sd_hash, name, and file_name)
-logging in LBRYDownloader
-Add LBRYFileProducer, to host the contents of a download without
having to keep re-opening it as it is added to
-included sd hash in ManagedLBRYFileDownloader, to make comparing the
contents of the file manager against name claims easier
-add get_lbry_file function, which returns information about a LBRY
file found by sd_hash, file name, or lbry uri
-make is_lagging more meaningful - it is set to true after 90 seconds
with no progress, this is to stop slow but steady catchups from
triggering it
-prevent situation where repeated shutdowns before wallet catchup
results in never receiving first run credits
-fix settings to write new defaults that aren’t already in the
configuration file
-report log of startup sequence if upload_log set to true
-redirect /view?name=lbry to the main UI page. This is to make the ui
accessible from a lbry:// link on linux
-adds is_lagging indicator as a key from daemon_status, which is set to
True during a phase of the startup sequence, presently only during
loading_wallet if catching up with the blockchain takes longer than a
minute.
-checks if connected to internet before trying to start
-calling help() will return the list of functions
-setting the ‘function’ param in the help function will return the doc
string for that function
-setting the ‘callable_on_startup’ in the help function will return the
list of functions callable during the startup sequence
-adds version() function, which can be called after the daemon is
running and returns lbrynet, lbryum, and lbry ui version information.
-daemon_status now returns how far behind its behind the blockchain
when in the loading_wallet phase of startup
-cleans up set_vars by moving to init