I don't think it is based on the books, but is telling a new story in a setting based on the books' universe. That's really the only way to make it work, not by trying to adapt the stories themselves but by building something new out of their concepts and worldbuilding. Much like how Marvel and DC movies don't faithfully adapt specific storylines from the comics, but mix and distill various characters, concepts, and plot threads into new stories.
Except the two examples given are not even remotely comparable. One is a story by a single author, the others are fictional universes that have had uninterrupted publication for 80 years, with thousands of stories by who knows how many creators utilizing hundreds of characters with so many iterations and variations as to require a distillation of certain elements, some original, some that have been added over the decades, to make a good screen version.
At any rate, I hope it doesn't suck.
I actually own about three issues of Astounding Science Fiction containing first run Foundation stories. Two of those issues have stories that would end up collected in Second Foundation. "Now You Don't" IIRC. I managed to stumble across an even earlier story in a book store that, as luck would have it, contained my favorite Foundation story "Dead Hand" featuring Lathan Devers, Bel Riose and Ducem Barr. An additional bit of luck is that it was only 8.00 if I recall.
To celebrate this first trailer, here's some pics of original illustrations from "Dead Hand". It was a bit tricky taking the pics and holding the book, and as you can imagine I was super careful not to damage it. I left them in safe keeping at my dad's, so I can't update the pics right now. One thing that jumped out.....no Encyclopedia Galactica entries from what I remember.
The magazine in plastic cover
Title page with illustration of Lathan Devers blasting out of the hanger on Trantor.
Lathan Devers, Bel Riose and Ducem Barr
Bel Riose (holding Hober Mallows force field belt) and Ducem Barr
Lathan Devers and Ducem Barr escape by blasting guard (can't remember his name right now)
One of the neat things is that the characters and style were pretty much how I imagined them. Except the ships. I don't know that I ever really thought of their shapes aside from the occasional mention of the cigar shaped ship in the Imperial insignia.
Anyway, I'm looking forward to the show even though I'm pretty sure it will be "Foundation in name only".