Skip to content
  • Filip Roséen's avatar
    playlist/item: redirect request following deletion of node · 898816a3
    Filip Roséen authored and Thomas Guillem's avatar Thomas Guillem committed
    
    
    :: Introduction
    ----------------------------------------------------------------------
    
    When we are dealing with a flat playlist, a request to add children to
    an item results in that item being deleted, and its children being
    inserted into the parent of said item. This is done in order to not
    introduce any nested levels in the tree.
    
    What this further means is that /if/ the item that is effectivelly removed is
    scheduled for playback prior to the removal, the playlist might try to play an
    entity which does not exist anymore; which is problematic for several reasons.
    
    Note: The problem does not exist when --playlist-tree is enabled since
          the item on which children should be attached is then preserved.
    
    :: Solution
    ----------------------------------------------------------------------
    
    The solution to the previously described problem is to "redirect" any
    pending request that refers to the deleted entity, so that it instead
    refers to its first child (if any).
    
    closes #17183
    
    Signed-off-by: default avatarThomas Guillem <thomas@gllm.fr>
    898816a3