By Jessica Michele Herring (staff@latinospost.com) | First Posted: Aug 19, 2013 10:05 PM EDT

Pop singer and actress Demi Lovato will be joining the cast of 'Glee' in its upcoming season. According to TVLine, "The X Factor" judge will be joining the Fox series for a principal role in the show's fifth season. 

Lovato, who turns 21 tomorrow, will play Dani, an struggling artist who lives in New York City. Dani will be a friend of both Rachel and Santana (Naya Rivera). Dani will also interact often with Adam Lambert's incoming character, with whom she will perform many musical numbers. 

Lovato has a deal with Fox to appear in six episodes, beginning with the second half of the Beatles tribute episode, which airs October 3. The role of Dani will be Lovato's first major role since she starred in "Sonny with a Chance" on the Disney Channel, which went off the air two years ago. Lovato has also starred in Disney's "Camp Rock," and has appeared in "Prison Break" and "Grey's Anatomy."  

"Glee" showrunners will work around Lovato's busy "X Factor" schedule. The talent reality show "X Factor" also airs on Fox right before "Glee" on Thursday nights. 

Lovato's character will be a part of the new age of "Glee" that is split between the glee kids back at McKinley High in Ohio and the characters who moved out to New York post-high school. Rachel (Lea Michele) moved out with her boyfriend, Finn, played by the late Cory Monteith, who was also her real-life boyfriend of two years. 

The creators and cast are moving on with the production of the fifth season despite the tragedy. Monteith, 31, was found dead in a Vancouver hotel room in July due to a drug and alcohol overdose. Finn will be written out of the show on an episode that will feature a tribute to his memory as well as anti-drug PSA announcements. 

Glee returns for season five on Thursday, September 26 at 9 p.m. on Fox. 

© 2015 Latinos Post. All rights reserved. Do not reproduce without permission.