def get_content_details(content, instance_path, instance_profile_id, instance_url, instance_language_id=None):
    'gets details of a content item'
    global monitor_new_content, auto_search
    images = content.get('images')
    for image in images:
        image['url'] = '{0}{1}'.format(instance_url, image.get('url'))
    monitored = content.get('monitored')
    if (monitor_new_content is not None):
        monitored = (True if monitor_new_content else False)
    payload = {content_id_key: content.get(content_id_key), 'qualityProfileId': int((instance_profile_id or content.get('qualityProfileId'))), 'monitored': monitored, 'rootFolderPath': instance_path, 'images': images}
    add_options = content.get('addOptions', {})
    search_missing = (True if auto_search else False)
    if is_sonarr:
        payload['title'] = content.get('title')
        payload['titleSlug'] = content.get('titleSlug')
        payload['seasons'] = content.get('seasons')
        payload['year'] = content.get('year')
        payload['tvRageId'] = content.get('tvRageId')
        payload['seasonFolder'] = content.get('seasonFolder')
        payload['languageProfileId'] = (instance_language_id if instance_language_id else content.get('languageProfileId'))
        payload['tags'] = content.get('tags')
        payload['seriesType'] = content.get('seriesType')
        payload['useSceneNumbering'] = content.get('useSceneNumbering')
        payload['addOptions'] = {**add_options, **{'searchForMissingEpisodes': search_missing}}
    elif is_radarr:
        payload['title'] = content.get('title')
        payload['year'] = content.get('year')
        payload['tmdbId'] = content.get('tmdbId')
        payload['titleSlug'] = content.get('titleSlug')
        payload['addOptions'] = {**add_options, **{'searchForMovie': search_missing}}
    elif is_lidarr:
        payload['artistName'] = content.get('artistName')
        payload['albumFolder'] = content.get('albumFolder')
        payload['metadataProfileId'] = content.get('metadataProfileId')
        payload['addOptions'] = {**add_options, **{'monitored': monitored, 'searchForMissingAlbums': search_missing}}
    logger.debug(payload)
    return payload
gets details of a content item
def get_content_details(content, instance_path, instance_profile_id, instance_url, instance_language_id=None):
    
    global monitor_new_content, auto_search
    images = content.get('images')
    for image in images:
        image['url'] = '{0}{1}'.format(instance_url, image.get('url'))
    monitored = content.get('monitored')
    if (monitor_new_content is not None):
        monitored = (True if monitor_new_content else False)
    payload = {content_id_key: content.get(content_id_key), 'qualityProfileId': int((instance_profile_id or content.get('qualityProfileId'))), 'monitored': monitored, 'rootFolderPath': instance_path, 'images': images}
    add_options = content.get('addOptions', {})
    search_missing = (True if auto_search else False)
    if is_sonarr:
        payload['title'] = content.get('title')
        payload['titleSlug'] = content.get('titleSlug')
        payload['seasons'] = content.get('seasons')
        payload['year'] = content.get('year')
        payload['tvRageId'] = content.get('tvRageId')
        payload['seasonFolder'] = content.get('seasonFolder')
        payload['languageProfileId'] = (instance_language_id if instance_language_id else content.get('languageProfileId'))
        payload['tags'] = content.get('tags')
        payload['seriesType'] = content.get('seriesType')
        payload['useSceneNumbering'] = content.get('useSceneNumbering')
        payload['addOptions'] = {**add_options, **{'searchForMissingEpisodes': search_missing}}
    elif is_radarr:
        payload['title'] = content.get('title')
        payload['year'] = content.get('year')
        payload['tmdbId'] = content.get('tmdbId')
        payload['titleSlug'] = content.get('titleSlug')
        payload['addOptions'] = {**add_options, **{'searchForMovie': search_missing}}
    elif is_lidarr:
        payload['artistName'] = content.get('artistName')
        payload['albumFolder'] = content.get('albumFolder')
        payload['metadataProfileId'] = content.get('metadataProfileId')
        payload['addOptions'] = {**add_options, **{'monitored': monitored, 'searchForMissingAlbums': search_missing}}
    logger.debug(payload)
    return payload