Legend of the Demon Cat (Chinese: 妖猫传; pinyin: Yāo Māo Zhuàn) is a 2017 Xianxia fantasy mystery film directed by Chen Kaige, based on the novel Samana Kukai written by Japanese writer Yoneyama Mineo
Huang Xuan as Bai Letian Shōta Sometani as Kūkai Kitty Zhang as Chunqin Qin Hao as Chen Yunqiao Hiroshi Abe as Abe no Nakamaro Keiko Matsuzaka as Bai Ling Liu Haoran as Bai Long Oho Ou as the young Dan Long Zhang Tianai as Yulian Zhang Luyi as Emperor Xuanzong of Tang Sandrine Pinna as Lady Yang Tian Yu as Gao Lishi Liu Peiqi as Huang He Xin Baiqing as Li Bai Cheng Taisheng as the Old Dan Long Mason Lee as the Chamberlain Qin Yi as Old Lady-in-waiting Shōhei Hino as Kūkai's Teacher
Plot : The story is set in China during the Tang Dynasty (618–907). A demon cat appears and breaks the peace of the capital, Chang’an City, causing a series of strange events. Poet Bai Letian and Monk Kukai join together to investigate the death of Concubine Yang by following the trail left by the cat, unveiling a buried fact.
So basically it's a loose story on how Yang Guifei died (Poet Bai Letian and Monk Kukai) investigated it, and how Bai Letian - who later is known as Bai Juyi got his inspiration to write his famous poem Song of Everlasting Sorrow.