So far I've gotten through the last few minutes of the Ali Baba story and the bridging story of Bacbac. The Aladdin story looks to be quite excellent, so I'm watching it in two parts.
Based on the famous Book of One Thousand and One Nights (Arabic: كتاب ألف ليلة و ليلة Kitāb 'Alf Layla wa-Layla, Persian: هزار و یک شب Hazâr-o Yak Šab; also known as The Book of a Thousand Nights and a Night, One Thousand and One Nights, 1001 Arabian Nights, Arabian Nights, The Nightly Entertainments or simply The Nights), the miniseries relates the framing story of a medieval Middle-Eastern literary epic which tells the story of Scheherazade, a queen of the Sassanid period (226 - 651 CE), who must relate a series of stories to her malevolent husband, the King, to delay her execution.
The Wikipedia synopsis of the framing story:
The story takes place in the Sassanid era and begins with the Persian king Shahryar. The king rules an unnamed island "between India and China" (in modern editions based on Arab transcripts he is king of India and China). Shahryar is so shocked by his wife's infidelity that he kills her and, believing all women to be likewise unfaithful, gives his vizier an order to get him a new wife every night (in some versions, every third night). After spending one night with his bride, the king has her executed at dawn. This practice continues for some time, until the vizier's clever daughter Sheherazade ("Scheherazade" in English, or "Shahrastini", a Persian name) forms a plan and volunteers to become Shahrayar's next wife. With the help of her sister Dunyazad, every night after their marriage she spends hours telling him stories, each time stopping at dawn with a cliffhanger, so the king will postpone the execution out of a desire to hear the rest of the tale. In the end, she has given birth to three sons, and the king has been convinced of her faithfulness and revoked his decree.
The stories of the book were compiled over several centuries starting in the ninth (c. 850 CE) and leading up to at least the seventeenth (c. 1700 CE). Thus, "Ali Baba and the Forty Thieves" and "Sinbad the Sailor" are said to have occurred during the Abbassid Caliphate (750 - 1258 CE) and may have been added to the canon during that era.
I find the whole idea of Arabian Nights fascinating, because it's a meta-story that was added to for nearly a thousand years. The richness, pageantry, and continuity of such a thing astounds me.