/// <summary> /// Tries to advance to the given content. This is a destructive operation as it will close every entry that passes by. /// Also checks if the next entry has the same content, in that case it advances (repeating track fix). /// </summary> /// <returns>Whether the operation completed</returns> private bool AdvanceTo([NotNull] IPlayableId id) { do { var entry = queue.Head; if (entry == null) { return(false); } if (!entry.Playable.Equals(id)) { continue; } var next = queue.Next(); if (next == null || !next.Playable.Equals(id)) { return(true); } } while (queue.Advance()); return(false); }