Patent attributes
An electronic device can play back media items using a random playback mode. To ensure that related media items are played back in a proper order (e.g., live music is played back in concert order), the electronic device can define metadata or other data coupling related media items in a predefined or preset sequence. For example, related media items can include metadata tags identifying the previous and next media items to play back in the sequence. As another example, the electronic device can store a listing of media items of a sequence and the order in which to play them back. When the electronic device reaches a media item that is part of a preset sequence during random playback, the electronic device can identify at least the subsequent media items in the sequence, and insert the subsequent media items in the playback queue. The electronic device can then play back the entire sequence before moving to the next media item in the playback queue.