That's very hard to code, But its a good idea, and the favorite programs basically does that already (kinda).