tvOS: PVR configuration not persistent, not stored after restart
#46
Does that mean the next nightly build will have this fix, since it’s „merged“?
Reply
#47
(2023-12-20, 11:08)ScanFee Wrote: Does that mean the next nightly build will have this fix, since it’s „merged“?

correct
Reply
#48
This fixed my issue with Jellycon asking for server details every time the app launched

However - there is an issue with Nexus nightly builds

Until this is fixed, you can manually adjust it by going into kodi.app/Frameworks/libass.framework/Info.plist and changing the bundle identifier from the long error string to org.xbmc.kodi-tvos.framework.libass
Then you can sign and install as normal.

Might be worth just waiting for 20.3 though, doesn't seem far off.
Reply
#49
Hi, im very much trying every/any solution to fix this on my AppleTv 4k. Im not a developper but I have certain skills, so I might help. Ive been trying Nexus, and Omega , try some mix of the pvr sources, try to revert to a working version, with no luck so far. I just want to  say that you dont even need to restart to see the changes in the settings will not be saved. Just open PvrIptvSimpleClient, change name of 'migrated...' to 'test', close it, go back one menu, come back, reopen it, name has already change to 'unknown', go back, open any other extension, then come back to IptvSimpleClient, name is back to 'migrated....'. This means for there is an authorisation problem, it cant write in the file/folder, or some confusion between the home folder special://profile special:://userdata and one I cant remember with 'env' something... For now I m just looking for the last working version of the IptvSimpleClient, seems to be 20.7.0 if someone can provide a link for it. Ive tried to compile it, but I ended with a 20.8.0 version, with some symlink of a newer version inside it...sildeloading it, but it didnt even appear in extensions,  and some other tries didn't give much better results. What is the version before the multi Mu3 links? 
Appletv 4K 2nd gen. - Tvos 17.2 - MacBook 13 M1 Sonoma 14.2 - Kodi 20.2 - 21.b2
Reply
#50
Hi,
It's not an issue coming from the PVR plugins, it's an issue coming from Kodi itself. You need to install the latest nightly build of Nexus.
No need to install/update PVR add-on because these add-ons are embedded with Kodi IPA or tvOS/iOS builds.
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply
#51
(2023-12-16, 15:10)sy6sy2 Wrote: Hi all,

@emveepee pointed the finder on the right direction about this issue, thanks to him!

I also investigated on my side and it seems that Kodi (on Apple TV of course) mixing paths with and without the /private prefix.
In reality the getenv("HOME") line at beginning of the runtime return a path with /private prefix while CTVOSFileUtils::GetOSCachesDirectory() functions return a path without this prefix.
This cause some issue in the DirectoryCache system because some directories are registered with this prefix and other without, causing some file existence check to fail.
This is the issue with the multi instance PVR addons, they are not able to find the existing XML setting file because the Directorycache system thinks this file does not exist despite it really exists...

The patch proposed by emveepee should works, but my proposal fix is to use the /private prefix everywhere in Kodi to avoid any confusion or complexity.

This is my proposal:

Code:

--- a/xbmc/platform/darwin/tvos/filesystem/TVOSFileUtils.mm
+++ b/xbmc/platform/darwin/tvos/filesystem/TVOSFileUtils.mm
@@ -35,6 +35,7 @@ const char* CTVOSFileUtils::GetOSCachesDirectory()
   std::call_once(cache_flag, [] {
     NSString* cachePath =
         NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject;
+    cachePath = [@"/private" stringByAppendingString:cachePath];
     cacheFolder = cachePath.UTF8String;
     URIUtils::RemoveSlashAtEnd(cacheFolder);
   });


Code:

--- a/xbmc/platform/darwin/tvos/TVOSNSUserDefaults.mm
+++ b/xbmc/platform/darwin/tvos/TVOSNSUserDefaults.mm
@@ -67,19 +67,10 @@ bool CTVOSNSUserDefaults::Synchronize()
 void CTVOSNSUserDefaults::GetDirectoryContents(const std:Confusedtring& path,
                                                std::vector<std:Confusedtring>& contents)
 {
-  // tvos path adds /private/../..
-  // We need to strip this as GetUserHomeDirectory() doesnt have private in the path
-  std:Confusedtring subpath = path;
-  const std:Confusedtring& str_private = "/private";
-  size_t pos = subpath.find(str_private.c_str(), 0, str_private.length());
-
-  if (pos != std:Confusedtring::npos)
-    subpath.erase(pos, str_private.length());
-
   std:Confusedtring userDataDir =
       URIUtils::AddFileToFolder(CTVOSFileUtils::GetUserHomeDirectory(), "userdata");

-  if (subpath.find(userDataDir) == std:Confusedtring::npos)
+  if (path.find(userDataDir) == std:Confusedtring::npos)
     return;

What do you think?
I very much think this is the issue.  I find it important to note that: you dont need to restart to see changes are not stored, you can just change the name of your configuration to 'test', and close the window, reopen it, close the setting pannel, reopen it, its reverted to 'unknown', close the extension open another, and back to the setting pannel of PVR, and its back to original name 'migrated...' 
It also seems that this should be issued in Kodi's general support, or development forum to have the fix in Kodi and not just in pvr extension.
Reply
#52
Yes. This is the issue. And the issue was fixed thanks to a pull request.
The backport pull request concerning Nexus is here: https://github.com/xbmc/xbmc/pull/24278
Also, this PR was merged so you can install and try Nexus v20.3 to check if you still have the issue or not.
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply
#53
Hi

This is now working for me in 20.3

Thanks to those involved
Reply

Logout Mark Read Team Forum Stats Members Help
tvOS: PVR configuration not persistent, not stored after restart0