Merge branch 'master' into jesse/cross-device

This commit is contained in:
Jesse Bannon 2023-01-04 15:24:37 -08:00
commit 42f1f9464a
2 changed files with 5 additions and 8 deletions

View file

@ -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):

View file

@ -4,4 +4,4 @@
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].info.json": "ee8437e52186219ff510214138f00e28", "JMC/JMC - Move 78 - Automated Improvisation [Full Album].info.json": "ee8437e52186219ff510214138f00e28",
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].mp4": "8b8a9a731a19bc37feb091559f97ebbc", "JMC/JMC - Move 78 - Automated Improvisation [Full Album].mp4": "8b8a9a731a19bc37feb091559f97ebbc",
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].nfo": "7a65b184d24c68fc0ec5380432250f5b" "JMC/JMC - Move 78 - Automated Improvisation [Full Album].nfo": "7a65b184d24c68fc0ec5380432250f5b"
} }