tvOS: PVR configuration not persistent, not stored after restart
#31
Perhaps if your service is making money installing Kodi you can ask them to help you install a test version.  I don't even know if there will be a 20.3 (with pvr.hts fixes) for tvOS so they should offer other means.

If not that macOS  script I linked to should tell you if you have the  proper developer account and that your signing certificates are valid.  You do need to install xcode and brew to install other utilities

Thanks of course to Apply for building such a closed infrastruction.

Edit:  What happened when you tried to simply install the signed IPA I sent using xcode?  I don't know if it checks your account for me keys.
Reply
#32
Were you able to solve this? I have the same issue. I even tried building from source but couldn't get the addons to be included.
Reply
#33
(2023-12-11, 21:51)Deihmos Wrote: Were you able to solve this? I have the same issue. I even tried building from source but couldn't get the addons to be included.

If you mean me, the patch works for me yes.  For addons I copy a master build, update with the newly built Kodi.app and update binary addons I use from Jenkins.

Martin
Reply
#34
What patch are you referring to ?
Reply
#35
The one I posted here https://forum.kodi.tv/showthread.php?tid...pid3171570

Martin
Reply
#36
The addon inputstream.ffmpegdirect is not in the builds since like a year, essentially breaking IPTV Simple Client. I think these two issues might be correlating? 

https://github.com/xbmc/inputstream.ffmp...issues/223

Anyways, i hope both issues are fixed, its been a long time🥹

(I can test, i have apple developer account and know how to sideload and stuff)
Reply
#37
@ScanFee if you want you could add ffmpegdirect to an ipa from Jenkings but that won't be the issue with pvr.iptvsimple not working.  I can give you a link to my patched IPA for testing if you PM me.
Reply
#38
It seems I don't have access to PM's yet :/ (or I am too incompetent lol) but clicking on your profile, there's no button, nor when I click on contact information. If you want, you can send me a download link to my mail [email protected]  This is not my private mail, it is generated and for one time use, so for the mods, I didnt leak something.
Reply
#39
Thank you for sending me your patch, it indeed works and now I can finally use the IPTV Simple Client. I hope Kodi integrates your fix soon, but wish you could make one for Omega in the meantime for us.

Tamino Smile
Reply
#40
Great I hope that gives Team Kodi enough to go on to look for the root cause, and why the wrong file is being requested.

In the meantime will see if I can get an Omega nightly build compiled and working and include ffmpegdirect.  I was having crash problem on my macOS yesterday but I think nvram -c fixed it.  Edit I don't see fffmpegdirect on Jenkins and I don't see instruction so I can't build it.

Martin
Reply
#41
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::string& path,
                                                std::vector<std::string>& contents)
 {
-  // tvos path adds /private/../..
-  // We need to strip this as GetUserHomeDirectory() doesnt have private in the path
-  std::string subpath = path;
-  const std::string& str_private = "/private";
-  size_t pos = subpath.find(str_private.c_str(), 0, str_private.length());
-
-  if (pos != std::string::npos)
-    subpath.erase(pos, str_private.length());
-
   std::string userDataDir =
       URIUtils::AddFileToFolder(CTVOSFileUtils::GetUserHomeDirectory(), "userdata");

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

What do you think?
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply
#42
I would definitely go with an actual fix.  I always considered my patch a hack, fixing something after the fact but not addressing the root cause.  I can't speak to the change since I don't know why GetUserHomeDirectory() wasn't supposed to be in /private, my patch would have added it and I didn't see any adverse impact.
Reply
#43
@sy6sy2 I suspect this inconsistency is related to symlink, could you check that by resolving symlink in code? btw is there a PR already?
Reply
#44
Sorry @kambala, just saw you message. I just opened the PR here https://github.com/xbmc/xbmc/pull/24259. I am open to suggestion to improve it if needed.

What do you mean by symlink? Are you suspecting that NSString* cachePath = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject; returns the symlink instead of the real file path?

Edit: I understand now, you mean trying to resolve the symlink so that it's not needed to manually happen the /private prefix. I will try that and adjust the PR if it's work.

Edit2: I tried NSString* cachePath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject stringByResolvingSymlinksInPath]; with the hope to have the /private prefix but it's not work, the returning path stars with /var like before.
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply
#45
The fix of this issue will be available in Kodi Nexus v20.3 (see https://github.com/xbmc/xbmc/pull/24278).
Thank you @emveepee
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply

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