Event-driven media library