I’m working on a full-offline mode. Making progress.
This would be cool, I know you can put in your lan to skip the internet auth piece but a full offline mode would be cool when my internet goes out.
This already is supported by PM4K. As long as a server is connectable locally, it will fall back to it when offline. You obviously can’t switch servers or users then.
Shh… I have been using Plex for Kodi/PM4K completely offline authentication by this method, and I think if three variables (ID, title & authToken) are saved locally in the device then the above server /user switching can also be achieved.
XML 1.0
<category label="Plex">
<setting type="lsep" label="plex.tv"/>
<setting id="myplex.MyPlexAccount" type="text" default="{"ID": "11111111", "title": "XXXXX", "username": "", "email": "", "authToken": "xx-redacted", "pin": null, "isPlexPass": false, "isManaged": true, "isAdmin": false, "isSecure": true, "adminHasPlexPass": true}" visible="false" /><!-- Current plex.tv status: -->
</category>
I just can’t do one thing, that is if my plex server is offline/firewalled, the PM4K, does not connect at all only the first time (after new kodi and PM4K addon Installation). But if already authenticated, PM4K connects fine (offline).
Yeah I know, I’d like a less involved approach, though. My current test branch allows to go fully offline “forever” once you’ve signed in once (you’ve never seen the addon boot this fast ).
If that’s not possible, I’m currently duplicating the network/manual IP configs into the addon settings and am adding separate authTokens and user IDs.
–
Is anyone of the issue reporters testing 0.7.5-prerelease9? @Buttzy10169 @SmarthyMcFly
I’d like to get 0.7.5 out of the way to start with 0.7.6 offline mode
It is possible, that if the plex server is offline and we loged in once and get our authToken, and then reinstall kodi and if we manually supply our authtoken in xml, then the PM4K connects to the plexserver. Actually i tried it & have to make plex server online for once to establishing connection from PM4K to Plex Server, then it doesn’t require plex server to be online, PM4K works offline always forever.
Please make some method for which we don’t need to put server online when we have our authToken, after new installation of addon & kodi, it would be phenomenal.
Also another request if the server hostname can be supplied to the connection settings, with IP optional or hostname optional.
That’s the plan.
Sorry - was on business trip. Will test it today.
Edit:
Point 2 and 3 tested and works now / no issues.
Point 1 seems also to be fixed - as far as I can tell. ( I prepared a test case with a partially watched movie - skipped near the end and waited till end of movie. Then switched back to overview and progress was saved correctly / movie set as watched)
I haven’t had the issue since yet, though I haven’t tried to actually make it happen either.
I did notice that occasionally when bg music is playing for a tv series a small progress bar appears in the top left beside the home button. I don’t know if the showing or not showing is the bug though.
Woot, interesting. It showing is definitely a bug. Never seen that before.
Edit: Can you reproduce that? It should only show up when actually playing a music track, not BGM.
Not reliably, I’ve just noticed it out of the corner of my eye a couple of times.
OK, adjusted a bit of core logic so this shouldn’t happen with 0.7.5 final. Thanks for reporting!
Pushed skin.plextuary
3.0.10-pm4k0.7 to Don’t Panic, it hides the loading spinner when TV Theme music is playing.
Just seen this error pop up in the logs while closing out of a video that was having an issue with the audio being delayed / out of sync. I don’t think the error is related to the audio issue as that may be hardware related like we discussed previously.
2024-02-07 17:40:26.824 T:5756 info <general>: script.plex: SeekHandler: onPlayBackStopped - Seeking=0, QueueingNext=False, BingeMode=False, StoppedManually=True, SkipPostPlay=False
2024-02-07 17:40:26.824 T:5756 info <general>: script.plex: SeekDialog: OnPlayBackStopped
2024-02-07 17:40:26.824 T:5756 info <general>: script.plex: UpdateNowPlaying: force: False refreshQueue: False state: None overrideChecks: False time: None
2024-02-07 17:40:26.824 T:5756 info <general>: script.plex: UpdateNowPlaying: ignoring timeline as requested
2024-02-07 17:40:26.824 T:5756 info <general>: script.plex: Player - played-threshold: 0.011047015744581801/0.9
2024-02-07 17:40:26.824 T:5756 info <general>: script.plex: SeekDialog: Closing
2024-02-07 17:40:26.858 T:5756 info <general>: script.plex: Player: Video session ended
2024-02-07 17:40:26.858 T:5756 info <general>: script.plex: VideoPlayerWindow: Session ended - closing (ID: 139808853812688)
2024-02-07 17:40:26.858 T:5756 info <general>: script.plex: VideoPlayerWindow: Closing
2024-02-07 17:40:26.858 T:8509 info <general>: script.plex: BGThreader: (queue.0:worker.0): Active
2024-02-07 17:40:26.858 T:8509 info <general>: script.plex: API: GET https://192-168-99-205.7267e5b37cd04f37ba9ee5cdcbab1a65.plex.direct:32400/hubs/home/continueWatching?X-Plex-Token=****&X-Plex-Container-Start=0&X-Plex-Container-Size=10
2024-02-07 17:40:26.859 T:8510 info <general>: script.plex: BGThreader: (queue.0:worker.1): Active
2024-02-07 17:40:26.859 T:8510 info <general>: script.plex: API: GET https://192-168-99-205.7267e5b37cd04f37ba9ee5cdcbab1a65.plex.direct:32400/hubs/home/onDeck?X-Plex-Token=****&X-Plex-Container-Start=0&X-Plex-Container-Size=10
2024-02-07 17:40:26.859 T:8511 info <general>: script.plex: BGThreader: (queue.0:worker.2): Active
2024-02-07 17:40:26.859 T:8511 info <general>: script.plex: API: GET https://192-168-99-205.7267e5b37cd04f37ba9ee5cdcbab1a65.plex.direct:32400/hubs/home/recentlyAdded?type=1&X-Plex-Token=****&X-Plex-Container-Start=0&X-Plex-Container-Size=10
2024-02-07 17:40:26.867 T:5758 info <general>: script.plex: Player: Video window closed
2024-02-07 17:40:26.867 T:5758 info <general>: script.plex: SeekHandler: onVideoWindowClosed - Seeking=0
2024-02-07 17:40:26.892 T:5758 error <general>: _________________________________________________________________________________
2024-02-07 17:40:26.892 T:5758 error <general>: script.plex: ERROR:
2024-02-07 17:40:26.892 T:5758 error <general>: Traceback (most recent call last):
2024-02-07 17:40:26.892 T:5758 error <general>: File "/home/admin-user/.kodi/addons/script.plexmod/lib/player.py", line 1364, in onVideoWindowClosed
2024-02-07 17:40:26.892 T:5758 error <general>: self.handler.onVideoWindowClosed()
2024-02-07 17:40:26.892 T:5758 error <general>: File "/home/admin-user/.kodi/addons/script.plexmod/lib/player.py", line 630, in onVideoWindowClosed
2024-02-07 17:40:26.892 T:5758 error <general>: if not self.shouldShowPostPlay():
2024-02-07 17:40:26.892 T:5758 error <general>: ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-07 17:40:26.892 T:5758 error <general>: File "/home/admin-user/.kodi/addons/script.plexmod/lib/player.py", line 253, in shouldShowPostPlay
2024-02-07 17:40:26.892 T:5758 error <general>: if (not util.advancedSettings.postplayAlways and self.player.video.duration.asInt() <= FIVE_MINUTES_MILLIS)\
2024-02-07 17:40:26.892 T:5758 error <general>: ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-07 17:40:26.892 T:5758 error <general>: AttributeError: 'NoneType' object has no attribute 'duration'
2024-02-07 17:40:26.892 T:5758 error <general>: _________________________________________________________________________________
2024-02-07 17:40:26.892 T:5758 error <general>: `
2024-02-07 17:40:26.892 T:5758 info <general>: script.plex: Player: Idling...
Edit 2: I noticed another issue on my odroid n2. A tv channel (from a separate pvr.hts plugin) was playing while scrolling through movies, when somebody tried to play a movie playback failed and the watched percent / amount of the movie was set to I think whatever had elapsed on the currently playing tv channel. This is part of the log that should show what’s happening. I saved the log in case you want me to pm the entire thing. (It’s 5K+ lines long the full log)
PlexIssue_2.txt (37.3 KB)
I also noticed some lines in the log starting with the below don’t have the plex token hidden.
script.plex: API: Constructed video item for playback
Thanks, the first error will be fixed for 0.7.5.
The second one might not be fixable, but I’ll investigate this separately for 0.7.6. Right now, running other addons besides PM4K that use the Kodi Player isn’t supported.
Hi i noticed very slow response on exiting pm4k 0.7.5-prerelease9. Takes about 30 to 60 seconds to close the addon. Also today i noticed that when the screensaver is on on my device i was unable to get back to pm4k addon it got stuck and had to reboot my entire device.
There’ve been a couple of core changes in 0.7.5 regarding compatibility with other addons that use the Kodi player while PM4K is open.
Also the addon launch mechanism has changed (we’re forcing the home screen before launching PM4K; before it was a simple “ACTION_BACK”), please double check everything is still working for you guys before we release it!
0.7.5-prerelease17: script.plexmod.zip (3.5 MB)
The Squad™ re-ping: @sonofdibnah @ecsjjgg @jamal2367 @THGhost @bowlingbeeg @Buttzy10169 @SmarthyMcFly @pl37919
Changes:
- Home: Don’t fail on empty hub
- PPI: Move subtitle info in line with audio
- Fix: SeekDialog/Handler/Player: Edge case where progress wasn’t updated in certain situations
- Fix: Non-Home-Hubs: hub elements limited to 10 after modifying an underlying item
- Episodes: Don’t play background music when current volume is zero
- Core: Edge-case: Ensure TV background music isn’t recognized as audio
- Core: Logging: Clean Plex tokens from constructed item for playback dict
- Core: SeekHandler: fix usage of player.video.duration erroring
- Core: Home: Store last BG on minimize and on home select as well; don’t store the same background URL if it hasn’t changed
- Core: VideoPlayer: Make sure we’re the only active player, try to stop all other active players for 5 seconds
- Core: Instead of using Action(back) before running addon, navigate to Home and try to guarantee that
Only done a basic check of can I play a film, use subtitles and play music because that’s all my requirements catered for. Everything seems fine to me. The only thing I noticed is that opening the add-on seems slower but I find it hard to care about a few seconds. Within the add-on the response times are fine.
No issues so far (also tested music, movies and other basic stuff). Speed and responsiveness etc. still the same. (Opening the addon seems maybe a bit faster for me - but that could be normal / differs from start to start…)
Opening times of the addon are hugely network and device related. When testing my offline mode branch (still WIP), the addon was almost instantly booted.