v3 41 - Adjusting directory/collection matching + error checking for metadata
This commit is contained in:
parent
3a4a5b271a
commit
d67e40180d
@ -101,12 +101,16 @@ class MediaOutInformationTaskListener: CoordinatorEventListener() {
|
||||
|
||||
fun getAlreadyUsedForCollectionOrTitle(): String {
|
||||
val exisiting = getExistingCollections()
|
||||
val existingMatch = exisiting.find { it.contains(baseInfo.title) }
|
||||
val existingMatch = exisiting.find { it.lowercase().contains(baseInfo.title.lowercase()) }
|
||||
if (existingMatch != null) {
|
||||
return existingMatch
|
||||
}
|
||||
|
||||
val metaTitles = getTitlesFromMetadata()
|
||||
return metaTitles.firstOrNull { it.contains(baseInfo.title) }
|
||||
val existingMatchOnMeta = metaTitles.find { it.lowercase().contains(baseInfo.title.lowercase()) }
|
||||
|
||||
|
||||
return existingMatchOnMeta
|
||||
?: (getTitlesFromMetadata().firstOrNull { it in exisiting } ?: getTitlesFromMetadata().firstOrNull()
|
||||
?: baseInfo.title)
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ class Anii(SourceBase):
|
||||
except IndexError:
|
||||
pass
|
||||
except Exception as e:
|
||||
if "Data post unsuccessful. (429)" in e:
|
||||
if "Data post unsuccessful. (429)" in str(e):
|
||||
log.error("Failed to read Anii")
|
||||
else:
|
||||
log.exception(e)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user