mirror of https://gitlab.com/bashrc2/epicyon
Check if site is active before downloading shared items catalog
parent
4422c69d7f
commit
b232a7593a
|
@ -35,6 +35,7 @@ from utils import acctDir
|
||||||
from utils import isfloat
|
from utils import isfloat
|
||||||
from media import processMetaData
|
from media import processMetaData
|
||||||
from filters import isFilteredGlobally
|
from filters import isFilteredGlobally
|
||||||
|
from siteactive import siteIsActive
|
||||||
|
|
||||||
|
|
||||||
def _loadDfcIds(baseDir: str, systemLanguage: str) -> {}:
|
def _loadDfcIds(baseDir: str, systemLanguage: str) -> {}:
|
||||||
|
@ -1173,6 +1174,8 @@ def _updateFederatedSharesCache(session, sharedItemsFederatedDomains: [],
|
||||||
if not tokensJson.get(federatedDomain):
|
if not tokensJson.get(federatedDomain):
|
||||||
# token has been obtained for the other domain
|
# token has been obtained for the other domain
|
||||||
continue
|
continue
|
||||||
|
if not siteIsActive(httpPrefix + '://' + federatedDomain):
|
||||||
|
continue
|
||||||
url = httpPrefix + '://' + federatedDomain + '/catalog'
|
url = httpPrefix + '://' + federatedDomain + '/catalog'
|
||||||
asHeader['Authorization'] = tokensJson[federatedDomain]
|
asHeader['Authorization'] = tokensJson[federatedDomain]
|
||||||
catalogJson = getJson(session, url, asHeader, None,
|
catalogJson = getJson(session, url, asHeader, None,
|
||||||
|
|
Loading…
Reference in New Issue