Code Monkey home page Code Monkey logo

plexautoskip's Introduction

Hi there 👋

plexautoskip's People

Contributors

mdhiggins avatar pugson avatar shanarys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

plexautoskip's Issues

AlertListener error detected, you may need to update your version of PlexAPI

Just finished setting this up but it keeps repeatedly saying

ERROR - AlertListener error detected, you may need to update your version of PlexAPI, attempting backwards compatibility

I tried using a fresh browser to sign into plex to get the API token and I've tested the API key on other programs that work fine

Reoccuring Error

I had this reoccurring error show up in the logs and I'm unsure if it causes any issues as the intros still seem to be skipped.

ERROR - Unexpected error getting data from session alert
Traceback (most recent call last):
  File "/Applications/Plex Scripts/Apps/PlexAutoSkip/resources/skipper.py", line 315, in processAlert
    self.media_sessions[sessionKey].updateOffset(media.viewOffset, seeking=False, state=state)
  File "/Applications/Plex Scripts/Apps/PlexAutoSkip/resources/mediaWrapper.py", line 223, in updateOffset
    self.log.debug("Updating session %s viewOffset %d, old %d, diff %d (%ds since last update)" % (self, offset, self.viewOffset, (offset - self.viewOffset), (datetime.now() - self.lastUpdate).total_seconds()))
  File "/Applications/Plex Scripts/Apps/PlexAutoSkip/resources/mediaWrapper.py", line 213, in viewOffset
    return vo if vo <= self.media.duration else self.media.duration
TypeError: '<=' not supported between instances of 'int' and 'NoneType'

This is with Python 3.9.13 and the latest release of PlexAutoSkip as July 4. This error loops as video plays on the Plex server.

Downloaded episodes aren't detected

When you download an episode on your ipad and play the media from the downloads, it's not detected by the software and the auto skip doesn't work. On the exact same device it works fine if you're streaming an episode.

Recurring error on startup - 'socket' object has no attribute 'pending'

Starting to see this on startup lately, only started happening in the last couple of days, and repeats over and over.

today at 9:22:14 PMINFO - Connected to Plex server XXXXX using server settings
today at 9:22:31 PMINFO - Skipper initiated and ready
today at 9:22:31 PMWARNING - websocket connected
today at 9:22:31 PMERROR - 'socket' object has no attribute 'pending'
today at 9:22:31 PMINFO - websocket disconnected (retrying in 5 seconds) [6 frames in stack]
today at 9:22:31 PMException in thread Thread-1:
today at 9:22:31 PMTraceback (most recent call last):
today at 9:22:31 PM  File "/usr/local/pas/venv/lib/python3.9/site-packages/websocket/_app.py", line 354, in setSock
today at 9:22:31 PM    dispatcher.read(self.sock.sock, read, check)
today at 9:22:31 PM  File "/usr/local/pas/venv/lib/python3.9/site-packages/websocket/_app.py", line 70, in read
today at 9:22:31 PM    r = self.select()
today at 9:22:31 PM  File "/usr/local/pas/venv/lib/python3.9/site-packages/websocket/_app.py", line 78, in select
today at 9:22:31 PM    if sock.pending():
today at 9:22:31 PMAttributeError: 'socket' object has no attribute 'pending'
today at 9:22:31 PM
today at 9:22:31 PMDuring handling of the above exception, another exception occurred:
today at 9:22:31 PM
today at 9:22:31 PMTraceback (most recent call last):
today at 9:22:31 PM  File "/usr/lib/python3.9/threading.py", line 980, in _bootstrap_inner
today at 9:22:31 PM    self.run()
today at 9:22:31 PM  File "/usr/local/pas/resources/sslAlertListener.py", line 37, in run
today at 9:22:31 PM    self._ws.run_forever(sslopt=self._sslopt)
today at 9:22:31 PM  File "/usr/local/pas/venv/lib/python3.9/site-packages/websocket/_app.py", line 420, in run_forever
today at 9:22:31 PM    setSock()
today at 9:22:31 PM  File "/usr/local/pas/venv/lib/python3.9/site-packages/websocket/_app.py", line 356, in setSock
today at 9:22:31 PM    handleDisconnect(e)
today at 9:22:31 PM  File "/usr/local/pas/venv/lib/python3.9/site-packages/websocket/_app.py", line 407, in handleDisconnect
today at 9:22:31 PM    dispatcher.timeout(reconnect, setSock)
today at 9:22:31 PMAttributeError: 'SSLDispatcher' object has no attribute 'timeout'
today at 9:22:32 PMWARNING - websocket connected

fails to skip for roku client

Here is a relevant part of the logs. It finds the intro but is unable to skip.

INFO - Found an intro marker for media 40 [19134] (It's Always Sunny in Philadelphia s01e06 - The Gang Finds A Dead Guy) Living room with range 64890-88235 and viewOffset 65122
ERROR - Error seeking
Traceback (most recent call last):
  File "/usr/local/pas/resources/introSkipper.py", line 140, in checkPlayerForMedia
    return not player.timeline or (player.isPlayingMedia(False) and player.timeline.key == media.key)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 584, in timeline
    return next((x for x in self.timelines() if x.state != 'stopped'), None)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 576, in timelines
    timelines = self.sendCommand(ClientTimeline.key, wait=wait) or []
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 231, in sendCommand
    return query(key, headers=headers)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/server.py", line 669, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; https://192-168-2-95.8b9e77ceda2941d3a1bd538fe151daba.plex.direct:32400/player/timeline/poll?commandID=1&wait=0 <?xml version='1.0' encoding='utf-8'?> <Response code="2000" status="FrameworkException: Unable to find player with identifier 41c403359976dbcfb82f6c700be4534b">   <Traceback>Traceback (most recent call last):   File "/usr/lib/plexmediaserver/Resources/Plug-ins-f11334058/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request     result = f(**d)   File "/usr/lib/plexmediaserver/Resources/Plug-ins-f11334058/System.bundle/Contents/Code/playerservice.py", line 50, in process_remote_command     raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier 41c403359976dbcfb82f6c700be4534b </Traceback> </Response> 
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/connection.py", line 175, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 710, in urlopen
    chunked=chunked,
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.6/http/client.py", line 1285, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1331, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1280, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1046, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 984, in send
    self.connect()
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/connection.py", line 182, in _new_conn
    % (self.host, self.timeout),
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7f4f725283c8>, 'Connection to 192.168.2.118 timed out. (connect timeout=30)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.6/site-packages/requests/adapters.py", line 450, in send
    timeout=timeout
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 786, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/pas/venv/lib/python3.6/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.2.118', port=32500): Max retries exceeded with url: /resources (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f4f725283c8>, 'Connection to 192.168.2.118 timed out. (connect timeout=30)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/pas/resources/introSkipper.py", line 104, in seekTo
    if self.checkPlayerForMedia(player, mediaWrapper.media):
  File "/usr/local/pas/resources/introSkipper.py", line 149, in checkPlayerForMedia
�
    raise(e)
  File "/usr/local/pas/resources/introSkipper.py", line 144, in checkPlayerForMedia
    player = self.recoverPlayer(player)
  File "/usr/local/pas/resources/introSkipper.py", line 159, in recoverPlayer
    return PlexClient(self.server, baseurl=baseurl, token=self.server._token)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 81, in __init__
    self.connect(timeout=timeout)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 95, in connect
    data = self.query(self.key, timeout=timeout)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 182, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/requests/sessions.py", line 542, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/requests/sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/requests/sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/requests/adapters.py", line 507, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.2.118', port=32500): Max retries exceeded with url: /resources (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f4f725283c8>, 'Connection to 192.168.2.118 timed out. (connect timeout=30)'))

Custom Offset Per Show (With Detected Intro)

There are some shows, such as OnePiece, that Plex Pass detects the intro for, but it doesn't detect the entire intro. There is approximately a 1.5 minute intro, which Plex / this skips automatically, but then it goes into this, which is always right after the intro skip which is another .5min:

https://www.youtube.com/watch?v=ZB8glS-FKjM

Is there a way to set an additional +30s skip for this show, regardless of when the intro actually starts? I took a look through the custom examples, but a little confused with how they work. I believe I would use something like this:

"offsets": {
    "tmdb://37854: {
        "start": 2000,
        "end": 30000
    }
}

