Map<String, dynamic> toMap() { return { 'index': index, 'playlistId': playlistId, 'queue': queue.map((content) => content.toMap()).toList(), }; }