Alpha - PVR reminder

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
AshG Offline
Senior Member
Posts: 237
Joined: Mar 2013
Reputation: 5
Location: UK - in the middle
Post: #31
(2016-01-22 13:19)andersh Wrote:  I installed this on Jarvis RC1 on an Nvidia Shield TV (Android). When trying to add a reminder it fails and writes this to the log:

12:13:39 T:18446744071773730048 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.TypeError'>
Error Contents: write() got an unexpected keyword argument 'xml_declaration'
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.pvrreminder/contextmenu.py", line 26, in <module>
setreminderdata.setreminder(videoname, videostarttime, videodate, channelname)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.pvrreminder/reminders.py", line 89, in setreminder
tree.write(xmlfile, xml_declaration=True, encoding='utf-8', method="xml")
TypeError: write() got an unexpected keyword argument 'xml_declaration'
-->End of Python script error report<--
Can I have the full log please in past bin or something similar a part of the log is no good to me.
find quote
sconly Offline
Member
Posts: 95
Joined: May 2015
Reputation: 0
Post: #32
(2016-01-20 12:55)AshG Wrote:  Hi Sconly, I'm afraid 15.xx and upwards. I developed it on 16B, the difference I think is the "remind me" option in the context menu will only show in Live TV where as in 15, it will show everywhere... So it is optimised for 16.x I've running all series of the beta 16s on my prod box for some time and I would say it's pretty stable right now...

I do have a "to do" list and I'll see what I can do. My time is limited its not that I don't want to develop this it's rather that I can't at the moment! 2 young children, a wife, a dog, a hamster and gold fish are all keeping me rather occupied at the moment!

Ok, so if want to have a go at getting it to work in 14.2 - and you don't mind me 'tinkering' with it - what/where in the code do I need to change, do I need to change a reference to an API/function/etc.?

Thanks
find quote
andersh Offline
Junior Member
Posts: 8
Joined: Dec 2015
Reputation: 0
Post: #33
(2016-01-22 21:07)AshG Wrote:  Can I have the full log please in past bin or something similar a part of the log is no good to me.
Full debug log here:
https://www.zerobin.net/?548081255c9ab39...mvBd80iZg=

Error at the very bottom.
find quote
AshG Offline
Senior Member
Posts: 237
Joined: Mar 2013
Reputation: 5
Location: UK - in the middle
Post: #34
(2016-01-22 23:17)andersh Wrote:  
(2016-01-22 21:07)AshG Wrote:  Can I have the full log please in past bin or something similar a part of the log is no good to me.
Full debug log here:
https://www.zerobin.net/?548081255c9ab39...mvBd80iZg=

Error at the very bottom.

Cool, thanks for that, presuming your just going into your EPG, selecting a programme to remind for today and using the context menu to select "remind me"?

so looking at your log, everything's looks good,until we write the EPG data into the XML... Thinking about this logically the only thing that is different to other users set-up in regards to the addon is your EPG data, have you tried testing different channels ? Different programmes? I'm thinking there may be some kind of special character in your EPG that The XML object doesn't like... Although I'm only guessing at the moment and I may be barking up the wrong tree!

The addon stores: Programme name, time, date and channel name in a xml file, is there any special characters at all? Are you able to show a screen print of the EPG that you need reminding ofConfused
find quote
AshG Offline
Senior Member
Posts: 237
Joined: Mar 2013
Reputation: 5
Location: UK - in the middle
Post: #35
(2016-01-22 22:45)sconly Wrote:  
(2016-01-20 12:55)AshG Wrote:  Hi Sconly, I'm afraid 15.xx and upwards. I developed it on 16B, the difference I think is the "remind me" option in the context menu will only show in Live TV where as in 15, it will show everywhere... So it is optimised for 16.x I've running all series of the beta 16s on my prod box for some time and I would say it's pretty stable right now...

I do have a "to do" list and I'll see what I can do. My time is limited its not that I don't want to develop this it's rather that I can't at the moment! 2 young children, a wife, a dog, a hamster and gold fish are all keeping me rather occupied at the moment!

Ok, so if want to have a go at getting it to work in 14.2 - and you don't mind me 'tinkering' with it - what/where in the code do I need to change, do I need to change a reference to an API/function/etc.?

Thanks


Go for your life, I have this on GitHub so if you can work it out I can make another branch for anything below Kodi 15.xx

I'm guessing your getting a "dependency not met" message?

I would first look in the addon.xml I'm guessing the python version is not supported ? What does the log say ? Does it give any clues?

Code:
<requires>
    <import addon="xbmc.python" version="2.20.0"/>
    <import addon="script.module.elementtree" version="1.2.7"/>
    <import addon="script.module.metahandler" version="2.7.0"/>
  </requires>
(This post was last modified: 2016-01-23 00:42 by AshG.)
find quote
andersh Offline
Junior Member
Posts: 8
Joined: Dec 2015
Reputation: 0
Post: #36
(2016-01-23 00:29)AshG Wrote:  Cool, thanks for that, presuming your just going into your EPG, selecting a programme to remind for today and using the context menu to select "remind me"?
Yes, that's precisely what I do.
Quote:The addon stores: Programme name, time, date and channel name in a xml file, is there any special characters at all? Are you able to show a screen print of the EPG that you need reminding ofConfused
Most of the EPG have Norwegian characters, both in title, genre and description, but I've also tested on programmes that have only english text. Same thing happen on all of them.

This EPG is provided by MediaPortal as a backend. What I could do is fire up a TVHeadEnd backend and see if that makes a difference.

Link to EPG screenshot: http://ibin.co/2UQfmbFJk4Sv
find quote
andersh Offline
Junior Member
Posts: 8
Joined: Dec 2015
Reputation: 0
Post: #37
I did some more testing.

