fix(sync): an empty answer the remote's own count contradicts is not believed, one level down
E32 review round 1 (B1, B2, B3, B8). - Plex watch reconcile: a section the server SAYS is empty (totalSize 0, nothing listed) is a complete listing. It read as "cut short" forever, so one empty library stopped un-watches from ever syncing. A listing with no total at all stays incomplete (the client now returns None for it instead of 0), and a whole scan that listed nothing still clears nothing. Tests now cover completeness across two sections, both orders. - Plex collections: no members from a collection whose listing counts some (childCount) keeps the membership we hold, in the full sync and in the targeted resync after a write. - YouTube playlists: no items for a playlist whose listing counts some (itemCount) keeps the mirror in the bulk pull, and is refused as retryable in "reset to YouTube" and in the push plan/merge, where it read as "YouTube deleted them all". The rule sits beside vanished(). - A playlist deleted on YouTube answered "reconnect your account"; it now says it is gone (errors.youtube.gone, HU+EN). - The pure 3-way merge moved to sync/playlist_merge.py; playlists.py is back under 800 lines and off the size list.
This commit is contained in:
@@ -81,6 +81,9 @@ def test_a_section_page_asks_for_guids_and_reports_the_server_total(plex):
|
||||
|
||||
plex.routes["/library/sections/7/all"] = {"Metadata": [], "size": 0}
|
||||
assert plex.section_items("7", 2) == ([], 0)
|
||||
# No total at all is not "0": the caller must not read it as a complete, empty section.
|
||||
plex.routes["/library/sections/7/all"] = {"Metadata": []}
|
||||
assert plex.section_items("7", 2) == ([], None)
|
||||
|
||||
|
||||
def test_related_flattens_the_hubs_and_degrades_to_empty(plex):
|
||||
|
||||
Reference in New Issue
Block a user