Check if site is active before downloading shared items catalog

main
Bob Mottram 2021-07-29 20:27:36 +01:00
parent 4422c69d7f
commit b232a7593a
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,7 @@ from utils import acctDir
from utils import isfloat
from media import processMetaData
from filters import isFilteredGlobally
from siteactive import siteIsActive
def _loadDfcIds(baseDir: str, systemLanguage: str) -> {}:
@ -1173,6 +1174,8 @@ def _updateFederatedSharesCache(session, sharedItemsFederatedDomains: [],
if not tokensJson.get(federatedDomain):
# token has been obtained for the other domain
continue
if not siteIsActive(httpPrefix + '://' + federatedDomain):
continue
url = httpPrefix + '://' + federatedDomain + '/catalog'
asHeader['Authorization'] = tokensJson[federatedDomain]
catalogJson = getJson(session, url, asHeader, None,