forked from LBRYCommunity/lbry-sdk
don't use distutils to check if vlc is available
This commit is contained in:
parent
c8b2b7b279
commit
7eeac060ab
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ from lbrynet.interfaces import IStreamDownloaderFactory
|
||||||
from lbrynet.lbryfile.client.LBRYFileMetadataHandler import LBRYFileMetadataHandler
|
from lbrynet.lbryfile.client.LBRYFileMetadataHandler import LBRYFileMetadataHandler
|
||||||
import os
|
import os
|
||||||
from twisted.internet import defer, threads, reactor
|
from twisted.internet import defer, threads, reactor
|
||||||
from distutils.spawn import find_executable
|
from twisted.python.procutils import which
|
||||||
|
|
||||||
|
|
||||||
class LBRYFileDownloader(CryptStreamDownloader):
|
class LBRYFileDownloader(CryptStreamDownloader):
|
||||||
|
@ -262,7 +262,7 @@ class LBRYFileOpener(LBRYFileDownloader):
|
||||||
|
|
||||||
class LBRYFileOpenerFactory(LBRYFileDownloaderFactory):
|
class LBRYFileOpenerFactory(LBRYFileDownloaderFactory):
|
||||||
def can_download(self, sd_validator):
|
def can_download(self, sd_validator):
|
||||||
return bool(find_executable('vlc'))
|
return bool(which('vlc'))
|
||||||
|
|
||||||
def _make_downloader(self, stream_hash, payment_rate_manager, stream_info, upload_allowed):
|
def _make_downloader(self, stream_hash, payment_rate_manager, stream_info, upload_allowed):
|
||||||
return LBRYFileOpener(stream_hash, self.peer_finder, self.rate_limiter, self.blob_manager,
|
return LBRYFileOpener(stream_hash, self.peer_finder, self.rate_limiter, self.blob_manager,
|
||||||
|
|
Loading…
Reference in a new issue