"Me" and "te" can be direct or indirect objects. The problems come with third person: "le" is indirect, lo is direct (for masculin) and la (for feminin) is direct too.
Take care, except people from the south of Spain (Andalucía), nearly all spanish inhabitants use them wrong. Apart from the accepted "leísmo", it also exists (BUT THEY ARE NOT CORRECT) laísmo (the use of the la instead of the le) and loísmo (the use of the lo instead of the le). Both laísmo and loísmo are too colloquial, and as leísmo shows a lack of spanish grammar.
In case of any doubts, If I were you I would transcript into the passive. For example: Tú compras un coche (Direct Object o Complemento Directo) a tu hermano (Indirect object, complemento indirecto) - Un coche (el DO o CD becomes the subject) es comprado por ti para tu hermano (IO o CI still almost the same).
Another clue: a direct object can be easily replaced by "eso, esa" and the indirect object is always preceed by the preposition "a", which can be easily replaced by "para"