'Sends a request to trakt indicating that the given show and all its episodes is part of our library.
show_obj: The TVShow object to add to trakt'

def addShowToTraktLibrary(self, show_obj):

    data = {}
    if (not self.findShow(show_obj.indexer, show_obj.indexerid)):
        trakt_id = srIndexerApi(show_obj.indexer).config[u'trakt_id']
        data = {u'shows': [{u'title': show_obj.name, u'year': show_obj.startyear, u'ids': {}}]}
        if (trakt_id == u'tvdb_id'):
            data[u'shows'][0][u'ids'][u'tvdb'] = show_obj.indexerid
        else:
            data[u'shows'][0][u'ids'][u'tvrage'] = show_obj.indexerid
    if len(data):
        sickrage.srCore.srLogger.debug((u'Adding    %s    to    tv    library' % show_obj.name))
        try:
            self.trakt_api.traktRequest(u'sync/collection', data, method=u'POST')
        except traktException as e:
            sickrage.srCore.srLogger.warning((u'Could    not    connect    to    Trakt    service.    Aborting    adding    show    %s    to    Trakt    library.    Error:    %s' % (show_obj.name, repr(e))))
            return
