mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
parent
c737161164
commit
fcd8ef11f4
3 changed files with 48 additions and 33 deletions
|
@ -367,11 +367,10 @@ class DataFactory(object):
|
||||||
|
|
||||||
def get_home_stats(self, grouping=None, time_range=30, stats_type='plays',
|
def get_home_stats(self, grouping=None, time_range=30, stats_type='plays',
|
||||||
stats_start=0, stats_count=10, stat_id='', stats_cards=None,
|
stats_start=0, stats_count=10, stat_id='', stats_cards=None,
|
||||||
section_id=None, user_id=None):
|
section_id=None, user_id=None, before=None, after=None):
|
||||||
monitor_db = database.MonitorDatabase()
|
monitor_db = database.MonitorDatabase()
|
||||||
|
|
||||||
time_range = helpers.cast_to_int(time_range)
|
time_range = helpers.cast_to_int(time_range)
|
||||||
timestamp = helpers.timestamp() - time_range * 24 * 60 * 60
|
|
||||||
|
|
||||||
stats_start = helpers.cast_to_int(stats_start)
|
stats_start = helpers.cast_to_int(stats_start)
|
||||||
stats_count = helpers.cast_to_int(stats_count)
|
stats_count = helpers.cast_to_int(stats_count)
|
||||||
|
@ -382,6 +381,21 @@ class DataFactory(object):
|
||||||
if stats_cards is None:
|
if stats_cards is None:
|
||||||
stats_cards = plexpy.CONFIG.HOME_STATS_CARDS
|
stats_cards = plexpy.CONFIG.HOME_STATS_CARDS
|
||||||
|
|
||||||
|
where_timeframe = ''
|
||||||
|
if before:
|
||||||
|
where_timeframe += "AND strftime('%%Y-%%m-%%d', datetime(started, 'unixepoch', 'localtime')) <= '%s' " % before
|
||||||
|
if not after:
|
||||||
|
timestamp = helpers.YMD_to_timestamp(before) - time_range * 24 * 60 * 60
|
||||||
|
where_timeframe += "AND session_history.stopped >= %s " % timestamp
|
||||||
|
if after:
|
||||||
|
where_timeframe += "AND strftime('%%Y-%%m-%%d', datetime(started, 'unixepoch', 'localtime')) >= '%s' " % after
|
||||||
|
if not before:
|
||||||
|
timestamp = helpers.YMD_to_timestamp(after) + time_range * 24 * 60 * 60
|
||||||
|
where_timeframe += "AND session_history.stopped <= %s " % timestamp
|
||||||
|
if not (before and after):
|
||||||
|
timestamp = helpers.timestamp() - time_range * 24 * 60 * 60
|
||||||
|
where_timeframe += "AND session_history.stopped >= %s" % timestamp
|
||||||
|
|
||||||
where_id = ''
|
where_id = ''
|
||||||
if section_id:
|
if section_id:
|
||||||
where_id += 'AND session_history.section_id = %s ' % section_id
|
where_id += 'AND session_history.section_id = %s ' % section_id
|
||||||
|
@ -404,13 +418,12 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s " \
|
" WHERE session_history.media_type = 'movie' %s %s " \
|
||||||
" AND session_history.media_type = 'movie' %s " \
|
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"GROUP BY shm.full_title, shm.year " \
|
"GROUP BY shm.full_title, shm.year " \
|
||||||
"ORDER BY %s DESC, sh.started DESC " \
|
"ORDER BY %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe, where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_movies: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_movies: %s." % e)
|
||||||
|
@ -457,13 +470,12 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s " \
|
" WHERE session_history.media_type = 'movie' %s %s " \
|
||||||
" AND session_history.media_type = 'movie' %s " \
|
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"GROUP BY shm.full_title, shm.year " \
|
"GROUP BY shm.full_title, shm.year " \
|
||||||
"ORDER BY users_watched DESC, %s DESC, sh.started DESC " \
|
"ORDER BY users_watched DESC, %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe, where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: popular_movies: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: popular_movies: %s." % e)
|
||||||
|
@ -509,13 +521,12 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s " \
|
" WHERE session_history.media_type = 'episode' %s %s " \
|
||||||
" AND session_history.media_type = 'episode' %s " \
|
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"GROUP BY shm.grandparent_title " \
|
"GROUP BY shm.grandparent_title " \
|
||||||
"ORDER BY %s DESC, sh.started DESC " \
|
"ORDER BY %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe, where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_tv: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_tv: %s." % e)
|
||||||
|
@ -564,13 +575,12 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s " \
|
" WHERE session_history.media_type = 'episode' %s %s " \
|
||||||
" AND session_history.media_type = 'episode' %s " \
|
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"GROUP BY shm.grandparent_title " \
|
"GROUP BY shm.grandparent_title " \
|
||||||
"ORDER BY users_watched DESC, %s DESC, sh.started DESC " \
|
"ORDER BY users_watched DESC, %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe, where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: popular_tv: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: popular_tv: %s." % e)
|
||||||
|
@ -615,13 +625,12 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s " \
|
" WHERE session_history.media_type = 'track' %s %s " \
|
||||||
" AND session_history.media_type = 'track' %s " \
|
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"GROUP BY shm.original_title, shm.grandparent_title " \
|
"GROUP BY shm.original_title, shm.grandparent_title " \
|
||||||
"ORDER BY %s DESC, sh.started DESC " \
|
"ORDER BY %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe, where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_music: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_music: %s." % e)
|
||||||
|
@ -669,13 +678,12 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s " \
|
" WHERE session_history.media_type = 'track' %s %s " \
|
||||||
" AND session_history.media_type = 'track' %s " \
|
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"GROUP BY shm.original_title, shm.grandparent_title " \
|
"GROUP BY shm.original_title, shm.grandparent_title " \
|
||||||
"ORDER BY users_watched DESC, %s DESC, sh.started DESC " \
|
"ORDER BY users_watched DESC, %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe, where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: popular_music: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: popular_music: %s." % e)
|
||||||
|
@ -726,14 +734,14 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s %s " \
|
" WHERE %s %s " \
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"LEFT OUTER JOIN (SELECT * FROM library_sections WHERE deleted_section = 0) " \
|
"LEFT OUTER JOIN (SELECT * FROM library_sections WHERE deleted_section = 0) " \
|
||||||
" AS ls ON sh.section_id = ls.section_id " \
|
" AS ls ON sh.section_id = ls.section_id " \
|
||||||
"GROUP BY sh.section_id " \
|
"GROUP BY sh.section_id " \
|
||||||
"ORDER BY %s DESC, sh.started DESC " \
|
"ORDER BY %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe[4:], where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_libraries: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_libraries: %s." % e)
|
||||||
|
@ -815,13 +823,13 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s %s " \
|
" WHERE %s %s " \
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"LEFT OUTER JOIN users AS u ON sh.user_id = u.user_id " \
|
"LEFT OUTER JOIN users AS u ON sh.user_id = u.user_id " \
|
||||||
"GROUP BY sh.user_id " \
|
"GROUP BY sh.user_id " \
|
||||||
"ORDER BY %s DESC, sh.started DESC " \
|
"ORDER BY %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe[4:], where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_users: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_users: %s." % e)
|
||||||
|
@ -884,11 +892,11 @@ class DataFactory(object):
|
||||||
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
" (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) " \
|
||||||
" AS d " \
|
" AS d " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" WHERE session_history.stopped >= %s %s " \
|
" WHERE %s %s " \
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"GROUP BY sh.platform " \
|
"GROUP BY sh.platform " \
|
||||||
"ORDER BY %s DESC, sh.started DESC " \
|
"ORDER BY %s DESC, sh.started DESC " \
|
||||||
"LIMIT %s OFFSET %s " % (timestamp, where_id, group_by, sort_type, stats_count, stats_start)
|
"LIMIT %s OFFSET %s " % (where_timeframe[4:], where_id, group_by, sort_type, stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_platforms: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_home_stats: top_platforms: %s." % e)
|
||||||
|
@ -978,9 +986,8 @@ class DataFactory(object):
|
||||||
" (CASE WHEN duration IS NULL THEN 1.0 ELSE duration * 1.0 END) AS _duration " \
|
" (CASE WHEN duration IS NULL THEN 1.0 ELSE duration * 1.0 END) AS _duration " \
|
||||||
" FROM session_history " \
|
" FROM session_history " \
|
||||||
" JOIN session_history_metadata ON session_history_metadata.id = session_history.id " \
|
" JOIN session_history_metadata ON session_history_metadata.id = session_history.id " \
|
||||||
" WHERE session_history.stopped >= %s " \
|
" WHERE (session_history.media_type = 'movie' " \
|
||||||
" AND (session_history.media_type = 'movie' " \
|
" OR session_history.media_type = 'episode') %s %s " \
|
||||||
" OR session_history.media_type = 'episode') %s " \
|
|
||||||
" GROUP BY %s) AS sh " \
|
" GROUP BY %s) AS sh " \
|
||||||
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
"JOIN session_history_metadata AS shm ON shm.id = sh.id " \
|
||||||
"LEFT OUTER JOIN users AS u ON sh.user_id = u.user_id " \
|
"LEFT OUTER JOIN users AS u ON sh.user_id = u.user_id " \
|
||||||
|
@ -988,7 +995,7 @@ class DataFactory(object):
|
||||||
"GROUP BY sh.id " \
|
"GROUP BY sh.id " \
|
||||||
"ORDER BY last_watch DESC " \
|
"ORDER BY last_watch DESC " \
|
||||||
"LIMIT %s OFFSET %s" % (watched_threshold,
|
"LIMIT %s OFFSET %s" % (watched_threshold,
|
||||||
timestamp, where_id, group_by, watched_where,
|
where_timeframe, where_id, group_by, watched_where,
|
||||||
stats_count, stats_start)
|
stats_count, stats_start)
|
||||||
result = monitor_db.select(query)
|
result = monitor_db.select(query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -1076,7 +1083,7 @@ class DataFactory(object):
|
||||||
base_query = "SELECT sh.started, sh.stopped " \
|
base_query = "SELECT sh.started, sh.stopped " \
|
||||||
"FROM session_history AS sh " \
|
"FROM session_history AS sh " \
|
||||||
"JOIN session_history_media_info AS shmi ON sh.id = shmi.id " \
|
"JOIN session_history_media_info AS shmi ON sh.id = shmi.id " \
|
||||||
"WHERE sh.stopped >= %s " % timestamp
|
"WHERE %s " % where_timeframe[4:].replace('session_history.', 'sh.')
|
||||||
|
|
||||||
title = 'Concurrent Streams'
|
title = 'Concurrent Streams'
|
||||||
query = base_query
|
query = base_query
|
||||||
|
|
|
@ -238,6 +238,10 @@ def now(sep=False):
|
||||||
return timestamp_to_YMDHMS(timestamp(), sep=sep)
|
return timestamp_to_YMDHMS(timestamp(), sep=sep)
|
||||||
|
|
||||||
|
|
||||||
|
def YMD_to_timestamp(ymd):
|
||||||
|
return datetime.strptime(ymd, "%Y-%m-%d").timestamp()
|
||||||
|
|
||||||
|
|
||||||
def timestamp_to_YMDHMS(ts, sep=False):
|
def timestamp_to_YMDHMS(ts, sep=False):
|
||||||
dt = timestamp_to_datetime(ts)
|
dt = timestamp_to_datetime(ts)
|
||||||
if sep:
|
if sep:
|
||||||
|
|
|
@ -6283,7 +6283,7 @@ class WebInterface(object):
|
||||||
@addtoapi()
|
@addtoapi()
|
||||||
def get_home_stats(self, grouping=None, time_range=30, stats_type='plays',
|
def get_home_stats(self, grouping=None, time_range=30, stats_type='plays',
|
||||||
stats_start=0, stats_count=10, stat_id='',
|
stats_start=0, stats_count=10, stat_id='',
|
||||||
section_id=None, user_id=None, **kwargs):
|
section_id=None, user_id=None, before=None, after=None, **kwargs):
|
||||||
""" Get the homepage watch statistics.
|
""" Get the homepage watch statistics.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -6301,6 +6301,8 @@ class WebInterface(object):
|
||||||
'top_users', 'top_platforms', 'last_watched', 'most_concurrent'
|
'top_users', 'top_platforms', 'last_watched', 'most_concurrent'
|
||||||
section_id (int): The id of the Plex library section
|
section_id (int): The id of the Plex library section
|
||||||
user_id (int): The id of the Plex user
|
user_id (int): The id of the Plex user
|
||||||
|
before (str): Stats before and including the date, "YYYY-MM-DD"
|
||||||
|
after (str): Stats after and including the date, "YYYY-MM-DD"
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
json:
|
json:
|
||||||
|
@ -6384,7 +6386,9 @@ class WebInterface(object):
|
||||||
stats_count=stats_count,
|
stats_count=stats_count,
|
||||||
stat_id=stat_id,
|
stat_id=stat_id,
|
||||||
section_id=section_id,
|
section_id=section_id,
|
||||||
user_id=user_id)
|
user_id=user_id,
|
||||||
|
before=before,
|
||||||
|
after=after)
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue