I have seen all three Hobbit movies and Saruman was a good friend of Gandalf and he even helped him when the Orcs had caught him. 

I have just seen The Lord of the Rings Part one few days back (although it was released long time back even before The Hobbit), and I saw a completely different Saruman. He went against the "the good" and joined Sauron. 

In the entire movie Sauron was not around except in the beginning where they show a flashback of the war. Saruman's theory was that Sauron is regaining strength and he should join him. 

Now the amount of effort that Saruman put in setting up an army, if he had done that much effort to help Gandalf and his army (of Elves, Men, Dwarves and Hobbits, other wizards that were in the Hobbit along with the ugly creatures he brought to life) he would have probably defeated Sauron by destroying the ring. 

I am still trying to understand why Saruman did not help Gandalf if he was so powerful. Was he possessed by Sauron or got attracted to the Ring himself? Is that why he did all this. I hope I am not being too hasty looking for an answer before watching the other two LOTR movies.