So if I got it right, when it's a direct object I use "La", when it's
an indirect object (like in the second sentence) I use "Le"
That's correct. The exception is if you are combining indirect and
direct object pronouns, you don't say "Le lo di", but "Se lo di", for
example. If the 'le' or 'les' comes before a 'lo' or a 'la', change it
to 'se'.