'Get the data on the PlexPy media info tables.
Required parameters:
section_id (str):               The id of the Plex library section, OR
rating_key (str):               The grandparent or parent rating key
Optional parameters:
section_type (str):             "movie", "show", "artist", "photo"
order_column (str):             "added_at", "title", "container", "bitrate", "video_codec",
"video_resolution", "video_framerate", "audio_codec", "audio_channels",
"file_size", "last_played", "play_count"
order_dir (str):                "desc" or "asc"
start (int):                    Row to start from, 0
length (int):                   Number of items to return, 25
search (str):                   A string to search for, "Thrones"
Returns:
json:
{"draw": 1,
"recordsTotal": 82,
"recordsFiltered": 82,
"filtered_file_size": 2616760056742,
"total_file_size": 2616760056742,
"data":
[{"added_at": "1403553078",
"audio_channels": "",
"audio_codec": "",
"bitrate": "",
"container": "",
"file_size": 253660175293,
"grandparent_rating_key": "",
"last_played": 1462380698,
"media_index": "1",
"media_type": "show",
"parent_media_index": "",
"parent_rating_key": "",
"play_count": 15,
"rating_key": "1219",
"section_id": 2,
"section_type": "show",
"thumb": "/library/metadata/1219/thumb/1436265995",
"title": "Game of Thrones",
"video_codec": "",
"video_framerate": "",
"video_resolution": "",
"year": "2011"'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of('admin'))
@addtoapi()
def get_library_media_info(self, section_id=None, section_type=None, rating_key=None, refresh='', **kwargs):

    if (not kwargs.get('json_data')):
        dt_columns = [('added_at', True, False), ('title', True, True), ('container', True, True), ('bitrate', True, True), ('video_codec', True, True), ('video_resolution', True, True), ('video_framerate', True, True), ('audio_codec', True, True), ('audio_channels', True, True), ('file_size', True, False), ('last_played', True, False), ('play_count', True, False)]
        kwargs['json_data'] = build_datatables_json(kwargs, dt_columns, 'title')
    if (refresh == 'true'):
        refresh = True
    else:
        refresh = False
    library_data = libraries.Libraries()
    result = library_data.get_datatables_media_info(section_id=section_id, section_type=section_type, rating_key=rating_key, refresh=refresh, kwargs=kwargs)
    return result
