Almost 2,000 members of the broadcasting industry attended the 31st Edinburgh International Television Festival.
BBC News reporter Kevin Young was in the Scottish capital mingling with the great and the good of international broadcasting.
1800 BST SUNDAY 27 AUGUST
ITV has been making a statement at the festival this year.
The weekend began with its blazing attack on Channel 4 and will end with the publication of its autumn schedule tomorrow.
I have had a sneak preview and although I am not allowed to mention any specific shows before midnight, it confirms what ITV has been promising - the return of big names and familiar "brands".
ITV wants us to know that it is back and is about to revive its tired peak-time schedules.
Now it is up to the UK's viewing public - and advertisers - to decide if it is right.
ITV and Channel 4 have hogged the headlines in the absence of any real news this weekend about the BBC (aside from BBC Four's award as non-terrestrial channel of the year), or about Five or Sky.
Meanwhile many people here are saying that the event could be rebranded as a "media" festival in 2007 to acknowledge online and mobile technologies.
Anyway, for this year at least, it is time to hit the "off" button.
It has been fun but I have a home to go to - and loads of TV to catch up on!
1530 BST SUNDAY 27 AUGUST
Al Gore delivered an "alternative" MacTaggart Lecture based on his view that "democracy is a conversation".
Dressed in black and moving around the stage, he talked about the evolution of the media and how the freedom of the internet offered people the chance to "join" this conversation.
Al Gore gave a high-brow lecture
The former US Vice-President was an impressive orator during the most highbrow address I have seen this weekend.
Session chairman Adam Boulton, political editor of Sky News, agreed, saying:
"It was alternative in its intellectual breadth compared to the discussions so far."
The Guardian's TV columnist Charlie Brooker told me it was "a bit like having a load of clever shoved into your head for an hour, which was quite remarkable after everything else".
1300 BST SUNDAY 27 AUGUST
The South Park masterclass was very, very funny.
Trey Parker and Matt Stone offered tips on animation
Creators Matt Stone and Trey Parker said that while they had earned considerable freedom during the 10 series of their cartoon show, they still often battled with their bosses at Comedy Central to get their ideas on-air.
They also discussed their parody of former Iraqi president Saddam Hussein in their film Team America - "gay and with a Canadian accent", as they described it.
"We have some pretty good information from one of our friends-of-a-friend that some of the Marines who were in charge of Saddam showed him the movie," Mr Stone said.
"That makes us really happy."
1000 BST SUNDAY 27 AUGUST
Highlights for day three include the Alternative MacTaggart Lecture from Al Gore.
He has finally become a president - not of the United States, as he hoped in 2000, but at US television channel CurrentTV.
He is also on the board of Apple Computer and an unofficial adviser to Google, and has released an acclaimed documentary on the environment.
Meanwhile Matt Stone and Trey Parker, the men behind rude cartoon South Park, are giving a masterclass to delegates on their meteoric rise to fame.
And there is a speech by Rageh Omaar, formally a BBC news correspondent but now with TV channel al-Jazeera, which is launching a frequently-delayed English version at some point in the future.
0800 BST SUNDAY 27 AUGUST
Aaron Sorkin gave a couple of great quotes in the Studio 60 session that are worth repeating.
When he left The West Wing, he asked Seinfeld creator Larry David if he should distance himself from the political drama for good.
"He said to me: 'You can never watch The West Wing again. Only two things can happen - it'll be great and you'll be miserable, or it won't be great and you'll be miserable.'
"While I certainly rooted for all my close friends that were there, and there wasn't a day that went by that I didn't miss The West Wing, I didn't watch it again."
Sorkin was also asked what inspired him to write the witty, overlapping dialogues for which his characters are renowned.
"I grew up in a family where anyone who used one word when they could have used 10 just wasn't trying very hard," he said.
"To survive at the dinner table, you had to learn how to talk."
2200 BST SATURDAY 26 AUGUST
Amanda Peet and Matthew Perry star in Studio 60 on the Sunset Strip
Channel 4 has got its own back on Charles Allen in the best way possible, winning the festival's award for terrestrial channel of the year.
The other highlight of the evening has been a screening of Studio 60 on the Sunset Strip, the latest drama by Aaron Sorkin, creator of The West Wing.
It is set behind the scenes of a failing late-night comedy show, just as The Larry Sanders Show was in the early 1990s.
The good news is that the script is fantastically sharp, with funny dialogue and an attack on an apparently predictable, unadventurous US television industry.
But I believe the programme is too "industry-centric" and will appeal to few people outside the media when it airs on Channel 4 and More4 next year.
Having said that, Matthew Perry - Chandler in Friends - steals the show with the best lines and gaffes, and his role as a scriptwriter drugged to the eyeballs on painkillers could well earn him an Emmy.
1700 BST SATURDAY 26 AUGUST
Iannucci co-wrote the Alan Partridge series with Steve Coogan
The creator of The Day Today and I'm Alan Partridge, Armando Iannucci, showed us a rough edit of a sitcom he is making, which is more mainstream than his recent work.
Lab Rat stars comedian Chris Addison, who was Ollie in political satire The Thick of It, as a scientist with a pink coat and an eccentric assistant.
The clip was promising and I suspect it is the sort of programme that may end up on BBC One or Two on a Friday night.
Mr Iannucci also explained how he ditched an idea for The Thick of It, where a politician wanted to walk to work until he discovered his red ministerial boxes would be driven behind him for security reasons.
He said this sounded too far-fetched - until he read about Conservative leader David Cameron cycling to Westminster followed by a car with his own sensitive paperwork.
1600 BST SATURDAY 26 AUGUST
Attenborough, 80, narrates hit BBC series Planet Earth
National treasure Sir David Attenborough talked us through a chase where 30 hungry lions pursued an elephant, with a couple of them clinging on to the elephant's back to bring it down.
Sir David explained that filming this had been "very harrowing" as the production crew on Planet Earth saw such attacks again and again.
We also watched a rattlesnake stabbing a mouse with such devastating effect that the victim did three backflips before landing. This was for an episode of Reptiles, to be shown in 2008.
Crucially, the 80-year-old also took time to greet someone's baby outside the festival venue, and I suspect that is a photograph you may see in the Sunday papers.
1230 BST SATURDAY 26 AUGUST
Kevin Lygo, Channel 4's director of programmes, was fairly nonchalant when asked in his one-to-one session about the attack on the broadcaster by Charles Allen.
Instead, he talked about putting more money into digital channel E4, and in particular its "first big drama", which has just been commissioned.
Another of his networks, More4, had "established itself really quickly" and will have a "monthly event" in future - a big drama or factual programme that will be promoted heavily and should draw people to the digital channel.
He also said viewers should expect Channel 4's factual output to be repeated heavily on More4 because it "seems a waste" of outstanding material otherwise.
0900 BST SATURDAY 26 AUGUST
Virtually all of the newspapers have chosen the Channel 4 angle of Charles Allen's speech as their take on yesterday's MacTaggart Lecture.
The Scotsman says: "Channel 4 accused of producing 'dumb TV'", while the headline in The Daily Telegraph is "Allen lays into Channel 4 and demands sell-off".
"ITV boss attacks C4's drive to boost ratings," says The Guardian, and The Sun joins in with "ITV chief raps 'sex mad' C4".
Only The Herald picks something different: "Outgoing ITV boss sees high definition future and nothing worth watching."
0700 BST SATURDAY 26 AUGUST
No CSI stars at last night's party, sadly...
Still, a couple of the festival's "bonus" events have caught my eye in today's schedule.
If delegates have an idea for a programme, Elevator Pitch offers them three minutes in a lift with a controller or commissioning editor, who will listen and presumably sign them up if the ideas are any good.
Meanwhile part of the festival is being opened to the public, with screenings of forthcoming TV shows outside the Edinburgh International Conference Centre.
If you are nearby, you can see the Disney Channel's High School Musical, a fresh episode of Sir David Attenborough's Planet Earth, or sitcom Lovespring International, produced by Eric McCormack from Will and Grace.
There is also a preview of Studio 60 on the Sunset Strip, by West Wing creator Aaron Sorkin - I plan to go and will let you know if it is as good as it sounds.
2000 BST FRIDAY 25 AUGUST
So Charles Allen decided not to use his MacTaggart Lecture to get his own back on his critics after all.
But he will not have won any friends at Channel 4 by telling the rival broadcaster to "grow up", with more of its own programmes, fewer imports and fewer repeats.
I have written about the speech separately on the site - and will report back from a Q&A session with Mr Allen in the morning, by which time any fallout from the ITV chief executive's comments should have become apparent.
Sky One's director of programmes also gave an interesting interview earlier, in which he outlined his plans for his channel. Again, you can read about that elsewhere in the Entertainment section.
In the meantime, I am going to the launch of Five's digital channels - Five Life (not to be confused with Five Live, the BBC radio station) and Five US.
The latter will show nothing but US acquisitions, and Five has an impressive roster of fine American dramas, including CSI, House, Law and Order and The Shield.
I am a huge fan of the three versions of CSI and am secretly hoping that some of the stars will have flown in, but perhaps I am being overly optimistic.
1515 BST FRIDAY 25 AUGUST
The Apprentice was alternately entertaining and horrifying as various media figures struggled to sell household items on shopping channel QVC.
Each team had 20 minutes, with the men picking a vacuum cleaner and iron to demonstrate, and the women going for blouses and jewellery.
Perhaps the fate of the men was sealed when team captain Peter Salmon - formerly controller of BBC One - spectacularly misjudged his audience by saying of one product: "Your cleaner will love it."
The women, with the BBC's director of television Jana Bennett in charge, generated almost three times as much cash through clothes and jewellery.
The result led to Simon Shaps, ITV's director of programming, being fired by Sir Alan Sugar.
He said afterwards he was "completely relaxed".
"I can now return to the quiet pastures of ITV, where there's nothing like as much pressure as there is when you're on The Apprentice," he told me.
1145 BST FRIDAY 25 AUGUST
The highlight of day one is, without doubt, a major speech by Charles Allen.
On his way out: Charles Allen will give the MacTaggart lecture
The chief executive of ITV leaves his job on 1 October, at a time of declining audiences and - even more crucially for a commercial broadcaster - falling advertising revenues.
He is giving the MacTaggart Lecture, the centrepiece of the festival, at 1830 BST.
We must wait to discover if he launches a savage attack on the industry, burning some bridges on the way, or if he plays it safe with a more mundane speech.
This afternoon, the controllers of BBC One, BBC Three and Sky One are interviewed in hour-long sessions.
There are also discussions on daytime schedules and whether TV is politically biased, plus a master class by former ITN news presenter Sir Trevor McDonald.
But first it's a special version of The Apprentice with eight senior TV executives trying to impress Sir Alan Sugar.
Who will face the indignity of being fired in the first hour of the festival?
1000 BST FRIDAY 25 AUGUST
It is a great time of year to be in Edinburgh, when the city goes festival crazy.
Comedy, theatre, music, opera, books, films and art are all on offer.
But I am going to ignore all of these attractions.
For this weekend, like most others, my life is to be dominated by television.
To say that I love TV would be an understatement.
Whether the programmes are comedy, drama, current affairs or sport, I cannot get enough.
Let's just say that I regard the 100 or so Sunday nights I have spent watching Kiefer Sutherland in five series of real-time drama 24 as some of the happiest moments of my life.
And I want to know exactly what I can look forward to seeing on the box over the next few months.
I will be attending as many of the festival's 50 or so sessions as possible between now and Sunday night, and reporting back with all the highlights.