[BUGFIX] Fix entry missing __contains__ function (#392)
* [BUGFIX] Fix missing contains function when checking entries * remove children func * Update failing hash
This commit is contained in:
parent
e54bf7d467
commit
beaa34a367
2 changed files with 6 additions and 9 deletions
|
|
@ -63,11 +63,6 @@ class EntryParent(BaseEntry):
|
||||||
"""This parent's children that are entries"""
|
"""This parent's children that are entries"""
|
||||||
return self._entry_children
|
return self._entry_children
|
||||||
|
|
||||||
@property
|
|
||||||
def children(self) -> List[TBaseEntry]:
|
|
||||||
"""Children, both entries and parent entries, cast as BaseEntry"""
|
|
||||||
return self._parent_children + self._entry_children
|
|
||||||
|
|
||||||
def num_children(self) -> int:
|
def num_children(self) -> int:
|
||||||
"""
|
"""
|
||||||
Returns
|
Returns
|
||||||
|
|
@ -210,7 +205,7 @@ class EntryParent(BaseEntry):
|
||||||
if not playlist_id:
|
if not playlist_id:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return self.uid == playlist_id or any(child.__contains__(item) for child in self.children)
|
return self.uid == playlist_id or any(item in child for child in self.parent_children())
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_disconnected_root_parent(
|
def _get_disconnected_root_parent(
|
||||||
|
|
@ -224,7 +219,9 @@ class EntryParent(BaseEntry):
|
||||||
return webpage_url in url or url in webpage_url
|
return webpage_url in url or url in webpage_url
|
||||||
|
|
||||||
top_level_parents = [
|
top_level_parents = [
|
||||||
parent for parent in parents if not parent.children and _url_matches(parent.webpage_url)
|
parent
|
||||||
|
for parent in parents
|
||||||
|
if parent.num_children() == 0 and _url_matches(parent.webpage_url)
|
||||||
]
|
]
|
||||||
|
|
||||||
match len(top_level_parents):
|
match len(top_level_parents):
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
".ytdl-sub-chapters_from_comments-download-archive.json": "122723ce8d257eebb05178daa26141f6",
|
".ytdl-sub-chapters_from_comments-download-archive.json": "122723ce8d257eebb05178daa26141f6",
|
||||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album]-thumb.jpg": "c12e6a6f242680d1096a1a99d74a62c6",
|
"JMC/JMC - Move 78 - Automated Improvisation [Full Album]-thumb.jpg": "c12e6a6f242680d1096a1a99d74a62c6",
|
||||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].info.json": "f6045c28cc588187167a3f42e6f37f0c",
|
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].info.json": "228adc1dbc785852c8266457af0adadc",
|
||||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].mp4": "8b8a9a731a19bc37feb091559f97ebbc",
|
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].mp4": "68c1c4b20b89511b26a92b967e54891e",
|
||||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].nfo": "7a65b184d24c68fc0ec5380432250f5b"
|
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].nfo": "7a65b184d24c68fc0ec5380432250f5b"
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue