mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 07:22:37 -07:00
Only show IPv4 addresses
This commit is contained in:
parent
b8d9c8cc47
commit
10c54c2d10
2 changed files with 23 additions and 23 deletions
|
@ -286,16 +286,16 @@ class ActivityProcessor(object):
|
|||
# The logged IP will always be the first match and we don't want localhost entries
|
||||
if ipv4[0] != '127.0.0.1':
|
||||
# check if IPv4 mapped IPv6 address (::ffff:xxx.xxx.xxx.xxx)
|
||||
if '::ffff:' + ipv4[0] in line:
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s "
|
||||
u"and machineIdentifier %s."
|
||||
% ('::ffff:' + ipv4[0], rating_key, machine_id))
|
||||
return '::ffff:' + ipv4[0]
|
||||
else:
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s "
|
||||
u"and machineIdentifier %s."
|
||||
% (ipv4[0], rating_key, machine_id))
|
||||
return ipv4[0]
|
||||
#if '::ffff:' + ipv4[0] in line:
|
||||
# logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s "
|
||||
# u"and machineIdentifier %s."
|
||||
# % ('::ffff:' + ipv4[0], rating_key, machine_id))
|
||||
# return '::ffff:' + ipv4[0]
|
||||
#else:
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s "
|
||||
u"and machineIdentifier %s."
|
||||
% (ipv4[0], rating_key, machine_id))
|
||||
return ipv4[0]
|
||||
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Unable to find IP address on first pass. "
|
||||
u"Attempting fallback check in 5 seconds...")
|
||||
|
@ -315,14 +315,14 @@ class ActivityProcessor(object):
|
|||
if ipv4:
|
||||
# The logged IP will always be the first match and we don't want localhost entries
|
||||
if ipv4[0] != '127.0.0.1':
|
||||
if '::ffff:' + ipv4[0] in line:
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s." %
|
||||
('::ffff:' + ipv4[0], rating_key))
|
||||
return '::ffff:' + ipv4[0]
|
||||
else:
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s." %
|
||||
(ipv4[0], rating_key))
|
||||
return ipv4[0]
|
||||
#if '::ffff:' + ipv4[0] in line:
|
||||
# logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s." %
|
||||
# ('::ffff:' + ipv4[0], rating_key))
|
||||
# return '::ffff:' + ipv4[0]
|
||||
#else:
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Matched IP address (%s) for stream ratingKey %s." %
|
||||
(ipv4[0], rating_key))
|
||||
return ipv4[0]
|
||||
|
||||
logger.debug(u"PlexPy ActivityProcessor :: Unable to find IP address on fallback search. Not logging IP address.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue