tbh I'm not sure if you'd find something self-hosted that's as good as Trakt or TMDB since the main value comes from user recommendations and comments, which you won't really have with a self-hosted solution. Maybe a federated system is a potential solution, but I haven't seen anything built for this purpose yet.
This is probably waaaay outside what you're asking, but MythTV can do the tracking for whatever you watch through it (both TV and movies) or listen to... but it can't do suggestions.