If I understand the above, the 'start' will be automatically skip 2000ms after the 'Skip Intro' displays and then will also go 30000ms after the 'end' of the intro, which should be an additional +30s in this case?

Button Noise When Auto-Skipping

Commit: [ea37bfe]
Plex Client: Native Plex Client on nVidia Shield 8.2.3
Plex Server: Windows 10, 64 bit. 1.31.2.6810

This has been occurring for the last few versions now, but as soon as the 'Skip Intro' button comes up, whether it's set to Auto-Skip or not, the nVidia sheild is making the 'button' noise as if you are pressing the OK button. It can make this noise 10-15 times before the auto-skip skips, or seemingly indefinitely if you don't have auto-skip enabled.

I've not changed anything with volume settings, though I know that is a feature to mute the intro.

Has anyone else experienced this or have any troubleshooting steps?

Disable intro/credit auto skip for first episode in current watch session.

This is so when you are binge watching a series, the intro/credits play on the first episode, but is auto skipped for the remainder of that session. I'm thinking if nothing from that series was played in the past 2 hours, it won't auto skip.

This is similar to the existing premier skips already in the script, but on a session by session basis. Is this possible?

AppleTV 4K errors out

I've gone through all of the troubleshooting and applied the listed fixes to no avail. It does work on my iPad.
This is the error i get

INFO - Found new session 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 viewOffset 0 Raazer, sessions: 0
INFO - Found skippable marker intro for media 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 with range 143874-173172 and viewOffset 144357
INFO - Seeking Plex for Apple TV player playing 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 from 144357 to 173172
ERROR - Forbidden Error, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting#forbidden-error
INFO - Seeking Plex for Apple TV player playing 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 from 144357 to 173172
ERROR - BadRequest exception seekPlayerTo, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting
Traceback (most recent call last):
  File "E:\copy\plexautoskip-master\resources\skipper.py", line 239, in seekPlayerTo
    mediaWrapper.seekTo(targetOffset, player)
  File "E:\copy\plexautoskip-master\resources\mediaWrapper.py", line 319, in seekTo
    player.seekTo(offset)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 377, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 232, in sendCommand
    return query(key, headers=headers)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\server.py", line 755, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; https://192.168.1.169:32400/player/playback/seekTo?commandID=1&offset=173172&type=video <?xml version='1.0' encoding='utf-8'?> <Response code="2000" status="HTTPError: ">   <Traceback>Traceback (most recent call last):   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request     result = f(**d)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\System.bundle\Contents\Code\playerservice.py", line 38, in process_remote_command     headers=Request.Headers)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\networkkit.py", line 194, in Request     method=method,   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\networkkit.py", line 67, in _http_request     req = self._core.networking.http_request(url, *args, **kwargs)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 346, in http_request     return HTTPRequest(self._core, url, data, h, url_cache, encoding, errors, timeout, immediate, sleep, opener, follow_redirects, method)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 118, in __init__     self.load()   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 158, in load     f = self._opener.open(req, timeout=self._timeout)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 435, in open     response = meth(req, response)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 548, in http_response     'http', request, response, code, msg, hdrs)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 473, in error     return self._call_chain(*args)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 407, in _call_chain     result = func(*args)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 556, in http_error_default     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 403: Forbidden </Traceback> </Response>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\copy\plexautoskip-master\resources\skipper.py", line 239, in seekPlayerTo
    mediaWrapper.seekTo(targetOffset, player)
  File "E:\copy\plexautoskip-master\resources\mediaWrapper.py", line 319, in seekTo
    player.seekTo(offset)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 377, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 232, in sendCommand
    return query(key, headers=headers)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 194, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (403) forbidden; http://192.168.1.56:32500/player/playback/seekTo?commandID=2&offset=173172&type=video

Windows Roku TV "No Playable Items" and PlexAutoSkip: IndexError: list index out of range

Hi @mdhiggins

I'm running the Plex app version: 7.6 Build 1 on a Roku TV, and PMS on Windows Version: 1.32.5.7349
With the latest commits and PlexAPI version 4.15 for python.

Sometimes content skips correctly and other times it fails all together with the below error in AutoSkip:

