edit4ever / script.module.zap2epg

zap2epg - EPG grabber for USA/Canada
GNU General Public License v3.0
41 stars 25 forks source link

Use Zap2epg on standard raspbian stretch install #11

Closed Rippert closed 5 years ago

Rippert commented 5 years ago

I've got tvheadend and kodi installed from repositories on a standard raspbian stretch OS. The zap2epg grabber does not show up in my tvheadend list of grabbers. I did try it in a Libreelec install and it did show up. I think this is because the standard raspbian install runs tvheadend as the user hts, but I can't run kodi from the hts user to set it up.

Is there some workaround for this?

Thanks, -Ted

edit4ever commented 5 years ago

Check to see what permissions are set on the usr/bin tv_grab_zap2epg file. Try making sure it is set to executable for the hts usr. If the file is not in usr/bin - add it there then reboot.

Rippert commented 5 years ago

Thanks. It's not in /usr/bin. Looking at the bash script inside tv_grab_zap2epg, it looks like it expects to be able to call the python addon inside the users folder. I can't test this until later, but I assume I should copy my users .kodi/addons/script.module.zap2epg directory tree to /home/hts?

edit4ever commented 5 years ago

no - for tvheadend to see the grabber it's just the tv_grab_zap2epg file that needs to be put in usr/bin.

Once you put it in there - and reboot - you should see the grabber in tvheadend...if it has trouble running after that we can check where it is looking to find the zap2epg.py file.

wbeard52 commented 5 years ago

Also make sure it has "execute" authority. I chmod +x my file. I'm running on OSMC. See my write up here.

https://discourse.osmc.tv/t/how-to-populate-epg-data-with-zap2epg/76457

Get Outlook for Androidhttps://aka.ms/ghei36


From: edit4ever notifications@github.com Sent: Monday, December 10, 2018 5:43:26 PM To: edit4ever/script.module.zap2epg Cc: Subscribed Subject: Re: [edit4ever/script.module.zap2epg] Use Zap2epg on standard raspbian stretch install (#11)

no - for tvheadend to see the grabber it's just the tv_grab_zap2epg file that needs to be put in usr/bin.

Once you put it in there - and reboot - you should see the grabber in tvheadend...if it has trouble running after that we can check where it is looking to find the zap2epg.py file.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/edit4ever/script.module.zap2epg/issues/11#issuecomment-446029677, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aeapm0K4FbIHQfTEMB5GnBVH1Mv1fZFRks5u3v-ugaJpZM4ZMbTi.

Rippert commented 5 years ago

OK, I tested it with tv_grab_zap2epg in /usr/bin and given execution authority for all. It didn't work at first and the log said: python: can't open file '/home/hts/.kodi/addons/script.module.zap2epg/zap2epg.py': [Errno 2] No such file or directory among other errors.

I copied the entire .kodi tree from the pi user to the hits user and then it worked.

Obviously this is inconvenient since any changes to the settings of the grabber must be done in the pi user running Kodi and then copied over to the hts user.

I'm going to try making a new user with no admin privileges and editing the /etc/default/tvheadend configuration file to point to that user so I can run Kodi from the same user that runs tvheadend.

I'll let you know how that works tomorrow.

Thanks for all your help so far.

Rippert commented 5 years ago

I did manage to get an unprivileged user to run both tvheadend and Kodi, so that is probably the best way to deal with it. I could have used the hits user, but made a new one just to start fresh. I had to add the new user to the video, audio and input groups for Kodi to work. I also had to re-run the tvheadend initialization wizard.

I was trying to figure out how to automate this whole process from within Kodi, but I can't see how to get around needing to be root to put the tv_grab file in /usr/bin. Not a problem in Libreelec, since there is only the root user.