Changed skin back to Confluence - still the same problem.
Changed PVR Backend to TVHeadend and reloaded EPG - still the same problem.

Also tested on another Android device that is running a self-compiled version of the latest Kodi (ver. 17 updated Jan. 18th) from Github. Same problem there as well.
find quote
macardi Offline
Senior Member
Posts: 219
Joined: Sep 2008
Reputation: 1
Location: Sweden
Post: #38
Hi, thanks for a great addon, love it!

One problem though, it takes almost a minute for the addon to terminate when closing Kodi. Could this be fixed?

Log

Cheers!
Marcus
find quote
Solo0815 Offline
Fan
Posts: 667
Joined: Sep 2004
Reputation: 5
Location: Germany
Post: #39
@AshG:
I added a PR for the converting to unixtime.
Hopefully you can do something with it Wink
FR:
- more than 1 timer
- more than 7 days in the future. Should be possible with unixtime
- XML with timers in $userdata/script.pvr.reminder, e.g.
Code:
<?xml version="1.0" ?>
<timers>
  <timer>
    <begin>1402833547</begin>
    <channelname>ZDF</channelname>
    <name>Heute</name>
    <startdate>insert_start_date_here</startdate>
    <starttime>insert_start_time_here</starttime>
    <zap>true</zap>
  </timer>
  <timer>
    <begin>1425833521</begin>
    <channelname>ARD</channelname>
    <name>Tagesschau</name>
    <startdate>insert_start_date_here</startdate>
    <starttime>insert_start_time_here</starttime>
    <zap>true</zap>
  </timer>
</timers>

there are only 10 sorts of people: those who understand binary and those who don't

PC: Kubuntu 14.04 and Win7 --- Wetek Play: OpenELEC 7.x (master) --- NAS: OMV 2.x with Kodi-headless
(This post was last modified: 2016-01-24 13:46 by Solo0815.)
find quote
AshG Offline
Senior Member
Posts: 237
Joined: Mar 2013
Reputation: 5
Location: UK - in the middle
Post: #40
(2016-01-23 11:46)andersh Wrote:  I did some more testing.

Changed skin back to Confluence - still the same problem.
Changed PVR Backend to TVHeadend and reloaded EPG - still the same problem.

Also tested on another Android device that is running a self-compiled version of the latest Kodi (ver. 17 updated Jan. 18th) from Github. Same problem there as well.

Thanks, I'm really not sure, im not sure how easy this would be.? could you check to see if any data has been written to the XML file?

If you can navigate to your addon folder, find the Remindme addon folder then in the folder called "resources" there should be an XML files called "reminder_data.xml".. This file gets written to when a reminder is set, just wondering whether it's failed in a particular tag, that may give some light to what's it's failing on.

Other than I'm not sure what to suggest? I don't like being beaten!
find quote
AshG Offline
Senior Member
Posts: 237
Joined: Mar 2013
Reputation: 5
Location: UK - in the middle
Post: #41
(2016-01-23 14:03)macardi Wrote:  Hi, thanks for a great addon, love it!

One problem though, it takes almost a minute for the addon to terminate when closing Kodi. Could this be fixed?

Log

Cheers!
Marcus

Yeah looks like some classes in your log were left open, I'll put it on my list Wink
find quote
AshG Offline
Senior Member
Posts: 237
Joined: Mar 2013
Reputation: 5
Location: UK - in the middle
Post: #42
(2016-01-24 13:45)Solo0815 Wrote:  @AshG:
I added a PR for the converting to unixtime.
Hopefully you can do something with it Wink
FR:
- more than 1 timer
- more than 7 days in the future. Should be possible with unixtime
- XML with timers in $userdata/script.pvr.reminder, e.g.
Code:
<?xml version="1.0" ?>
<timers>
  <timer>
    <begin>1402833547</begin>
    <channelname>ZDF</channelname>
    <name>Heute</name>
    <startdate>insert_start_date_here</startdate>
    <starttime>insert_start_time_here</starttime>
    <zap>true</zap>
  </timer>
  <timer>
    <begin>1425833521</begin>
    <channelname>ARD</channelname>
    <name>Tagesschau</name>
    <startdate>insert_start_date_here</startdate>
    <starttime>insert_start_time_here</starttime>
    <zap>true</zap>
  </timer>
</timers>

Thanks @solo0815, got your pr, thanks mate will have a look.
find quote
andersh Offline
Junior Member
Posts: 8
Joined: Dec 2015
Reputation: 0
Post: #43
(2016-01-24 22:37)AshG Wrote:  Other than I'm not sure what to suggest? I don't like being beaten!
Neither do I, and this would be a really useful plugin for me if I could get it to work.

I checked the resources xml and it contained this:

Code:
<data>
  <reminder id="0">
    <enabled>false</enabled>
    <programmename>Peter Kay's Car Share</programmename>
    <starttime>22:35</starttime>
    <sdate>Wednesday, 23 December 2015</sdate>
    <channel>NA</channel>
  </reminder>
</data>
find quote
AshG Offline
Senior Member
Posts: 237
Joined: Mar 2013
Reputation: 5
Location: UK - in the middle
Post: #44
Hey all, I would urge everyone to try out _BJ1's excellent reminder service over here http://forum.kodi.tv/showthread.php?tid=258581

I'm just not finding the time at the moment to progress this one .... I certainly want carry on with this at some point. But in the mean time BJ1's Finder service does what I think everyone wants...
find quote
schumi2004 Offline
Posting Freak
Posts: 1,574
Joined: Aug 2011
Reputation: 17
Post: #45
Thanks for your time and effort creating this and also thank you for linking to BJ1's version to check it out Wink
find quote
Post Reply