INFO - Websocket connected
INFO - Found new session 1 [12362] (Modern Family s06e02 - Do Not Push) 55 Hisense Roku TV|49cea2b26a36823910c6a87cc6058375 viewOffset 0 ExtremeFiretop on Plex for Roku (proxying: False), sessions: 0
INFO - Found ended session 1 [12362] (Modern Family s06e02 - Do Not Push) 55 Hisense Roku TV|49cea2b26a36823910c6a87cc6058375 that has reached the end of its duration 1298304 with viewOffset 1297000 with skip-next enabled, will skip to next
ERROR -
Traceback (most recent call last):
File "C:\Program Files\MKVToolNix\Custom Scripts\PlexAutoSkip-master\resources\skipper.py", line 275, in skipPlayerTo
current = PlayQueue.get(self.server, mediaWrapper.playQueueID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 133, in get
c = cls(server, data, initpath=path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\base.py", line 62, in init
self._loadData(data)
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 66, in _loadData
self.selectedItem = self[self.playQueueSelectedItemOffset]
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 71, in getitem
return self.items[key]
~~~~~~~~~~^^^^^
IndexError: list index out of range
ERROR - Unable to create new PlayQueue for 1 [12362] (Modern Family s06e02 - Do Not Push) 55 Hisense Roku TV|49cea2b26a36823910c6a87cc6058375
Traceback (most recent call last):
File "C:\Program Files\MKVToolNix\Custom Scripts\PlexAutoSkip-master\resources\skipper.py", line 275, in skipPlayerTo
current = PlayQueue.get(self.server, mediaWrapper.playQueueID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 133, in get
c = cls(server, data, initpath=path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\base.py", line 62, in init
self._loadData(data)
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 66, in _loadData
self.selectedItem = self[self.playQueueSelectedItemOffset]
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 71, in getitem
return self.items[key]
~~~~~~~~~~^^^^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\MKVToolNix\Custom Scripts\PlexAutoSkip-master\resources\skipper.py", line 296, in skipPlayerTo
pq = PlayQueue.create(server, episodes, startItem)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 190, in create
c = cls(server, data, initpath=path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\base.py", line 62, in init
self._loadData(data)
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 66, in _loadData
self.selectedItem = self[self.playQueueSelectedItemOffset]
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joel\AppData\Roaming\Python\Python311\site-packages\plexapi\playqueue.py", line 71, in getitem
return self.items[key]
~~~~~~~~~~^^^^^
IndexError: list index out of range

and this error on the TV: No playable items

367921919_1031103921400914_7831245129902098444_n

Other times in the same series, same season on the same TV, it works and skips the 15 second countdown at the end.
I know this has been brought up once before here: #44

And I tried all the relevant troubleshooting I can think of...

  1. Restarting the Plex server
  2. Restarting the player TV
  3. Signing out and back into the Roku player app
  4. Resetting the Plex Server cache,
  5. Updating my Plex Token
  6. Even resetting the Plex Server DataBase and letting it rebuild from scratch after cache was wiped
  7. Updating python
  8. Updating Plex API all to the latest versions.
  9. Disabled Network DDOS protection on the firewall, etc...

The weird thing is, on another different TV on my network (A 2017 Samsung running Tizen OS) and Plex app version: 5.32.1 and it won't give the "No playable items" if the AutoSkip fails with this error, it simply counts down at the end as usual and then starts up the next episode, but on the Roku when it fails, it always gives the "No playable items" and I have to get the remote and click okay and select the next episode manually.

I'm at a loss why my Roku will randomly throw these errors and stop working, any ideas would be appreciated in this regard...

Here is the config file, it's all pretty default except the credentials left out:

[Server]
address = 127.0.0.1
ssl = False
port = 32400

[Security]
ignore-certs = True

[Skip]
tags = intro, commercial, advertisement
last-chapter = 0.0
unwatched = True
first-episode-series = Watched
first-episode-season = Always
next = True
mode = skip
types = movie, episode
ignored-libraries =
first-safe-tags =

[Offsets]
start = 3000
end = 1000
duration = 0
command = 500
tags = intro

[Binge]
ignore-skip-for = 0
safe-tags =
same-show-only = False
skip-next-max = 0

[Volume]
low = 0
high = 100

Offsets not working

I tried changing it, restarting the container each time but it doesn't do anything. Changing other things in the config does work however. Same issue everywhere the skip intro works.

Log:

2023-02-19 13:37:56 - __main__ - INFO - /usr/local/pas/venv/bin/python3
2023-02-19 13:37:56 - __main__ - DEBUG - Loading default config file.
2023-02-19 13:37:56 - __main__ - INFO - Loading config file /usr/local/pas/config/config.ini.
2023-02-19 13:37:56 - __main__ - INFO - Loading custom JSON file /usr/local/pas/config/custom.json
2023-02-19 13:37:56 - __main__ - INFO - Connecting to Plex server...
2023-02-19 13:37:59 - __main__ - INFO - Connected to Plex server Q using plex.tv account
2023-02-19 13:37:59 - __main__ - DEBUG - Connected to server using plex.tv account, ignoring manual server settings
2023-02-19 13:37:59 - __main__ - DEBUG - IntroSeeker init with leftOffset 3000 rightOffset 1000
2023-02-19 13:37:59 - __main__ - DEBUG - Operating in MODE_TYPES.SKIP mode
2023-02-19 13:37:59 - __main__ - DEBUG - Skip tags ['intro', 'commercial', 'advertisement', 'credits']
2023-02-19 13:37:59 - __main__ - DEBUG - Skip S01E01 SKIP_TYPES.NEVER
2023-02-19 13:37:59 - __main__ - DEBUG - Skip S**E01 SKIP_TYPES.NEVER
2023-02-19 13:37:59 - __main__ - DEBUG - Skip last chapter 0.0
2023-02-19 13:37:59 - __main__ - INFO - Skipper initiated and ready
2023-02-19 13:37:59 - __main__ - DEBUG - Starting listener
2023-02-19 13:37:59 - websocket - INFO - Websocket connected
2023-02-19 13:38:03 - __main__ - INFO - Found new session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 viewOffset 32836 StoneColeQ, sessions: 0
2023-02-19 13:38:03 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [buffering] viewOffset 32836, old 32836, diff 0ms (0s since last update)
2023-02-19 13:38:03 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [playing] viewOffset 32836, old 32836, diff 0ms (0s since last update)
2023-02-19 13:38:07 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [playing] viewOffset 38038, old 37621, diff 417ms (4s since last update)
2023-02-19 13:38:13 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [playing] viewOffset 43293, old 43302, diff -9ms (5s since last update)
2023-02-19 13:38:18 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [playing] viewOffset 48589, old 48582, diff 7ms (5s since last update)
2023-02-19 13:38:23 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [playing] viewOffset 53845, old 53844, diff 1ms (5s since last update)
2023-02-19 13:38:28 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [playing] viewOffset 58849, old 58843, diff 6ms (4s since last update)
2023-02-19 13:38:29 - __main__ - INFO - Found skippable marker intro for media 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 with range 59176-91454 and viewOffset 59571
2023-02-19 13:38:29 - __main__ - INFO - Seeking Plex for iOS player playing 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 from 59580 to 91454
2023-02-19 13:38:29 - __main__ - DEBUG - Recent seek successful, server offset update 91454 meets/exceeds target 91000 [buffering]
2023-02-19 13:38:29 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [buffering] viewOffset 91454, old 91643, diff -189ms (0s since last update)
2023-02-19 13:38:29 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [playing] viewOffset 91454, old 91454, diff 0ms (0s since last update)
2023-02-19 13:38:32 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [paused] viewOffset 94595, old 94820, diff -225ms (3s since last update)
2023-02-19 13:38:52 - __main__ - DEBUG - Updating session 14 [2036] (Big Mouth s01e02 - Everybody Bleeds) iPhone|DB48BC9E-AB7C-405B-99A4-AEFA4212F219 [paused] viewOffset 94595, old 94595, diff 0ms (19s since last update)

Config:

ssl = True
port = 32400

[Security]
ignore-certs = False

[Skip]
mode = skip
tags = intro, commercial, advertisement, credits
types = movie, episode
ignored-libraries = Shadowplay
last-chapter = 0.0
unwatched = True
first-episode-series = Never
first-episode-season = Never
next = True

[Offsets]
start = 3000
end = 1000
command = 500
tags = intro

[Volume]
low = 0
high = 100

Also it seems to error out when trying to skip on the plex app for Chromecast with GoogleTV. Same logs as this

[FR]: Option to not auto-skip on S01E01

When I start watching a whole new show from the start, I want to watch the intro the very first time it's played, so it would be nice if that could be an option.

Chromecast skipping

I've had success using your project for skipping an intro when playing something on my iPhone, but not if I'm chromecasting it.

(I also can't make it work the web client on Safari, getting bad requests but none of the troubleshooting instructions helped, unfortunately)

Logs:

INFO - Found new session 26 [2085] (Star Trek s01e15 - Shore Leave) Chromecast viewOffset 0 ['jeromegn'], sessions: 0
INFO - Seeking Plex Cast player playing 26 [2085] (Star Trek s01e15 - Shore Leave) Chromecast from 253774 to 253765
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
  File "/home/jerome/PlexAutoSkip/resources/skipper.py", line 226, in seekPlayerTo
    player.seekTo(targetOffset)
  File "/home/jerome/.local/lib/python3.10/site-packages/plexapi/client.py", line 376, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "/home/jerome/.local/lib/python3.10/site-packages/plexapi/client.py", line 231, in sendCommand
    return query(key, headers=headers)
  File "/home/jerome/.local/lib/python3.10/site-packages/plexapi/server.py", line 706, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; https://192-168-1-143.1c9f2570de0944798243bb96a7bae443.plex.direct:32400/player/playback/seekTo?commandID=1&offset=253765&type=video <?xml version='1.0' encoding='utf-8'?> <Response code="2000" status="FrameworkException: Unable to find player with identifier cu8v7az0uxdccztdklv9cseo">   <Traceback>Traceback (most recent call last):   File "/usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request     result = f(**d)   File "/usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/System.bundle/Contents/Code/playerservice.py", line 50, in process_remote_command     raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier cu8v7az0uxdccztdklv9cseo </Traceback> </Response>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f0ca37b0790>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/requests/adapters.py", line 440, in send
    resp = conn.urlopen(
  File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.8', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=2&offset=253765&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0ca37b0790>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jerome/PlexAutoSkip/resources/skipper.py", line 199, in _seekTo
    self.seekPlayerTo(player, mediaWrapper, targetOffset)
  File "/home/jerome/PlexAutoSkip/resources/skipper.py", line 233, in seekPlayerTo
    return self.seekPlayerTo(self.recoverPlayer(player), mediaWrapper, targetOffset)
  File "/home/jerome/PlexAutoSkip/resources/skipper.py", line 226, in seekPlayerTo
    player.seekTo(targetOffset)
  File "/home/jerome/.local/lib/python3.10/site-packages/plexapi/client.py", line 376, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "/home/jerome/.local/lib/python3.10/site-packages/plexapi/client.py", line 231, in sendCommand
    return query(key, headers=headers)
  File "/home/jerome/.local/lib/python3.10/site-packages/plexapi/client.py", line 182, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 542, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.8', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=2&offset=253765&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0ca37b0790>: Failed to establish a new connection: [Errno 111] Connection refused'))

Custom definition option to mute instead of skip?

I am not that familiar with the Plex API, so my apologies if this is not doable.

Would it be possible for you to implement an option for custom defined sections of media to mute, rather than skip?

Error skipping on Fire TV Stick 4K

Recently installed this, it's working great when testing using the HTPC version of Plex on Windows but when testing on my Fire TV Stick (my main device) it doesn't skip at all. Skipper can see the session but as soon as the intro starts I get errors. I've troubleshooted by restarting Plex server and logging out and back into the Fire TV Stick.

C:\Users\sodwy>"C:\Users\sodwy\Documents\PlexAutoSkip\main.py"
INFO - C:\Users\sodwy\AppData\Local\Programs\Python\Python37\python.exe
INFO - Loading config file C:\Users\sodwy\Documents\PlexAutoSkip\config\config.ini.
INFO - Loading custom JSON file C:\Users\sodwy\Documents\PlexAutoSkip\config\custom.json
INFO - Connecting to Plex server...
INFO - Connected to Plex server PLEXSERVER using plex.tv account
INFO - Skipper initiated and ready
WARNING - websocket connected
INFO - Found new session 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android viewOffset 827 shanethegooner, sessions: 0
INFO - Found skippable marker intro for media 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android with range 93621-119938 and viewOffset 94204
INFO - Seeking Plex for Android (TV) player playing 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android from 94204 to 119938
ERROR - BadRequest Error, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting#badrequest-error
INFO - Seeking Plex for Android (TV) player playing 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android from 94204 to 119938
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 247, in seekPlayerTo
mediaWrapper.seekTo(targetOffset, player)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\mediaWrapper.py", line 324, in seekTo
player.seekTo(offset)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 377, in seekTo
self.sendCommand('playback/seekTo', offset=offset, type=mtype)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 232, in sendCommand
return query(key, headers=headers)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\server.py", line 755, in query
raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; https://192-168-50-87.7c730a5c200c4f3b96220f5dcd03c16a.plex.direct:32400/player/playback/seekTo?commandID=1&offset=119938&type=video Traceback (most recent call last): File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-ca0c45ff8\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request result = f(**d) File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-ca0c45ff8\System.bundle\Contents\Code\playerservice.py", line 50, in process_remote_command raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier 27f6a413d526829d-com-plexapp-android

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 221, in _seekTo
self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 255, in seekPlayerTo
return self.seekPlayerTo(self.recoverPlayer(player), mediaWrapper, targetOffset)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 247, in seekPlayerTo
mediaWrapper.seekTo(targetOffset, player)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\mediaWrapper.py", line 324, in seekTo
player.seekTo(offset)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 377, in seekTo
self.sendCommand('playback/seekTo', offset=offset, type=mtype)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 232, in sendCommand
return query(key, headers=headers)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 192, in query
raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; http://192.168.50.19:32500/player/playback/seekTo?commandID=2&offset=11993 &type=video Failure: 404 Not Found
INFO - Found new session 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android viewOffset 95332 shanethegooner, sessions: 0
INFO - Found skippable marker intro for media 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android with range 93621-119938 and viewOffset 95332
INFO - Seeking Plex for Android (TV) player playing 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android from 95344 to 119938
ERROR - BadRequest Error, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting#badrequest-error
INFO - Seeking Plex for Android (TV) player playing 8 [4556] (American Dad! s19e09 - The Curious Case of the Old Hole) AFTKA|27f6a413d526829d-com-plexapp-android from 95344 to 119938
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 247, in seekPlayerTo
mediaWrapper.seekTo(targetOffset, player)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\mediaWrapper.py", line 324, in seekTo
player.seekTo(offset)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 377, in seekTo
self.sendCommand('playback/seekTo', offset=offset, type=mtype)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 232, in sendCommand
return query(key, headers=headers)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\server.py", line 755, in query
raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; https://192-168-50-87.7c730a5c200c4f3b96220f5dcd03c16a.plex.direct:32400/player/playback/seekTo?commandID=1&offset=119938&type=video Traceback (most recent call last): File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-ca0c45ff8\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request result = f(**d) File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-ca0c45ff8\System.bundle\Contents\Code\playerservice.py", line 50, in process_remote_command raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier 27f6a413d526829d-com-plexapp-android

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 221, in _seekTo
self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 255, in seekPlayerTo
return self.seekPlayerTo(self.recoverPlayer(player), mediaWrapper, targetOffset)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\skipper.py", line 247, in seekPlayerTo
mediaWrapper.seekTo(targetOffset, player)
File "C:\Users\sodwy\Documents\PlexAutoSkip\resources\mediaWrapper.py", line 324, in seekTo
player.seekTo(offset)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 377, in seekTo
self.sendCommand('playback/seekTo', offset=offset, type=mtype)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 232, in sendCommand
return query(key, headers=headers)
File "C:\Users\sodwy\AppData\Local\Programs\Python\Python37\lib\site-packages\plexapi\client.py", line 192, in query
raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; http://192.168.50.19:32500/player/playback/seekTo?commandID=2&offset=11993 &type=video Failure: 404 Not Found

Error - Error seeking (Shield Android TV 2017 and 2019) , unable to find player

Works great on web and IOS when tested with 2017 and a 2019 shield tv I got the following error when testing:
Plex Player for 2017 and 2019 shield(9.0): 08.29.0.30180
Plex server : windows 10 , 1.25.3.5409
Tested web and ios and shield with same file to make sure it was not the file. Tried other files as well on shield same result.
I am guessing the plex api just doesn't work with shield? Or maybe due to the big 9.0 (android 11) update to all shields that got pushed yesterday.

INFO - Seeking player SHIELD Android TV playing 78 [56258] (Family Guy s19e16 - Who's Brian Now?) SHIELD Android TV from 29474 to 31678
ERROR - Error seeking
Traceback (most recent call last):
File "L:\PlexAutoSkip\resources\introSkipper.py", line 89, in seekTo
player.seekTo(targetOffset)
File "C:\Python3\lib\site-packages\plexapi\client.py", line 376, in seekTo
self.sendCommand('playback/seekTo', offset=offset, type=mtype)
File "C:\Python3\lib\site-packages\plexapi\client.py", line 231, in sendCommand
return query(key, headers=headers)
File "C:\Python3\lib\site-packages\plexapi\server.py", line 669, in query
raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; https://192-168-1-10.178abf122e274a8e8db03b16517866ac.plex.direct:32400/player/playback/seekTo?commandID=52&offset=30678&type=video Traceback (most recent call last): File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-f11334058\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request result = f(**d) File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-f11334058\System.bundle\Contents\Code\playerservice.py", line 50, in process_remote_command raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier fd40d60186070e4e-com-plexapp-android

PlexAutoSkip doesn't seem to be able to reach/control my players at all

Hello,

I've just installed PlexAutoSkip using your docker container but I can't seem to get it to skip anything. I've tried it on both my Apple TV and iPhone and nothing happens.

Here are the logs:

2022-09-08 18:58:58 - __main__ - INFO - /usr/local/pas/venv/bin/python3
2022-09-08 18:58:58 - __main__ - DEBUG - Loading default config file.
2022-09-08 18:58:58 - __main__ - INFO - Loading config file /usr/local/pas/config/config.ini.
2022-09-08 18:58:58 - __main__ - INFO - Loading custom JSON file /usr/local/pas/config/custom.json
2022-09-08 18:58:58 - __main__ - INFO - Connecting to Plex server...
2022-09-08 18:58:59 - __main__ - INFO - Connected to Plex server PLEX Home using plex.tv account
2022-09-08 18:58:59 - __main__ - DEBUG - IntroSeeker init with leftOffset 1000 rightOffset 1000
2022-09-08 18:58:59 - __main__ - DEBUG - Operating in MODE_TYPES.SKIP mode
2022-09-08 18:58:59 - __main__ - DEBUG - Skip tags ['intro', 'commercial', 'advertisement']
2022-09-08 18:58:59 - __main__ - DEBUG - Skip S01E01 SKIP_TYPES.WATCHED
2022-09-08 18:58:59 - __main__ - DEBUG - Skip S**E01 SKIP_TYPES.ALWAYS
2022-09-08 18:58:59 - __main__ - DEBUG - Skip last chapter 0.0
2022-09-08 18:58:59 - __main__ - INFO - Skipper initiated and ready
2022-09-08 18:58:59 - __main__ - DEBUG - Starting listener
2022-09-08 18:58:59 - websocket - WARNING - websocket connected

As you can see there are no messages indicating that it's finding sessions/detecting intros. GDM is enabled on the server and my Apple TV's Plex app has "Advertise as player" set to on. My Plex server is running in a container too for what it's worth (hotio's image), but both containers are on the same subnet.

Do you have any idea of what could be the problem?

Thanks!

Docker image detects intro marker then errors

ERROR - Error seeking
Traceback (most recent call last):
  File "/usr/local/pas/resources/introSkipper.py", line 85, in seekTo
    if self.checkPlayerForMedia(player, mediaWrapper.media):
  File "/usr/local/pas/resources/introSkipper.py", line 102, in checkPlayerForMedia
    return not player.timeline or (player.isPlayingMedia(False) and player.timeline.key == media.key)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 584, in timeline
    return next((x for x in self.timelines() if x.state != 'stopped'), None)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 576, in timelines
    timelines = self.sendCommand(ClientTimeline.key, wait=wait) or []
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/client.py", line 231, in sendCommand
    return query(key, headers=headers)
  File "/usr/local/pas/venv/lib/python3.6/site-packages/plexapi/server.py", line 669, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; IP-REMOVED .plex.direct:32400/player/timeline/poll?commandID=338&wait=0 <?xml version='1.0' encoding='utf-8'?> <Response code="2000" status="FrameworkException: Unable to find player with identifier 1c7136cf62378fe0-com-plexapp-android">   <Traceback>Traceback (most recent call last):   File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-f11334058\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request     result = f(**d)   File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-f11334058\System.bundle\Contents\Code\playerservice.py", line 50, in process_remote_command     raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier 1c7136cf62378fe0-com-plexapp-android </Traceback> </Response> 

The player is an Nvidia Shield and the Android TV Plex app. Server is Windows, latest public PMS.

Next doesn’t work

Hi
Plex media server and Plexautoskip are in docker containers on a Synology nas
It skips intro and credits as intended
However, if « next = True » in config, it works only in the first episode I am watching, then it doesn’t work anymore unless I stop the episode
I tried « next = false » and it works on all episodes
I tried with plex for iPhone, plex for android tv and plex for fire tv clients
The log doesn’t give any error, just nothing after the autonext, unless I stop the episode and manually start it again
Is it working as intended on your end ?
Thanks a lot

Not Skipping Intro in Docker

Hi,

I have PlexAutoSkip running in docker but it doesn't seem to be working. It detects new sessions but just doesn't skip forward when it comes to the intro. This is all that's coming up in the pas.log file:

2023-02-05 14:22:31 - main - INFO - /usr/local/pas/venv/bin/python3
2023-02-05 14:22:31 - main - INFO - Loading config file /usr/local/pas/config/config.ini.
2023-02-05 14:22:31 - main - INFO - Loading custom JSON file /usr/local/pas/config/custom.json
2023-02-05 14:22:31 - main - INFO - Connecting to Plex server...
2023-02-05 14:22:36 - main - INFO - Connected to Plex server Mac Mini Plex Server using plex.tv account
2023-02-05 14:22:36 - main - INFO - Skipper initiated and ready
2023-02-05 14:22:36 - websocket - INFO - Websocket connected
2023-02-05 14:22:46 - main - INFO - Found new session 106 [43498] (The Last of Us s01e02 - Infected) -----------------.local|s1z92qxup4lsgus55bff9l3v viewOffset 530613 ---------, sessions: 0

There doesn't appear to be any errors but it's just not skipping the intro. Any ideas what I'm doing wrong?

Allow setting offset per show

Thanks for this project, it's working great.

It would be great if it were possible to set the offset per show rather than globally, Plex seems to pick up the intro on one of my shows a little too early

Plex HTPC for Mac & Plex for Android TV ERROR

Plex HTPC for Mac
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 61] Connection refused . . . . . . requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.31.19', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=114367&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10f7cf490>: Failed to establish a new connection: [Errno 61] Connection refused'))

Plex for Android TV
ERROR - 404 Error, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting#badrequest-error

iOS works fine. Not sure what the problem is.

Auto-Skip no longer working

Since the update after issue #21 (including the update earlier today), there are no errors but auto skip doesn't work. Confirmed the issue on Apple TV as well as Shield Pro for multiple shows.

today at 9:32:12 PMINFO - Skipper initiated and ready
today at 9:39:43 PMINFO - Found new session 22................. viewOffset 0 ['xxxxxx'], sessions: 0

Rolling docker back to ghcr.io/mdhiggins/plexautoskip-docker@sha256:553ebda88b91b7e312337b04272b34fc97264fb375e6e5685ef7984ed5470f76 with auto-update disabled fixes the issue.

Not Skipping on Windows Devices but will skip on Android devices

Using Plex HTPC on 2 different Windows PCs that were able to have Plex stuff on them skip but recent stopped working. Android devices are still working find and I can cast from Home Assistant to Android Devices without issue.

Running it in a docker for windows but even running with python directly in windows I get the same issue.

requests.exceptions.ConnectionError: HTTPConnectionPool(host='device.ip', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=81807&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd7d5692d70>: Failed to establish a new connection: [Errno 111] Connection refused'))

Is now the error I get after getting a 404 error for so long. I have disabled my firewalls completely, tried port specific rules for the firewall. I just cant get this to work on Windows anymore. Even tried with Blue Stacks and had issues

Please let me know what you know to help with this issue.

Error with latest plex update

Getting the following error when it wants to skip:
INFO - Found new session 544 [542655] (Mayor of Kingstown s02e09 - Peace in the Valley) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 viewOffset 301583 Raazer, sessions: 0
INFO - Found skippable marker intro for media 544 [542655] (Mayor of Kingstown s02e09 - Peace in the Valley) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 with range 299120-360110 and viewOffset 301584
INFO - Seeking Plex for Apple TV player playing 544 [542655] (Mayor of Kingstown s02e09 - Peace in the Valley) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 from 301585 to 360110
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
File "E:\copy\plexautoskip-master\resources\skipper.py", line 213, in _seekTo
self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset)
File "E:\copy\plexautoskip-master\resources\skipper.py", line 239, in seekPlayerTo
mediaWrapper.seekTo(targetOffset, player)
File "E:\copy\plexautoskip-master\resources\mediaWrapper.py", line 319, in seekTo
player.seekTo(offset)
File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 377, in seekTo
self.sendCommand('playback/seekTo', offset=offset, type=mtype)
File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 232, in sendCommand
return query(key, headers=headers)
File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\server.py", line 753, in query
raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; https://192.168.1.169:32400/player/playback/seekTo?commandID=1&offset=360110&type=video <title>Not Found</title>

404 Not Found

[Request] Clarification on clients in custom.json

Looking for help/clarification on where to locate or confirm the URL to use in the clients section of custom.json

I have a WebOS TV that locks up, for lack of a better term, after playing an episode and having the intro skipped. The episode ends as normal but I need to restart the tv to get any control back. So was looking to just deny it from the script.

currently, my config has:

"clients": {
    "PC": "http://192.168.1.2:32500",
    "iPhone": "http://192.168.1.3:32500",
    "TV": "http://192.168.1.8:32500"
},

and has "clients": [ "TV" ], in the blocked section but it's still skipping the intro on all devices.

Thanks in advance for any help.

List index out of range error

I'm having an issue where the next item won't play when one is done, and it's throwing errors in the PlexAutoSkip log with "list index out of range". Attached is my log from my viewing last night of a few episodes of Brooklyn Nine Nine. It skips the intro, then skips the credits, and then instead of the next episode starting, it goes to the countdown timer, and when the timer ends, it doesn't play. I have to exit back out a screen, move to the next episode, and play.

I am running on the commit from 4 days ago, Windows 10, python 3.10

My config settings that might impact this:

[Skip]
mode = skip
tags = intro, commercial, advertisement, credits
types = movie, episode
ignored-libraries =
last-chapter = 0.0
unwatched = True
first-episode-series = Watched
first-episode-season = Always
next = True
first-safe-tags =

[Binge]
ignore-skip-for = 0
safe-tags =
same-show-only = False
skip-next-max = 0

autoskiplog.txt

FireTV Stick

Hello, first let me just say, this was awesome of you to create and share!!! Thank you so much!

My server runs on a Windows 10 machine and I am also running PlexAutoSkip script on the same machine.

I have a ShieldTV in my living room and PlexAutoSkip works wonderfully on it.

However, in our bedroom, we have a FireTV 4k Stick and it does not skip intros on it.
The log appears to see the player, as it lists the episode and that it found a skippable marker intro.
And shows an INFO line stating it is sending the Seeking Plex for Android ........ 475698 to 486138.
And then some Traceback lines ....
then ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it.

Just curious if anyone has run into this and found a remedy? Thanks again for a cool share.

Wrong client IP when trying to connect

I'm unable to get autoskip working on any client. Went through the wiki and closed issues multiple times — including checking if I can get the XML player values by accessing the client's IP with my Plex token directly, which seems to be working fine. GDM is enabled.

Looking at debug logs it seems like the script is trying to connect to the router's IP address (192.168.1.1) rather than the Plex server's IP (192.168.111) or the client's (192.168.1.191).

I'm running it in Docker on an Unraid server where Plex is also hosted.

Any idea what might be happening here?

config.ini
[Plex.tv]
username = pugson
password =
servername =
token = <redacted>
    
[Server]
address = 192.168.1.111
ssl = False
port = 32400

[Security]
ignore-certs = False

[Skip]
mode = skip
tags = intro
types = movie, episode
ignored-libraries =
last-chapter = 0.0
unwatched = True
first-episode-series = Watched
first-episode-season = Always
first-safe-tags =
next = False
    
[Binge]
ignore-skip-for = 0
safe-tags =
same-show-only = False
skip-next-max = 0

[Offsets]
start = 3000
end = 1000
command = 500
tags = intro

[Volume]
low = 0
high = 100
custom.json
{
  "markers": {},
  "offsets": {},
  "tags": {},
  "allowed": {
    "users": [],
    "clients": [],
    "keys": ["tmdb://2316", "tmdb://2190"],
    "skip-next": []
  },
  "blocked": {
    "users": [],
    "clients": [],
    "keys": [],
    "skip-next": []
  },
  "clients": {},
  "mode": {}
}
Logs
INFO - Found new session 14 [35744] (The Office (US) s03e02 - The Convention) iPhone|A11E6F38-DD16-49D1-BE0F-6FC314E897F4 viewOffset 0 pugson on Plex for iOS (proxying: False), sessions: 0
INFO - Found skippable marker intro for media 14 [35744] (The Office (US) s03e02 - The Convention) iPhone|A11E6F38-DD16-49D1-BE0F-6FC314E897F4 with range 80346(+3000)-113614(+1000) and viewOffset 83433
INFO - Seeking Plex for iOS player playing 14 [35744] (The Office (US) s03e02 - The Convention) iPhone|A11E6F38-DD16-49D1-BE0F-6FC314E897F4 from 83434 to 114614
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 200, in _new_conn
    sock = connection.create_connection(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request
    conn.request(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 388, in request
    self.endheaders()
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 236, in connect
    self.sock = self._new_conn()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 215, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x152e305a1840>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen
    retries = retries.increment(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.1', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=114614&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x152e305a1840>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/pas/resources/skipper.py", line 212, in _seekTo
    self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset)
  File "/usr/local/pas/resources/skipper.py", line 238, in seekPlayerTo
    mediaWrapper.seekTo(targetOffset, player)
  File "/usr/local/pas/resources/mediaWrapper.py", line 365, in seekTo
    player.seekTo(offset)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/plexapi/client.py", line 377, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/plexapi/client.py", line 232, in sendCommand
    return query(key, headers=headers)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/plexapi/client.py", line 184, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.1', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=114614&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x152e305a1840>: Failed to establish a new connection: [Errno 111] Connection refused'))
INFO - Found new session 14 [35744] (The Office (US) s03e02 - The Convention) iPhone|A11E6F38-DD16-49D1-BE0F-6FC314E897F4 viewOffset 83959 pugson on Plex for iOS (proxying: False), sessions: 0
INFO - Found skippable marker intro for media 14 [35744] (The Office (US) s03e02 - The Convention) iPhone|A11E6F38-DD16-49D1-BE0F-6FC314E897F4 with range 80346(+3000)-113614(+1000) and viewOffset 84203
INFO - Seeking Plex for iOS player playing 14 [35744] (The Office (US) s03e02 - The Convention) iPhone|A11E6F38-DD16-49D1-BE0F-6FC314E897F4 from 84203 to 114614
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 200, in _new_conn
    sock = connection.create_connection(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request
    conn.request(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 388, in request
    self.endheaders()
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 236, in connect
    self.sock = self._new_conn()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 215, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x152e305a1810>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen
    retries = retries.increment(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.1', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=114614&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x152e305a1810>: Failed to establish a new connection: [Errno 111] Connection refused'))

TypeError: __init__() takes from 2 to 3 positional arguments but 4 were given

Changed logging to debug but nothing was caught.

I see this from the main.py:
INFO - /usr/bin/python3 INFO - Loading config file /opt/PlexAutoSkip/config/config.ini. INFO - Connected to Plex server BEAST using plex.tv account Traceback (most recent call last): File "main.py", line 76, in <module> intro_skipper.start(sslopt=sslopt) File "/opt/PlexAutoSkip/resources/introSkipper.py", line 38, in start self.listener = SSLAlertListener(self.server, self.processAlert, self.error, sslopt=sslopt) File "/opt/PlexAutoSkip/resources/sslAlertListener.py", line 19, in __init__ super(SSLAlertListener, self).__init__(server, callback, callbackError) TypeError: __init__() takes from 2 to 3 positional arguments but 4 were given

Request: Custom markers for skipping outro

First of all, thanks for the good work. I am using the containerized version and it works perfectly!

One thing that would greatly improve upon the existing features would be to allow "negative" values for the custom markers. For example, most shows have the same outro sequence so we could essentially add to the custom.json markers for specific shows / seasons to skip to the next episode when there is X amount of milliseconds left.

404 Error on newest version

Hello,

I have been getting the follow error on the latest version:

INFO - Seeking Plex for Android (TV) player playing 39 [48494] (The Simpsons s25e18 - Days of Future Future) AFTR|e40252f9598ac079-com-plexapp-android from 1303052 to 1330061
ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
File "/Users/joshali/PlexAutoSkip-master/resources/skipper.py", line 229, in _seekTo
self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset)
File "/Users/joshali/PlexAutoSkip-master/resources/skipper.py", line 255, in seekPlayerTo
mediaWrapper.seekTo(targetOffset, player)
File "/Users/joshali/PlexAutoSkip-master/resources/mediaWrapper.py", line 346, in seekTo
player.seekTo(offset)
File "/opt/homebrew/lib/python3.10/site-packages/plexapi/client.py", line 377, in seekTo
self.sendCommand('playback/seekTo', offset=offset, type=mtype)
File "/opt/homebrew/lib/python3.10/site-packages/plexapi/client.py", line 232, in sendCommand
return query(key, headers=headers)
File "/opt/homebrew/lib/python3.10/site-packages/plexapi/server.py", line 753, in query
raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; https://192-168-68-152.92110a007d7b460a93c63f8bd7a73073.plex.direct:32400/player/playback/seekTo?commandID=1&offset=1330061&type=video <title>Not Found</title>

404 Not Found

AppleTV Bad Request Error

Hello,

I get the following error when trying to skip on Apple TV. I have tried all the troubleshooting steps mentioned under bad requests including signing out of the Plex client, turning off SSL and ignoring certs, refreshing my Plex token, and making sure Network Discovery and advertise as player are turned on.

2023-02-16 12:17:04 plexapi.exceptions.BadRequest: (500) internal_server_error; https://192-168-68-152.92110a007d7b460a93c63f8bd7a73073.plex.direct:32400/player/playback/stop?commandID=1&type=video Traceback (most recent call last): File "/Applications/Plex Media Server.app/Contents/Resources/Plug-ins-ca0c45ff8/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request result = f(**d) File "/Applications/Plex Media Server.app/Contents/Resources/Plug-ins-ca0c45ff8/System.bundle/Contents/Code/playerservice.py", line 50, in process_remote_command raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier C215610B-F5A1-46F2-8F7F-0CE6C3B76EBE
2023-02-16 12:17:04
2023-02-16 12:17:04 During handling of the above exception, another exception occurred:
2023-02-16 12:17:04
2023-02-16 12:17:04 Traceback (most recent call last):
2023-02-16 12:17:04 File "/usr/local/pas/resources/skipper.py", line 213, in _seekTo
2023-02-16 12:17:04 self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset)
2023-02-16 12:17:04 File "/usr/local/pas/resources/skipper.py", line 232, in seekPlayerTo
2023-02-16 12:17:04 return self.skipPlayerTo(player, mediaWrapper)
2023-02-16 12:17:04 File "/usr/local/pas/resources/skipper.py", line 275, in skipPlayerTo
2023-02-16 12:17:04 self.log.warning("Seek target is the end but unable to get PlayQueue %d (%d) data from server, aborting to prevent extra skips or playback issues" % (mediaWrapper.playQueueID, mediaWrapper.media.playQueueItemID))
2023-02-16 12:17:04 TypeError: %d format: a number is required, not NoneType
2023-02-16 12:18:09 INFO - Found new session 71 [48527] (The Simpsons s23e05 - The Food Wife) Apple TV|C215610B-F5A1-46F2-8F7F-0CE6C3B76EBE viewOffset 0 joshali1990, sessions: 1

Ability customise skipping for specific shows

Just wondering if it would be possible to have the ability to customise the skipping for shows?

For example, parks and rec has a obnoxious intro, but no outro, where as I would like to skip both on futurama.

Hopefully i’m not asking too much lol

PlexKodiConnect not working!

Not sure if anyone else is having the issue of PlexKodiConnect not working anymore? Trying to work out if it's this or something else. Cheers.

Recurring error: TypeError: object of type 'Session' has no len()

Started seeing this issue a couple of days ago, since getting the latest update for the docker. The error continues to repeat every second. I haven't changed any configuration.

ERROR - Unexpected error getting data from session alert
Traceback (most recent call last):
  File "/usr/local/pas/resources/skipper.py", line 316, in processAlert
    if media and media.session and len(media.session) > 0 and media.session[0].location == 'lan':
TypeError: object of type 'Session' has no len()

Error with cache somewhere

Hi, I keep getting an error due a server/port I used and later removed. It seems to still be cached somewhere and I'm not sure where. Here are the errors I get:

2023-04-22 17:28:03 - __main__ - INFO - Seeking Plex for Android (Mobile) player playing 5 [21607] (Food Wars! Shokugeki no Soma s05e04 - The Last Supper) Galaxy S22 Ultra|d70303e90b683328-com-plexapp-android from 115286 to 158033
2023-04-22 17:28:03 - __main__ - ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f2a9ebfb6d0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='x.x.x.x', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=158033&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2a9ebfb6d0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Plex.tv web not skipping

Thanks for a great application.

When I log in to the web player via my_ip:32400 when on LAN, autoskip works ok. However, if I login via app.plex.tv, I get the debug level errors below. I have tried configs with either plex.tv credentials or 127.0.0.1 with port 32400. My smart TVs have no issues. My SSL settings are set to Preferred.

I'm on Win11.

Thanks for your help.

2022-06-10 14:51:43 - __main__ - INFO - Found new session 15 [2117] (iCarly (2021) s02e04 - iHire a New Assistant) Chrome viewOffset 0 ['mikethebos'], sessions: 2
2022-06-10 14:51:51 - __main__ - INFO - Found skippable chapter Advertisement for media 15 [2117] (iCarly (2021) s02e04 - iHire a New Assistant) Chrome with range 7818-29584 and viewOffset 8068
2022-06-10 14:51:51 - __main__ - INFO - Seeking Plex Web player playing 15 [2117] (iCarly (2021) s02e04 - iHire a New Assistant) Chrome from 8069 to 29584
2022-06-10 14:51:51 - __main__ - ERROR - BadRequest Error, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting#badrequest-error
2022-06-10 14:51:51 - __main__ - DEBUG - Player Chrome (Plex Web) does not support direct IP connections, nothing to fall back upon, returning None
2022-06-10 14:51:56 - __main__ - DEBUG - Skipping update session 15 [2117] (iCarly (2021) s02e04 - iHire a New Assistant) Chrome is actively seeking
```

Chapter Skipping

I’m having an issue with custom chapter skip definitions. Auto skip doesn’t seem to work for chapters that have multiple words in the title, i.e. using “c:Previously On”. Any idea how to fix this?

Fails to move to next episode on FireTV

First - I love the script, and it works great for my windows player, but on my FireTV it's able to skip intros, but when it tries to skip at the end of the episode to the next episode, the player reports:

"An error occurred while attempting to play this video. Please check your connection and try again."

When this happens, the script says the following:

INFO - Seek target is the end of 94 [122646] (Peppa Pig s01e07 - Mommy Pig at Work) TV for Plex for Android (TV) player , going to next
ERROR - Connection to remote host was lost.
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ERROR - Connection to remote host was lost.

The episodes in question have been played entirely too many times (seriously, make it stop), so I know they'll play normally without the auto skip.

Docker - Skipping whole show at Intro marker

ghcr.io/mdhiggins/plexautoskip-docker:latest
Config is basically out of the box, I've only set the server parameters to create the connection. At the intro marker pas is seeking very heavily, right up to the credits. You can see in the logs it seeks the whole show in less a second.

pas.log

2023-03-09 21:40:15 - __main__ - INFO - Found new session 94 [11986] (Bluey (2018) s01e37 - The Adventure) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android viewOffset 1582 dylancmds on Plex for Android (TV) (proxying: False), sessions: 1
2023-03-09 21:40:15 - __main__ - INFO - Found skippable chapter Intro for media 94 [11986] (Bluey (2018) s01e37 - The Adventure) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 0-434000 and viewOffset 2311
2023-03-09 21:40:15 - __main__ - INFO - Seeking Plex for Android (TV) player playing 94 [11986] (Bluey (2018) s01e37 - The Adventure) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 2312 to 434000
2023-03-09 21:40:15 - __main__ - INFO - Found skippable chapter Credits for media 94 [11986] (Bluey (2018) s01e37 - The Adventure) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 434000-437984 and viewOffset 434180
2023-03-09 21:40:15 - __main__ - INFO - Seeking Plex for Android (TV) player playing 94 [11986] (Bluey (2018) s01e37 - The Adventure) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 434181 to 437984
2023-03-09 21:40:22 - __main__ - INFO - Found new session 95 [11987] (Bluey (2018) s01e38 - Copycat) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android viewOffset 438000 dylancmds on Plex for Android (TV) (proxying: False), sessions: 1
2023-03-09 21:40:32 - __main__ - INFO - Found skippable chapter Intro for media 95 [11987] (Bluey (2018) s01e38 - Copycat) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 0-434000 and viewOffset 8529
2023-03-09 21:40:32 - __main__ - INFO - Seeking Plex for Android (TV) player playing 95 [11987] (Bluey (2018) s01e38 - Copycat) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 8530 to 434000
2023-03-09 21:40:33 - __main__ - INFO - Found skippable chapter Credits for media 95 [11987] (Bluey (2018) s01e38 - Copycat) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 434000-437984 and viewOffset 435001
2023-03-09 21:40:33 - __main__ - INFO - Seeking Plex for Android (TV) player playing 95 [11987] (Bluey (2018) s01e38 - Copycat) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 435002 to 437984
2023-03-09 21:40:47 - __main__ - INFO - Found new session 96 [11988] (Bluey (2018) s01e39 - The Sleepover) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android viewOffset 438000 dylancmds on Plex for Android (TV) (proxying: False), sessions: 1
2023-03-09 21:40:57 - __main__ - INFO - Found skippable chapter Intro for media 96 [11988] (Bluey (2018) s01e39 - The Sleepover) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 0-434000 and viewOffset 8964
2023-03-09 21:40:57 - __main__ - INFO - Seeking Plex for Android (TV) player playing 96 [11988] (Bluey (2018) s01e39 - The Sleepover) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 8965 to 434000
2023-03-09 21:40:58 - __main__ - INFO - Found skippable chapter Credits for media 96 [11988] (Bluey (2018) s01e39 - The Sleepover) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 434000-437984 and viewOffset 435001
2023-03-09 21:40:58 - __main__ - INFO - Seeking Plex for Android (TV) player playing 96 [11988] (Bluey (2018) s01e39 - The Sleepover) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 435002 to 437984
2023-03-09 21:41:12 - __main__ - INFO - Found new session 98 [11989] (Bluey (2018) s01e40 - Early Baby) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android viewOffset 438000 dylancmds on Plex for Android (TV) (proxying: False), sessions: 1
2023-03-09 21:41:23 - __main__ - INFO - Found skippable chapter Intro for media 98 [11989] (Bluey (2018) s01e40 - Early Baby) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 0-434000 and viewOffset 8962
2023-03-09 21:41:23 - __main__ - INFO - Seeking Plex for Android (TV) player playing 98 [11989] (Bluey (2018) s01e40 - Early Baby) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 8963 to 434000
2023-03-09 21:41:24 - __main__ - INFO - Found skippable chapter Credits for media 98 [11989] (Bluey (2018) s01e40 - Early Baby) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android with range 434000-437984 and viewOffset 435001
2023-03-09 21:41:24 - __main__ - INFO - Seeking Plex for Android (TV) player playing 98 [11989] (Bluey (2018) s01e40 - Early Baby) Chromecast Google TV|4268450aa2402d0e-com-plexapp-android from 435002 to 437984

config.ini

[Skip]
mode = skip
tags = intro, commercial, advertisement, credits
types = movie, episode
ignored-libraries = 
last-chapter = 0.0
unwatched = True
first-episode-series = Watched
first-episode-season = Always
first-safe-tags = 
next = False

[Binge]
ignore-skip-for = 0
safe-tags = 
same-show-only = False
skip-next-max = 0

[Offsets]
start = 3000
end = 1000
command = 500
tags = intro

[Volume]
low = 0
high = 100

Repeating last show in series

Now that we have it skipping to the next episode before the countdown starts, it seems that this causes it to just repeat the same episode over and over if you're at the last episode in the series (rather than just returning to the main menu).

I remember seeing this very rarely before (I assume that it was just a timing issue where it happened to check the show time at the exact right time before the player had returned to the main menu), but now it happens every time at the end of the last episode in the series.

Is there any way to check if there's a next episode via the API before attempting to skip to it?

[FR] Skip back after skipping intro to fix audio sync

A common issue with Plex clients, at least on Android TV, is that the sound goes out of sync after skipping the intro (on my Nvidia Shield it happens ~50% of the time). This is solved by manually skipping forward/back in the video. It would be awesome if PlexAutoSkip could e.g. skip to a few seconds after the marker initially, then skip back, hopefully mitigating any sync issues.

Connection timed out on Windows desktop plex client (compatible version)

I have set up everything according to the guide, and it does work on my phone within the same network, but even though I downgraded the desktop client, and it gets detected, when it comes to skipping the connection times out.

Here is a section of the log with the full detailed error:

`2023-08-21 14:28:31 - __main__ - INFO - Found new session 9 [4332] (Family Guy s04e17 - The Fat Guy Strangler) CATA-PC|qrml18uum72fq6046un3z5x5 viewOffset 0 Catastrope on Plex for Windows (proxying: False), sessions: 0
2023-08-21 14:28:32 - __main__ - INFO - Found skippable marker intro for media 9 [4332] (Family Guy s04e17 - The Fat Guy Strangler) CATA-PC|qrml18uum72fq6046un3z5x5 with range 990(+3000)-30297(+1000) and viewOffset 1829
2023-08-21 14:28:32 - __main__ - INFO - Seeking Plex for Windows player playing 9 [4332] (Family Guy s04e17 - The Fat Guy Strangler) CATA-PC|qrml18uum72fq6046un3z5x5 from 1829 to 31297
2023-08-21 14:28:53 - __main__ - ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\connection.py", line 203, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
    raise err
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
    sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\connectionpool.py", line 496, in _make_request
    conn.request(
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\connection.py", line 395, in request
    self.endheaders()
  File "C:\Program Files\Python311\Lib\http\client.py", line 1281, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Program Files\Python311\Lib\http\client.py", line 1041, in _send_output
    self.send(msg)
  File "C:\Program Files\Python311\Lib\http\client.py", line 979, in send
    self.connect()
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\connection.py", line 243, in connect
    self.sock = self._new_conn()
                ^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\connection.py", line 212, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x00000185583E24D0>, 'Connection to 192.168.0.31 timed out. (connect timeout=30)')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\urllib3\util\retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.0.31', port=32700): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=31297&type=video (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x00000185583E24D0>, 'Connection to 192.168.0.31 timed out. (connect timeout=30)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\PlexAutoSkip-master\resources\skipper.py", line 212, in _seekTo
    self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset)
  File "C:\PlexAutoSkip-master\resources\skipper.py", line 238, in seekPlayerTo
    mediaWrapper.seekTo(targetOffset, player)
  File "C:\PlexAutoSkip-master\resources\mediaWrapper.py", line 373, in seekTo
    player.seekTo(offset)
  File "C:\Program Files\Python311\Lib\site-packages\plexapi\client.py", line 378, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "C:\Program Files\Python311\Lib\site-packages\plexapi\client.py", line 233, in sendCommand
    return query(key, headers=headers)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\plexapi\client.py", line 185, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\requests\sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\requests\adapters.py", line 507, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.0.31', port=32700): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=31297&type=video (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x00000185583E24D0>, 'Connection to 192.168.0.31 timed out. (connect timeout=30)'))`

Again, the same system seems to be working fine with other, albeit mobile devices on the network. I have disabled firewall, even tried checking pinging both pcs from one another (it works), yet couldn't figure out the timeout error. Hope it's solveable

Thank you in advance

Feature request: Managed users

Hey. This is working fantastic on my server, so thank you very much for making this.

Is there a way to select which managed users are allowed or blocked from the autoskip feature? The kids (which are managed users on the main account) enjoy the intro to their shows, but from what I can tell, I can only block users who have their own plex.tv account.

Thanks

Filter by users

Add a filter by users so the feature is allowed/blocked for various users on the LAN

Run as a service?

Hey there, looking for the best recommendations / instructions for installing this program as a service at boot up?

Build:

OS:

Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

PMS:

Plex Server Version: 1.31.1.6716

Python:

Version: 3.10.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.