Open bryancromwell opened 10 years ago
Hi Bryan,
Thanks for helping out!
Weird that the previous code works for me, though - which makes me worry that your fix will break things for me. I'll test that as soon as Christmas preparations let me (coding is not on the family List of Approved Christmas Activities:-)
I suspect that this may have something to do with differences in timezone settings on our Myth backend servers. Am I right in guessing that you're UK-based (or that your MythTV backend is set to GMT timezone)?
I seem to recall that all my timestamps from the Myth services API end with a 'Z' (possibly Myth thinks "his machine is set to timezone CEST, so I'd better tell him this timestamp is UTC").
I hate timezones (why can't everyone just use Copenhagen time?;-)
But thanks again for both spotting and fixing a bug!
/thomas
On Thu, Dec 12, 2013 at 3:18 AM, bryancromwell notifications@github.comwrote:
Had crash:
2013-12-11 21:03:42,655 (7f7c34f2b700) : CRITICAL (runtime:880) - Exception (most recent call last): File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 840, in handle_request result = f(_d) File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythRecordings.bundle/Contents/Code/init.py", line 84, in GetRecordingList oc.add(Recording(recording)) File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythRecordings.bundle/Contents/Code/init.py", line 100, in Recording shouldStart = datetime.datetime.strptime(programStart,"%Y-%m-%dT%H:%M:%SZ") File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/ strptime.py", line 325, in _strptime (data_string, format)) ValueError: time data '2013-12-12T02:00:00' does not match format '%Y-%m-%dT%H:%M:%SZ'
Changed to: (Removed Z from %SZ) shouldStart = datetime.datetime.strptime(programStart,"%Y-%m-%dT%H:%M:%S") didStart = datetime.datetime.strptime(recordingStart,"%Y-%m-%dT%H:%M:%S") shouldEnd = datetime.datetime.strptime(programEnd,"%Y-%m-%dT%H:%M:%S") didEnd = datetime.datetime.strptime(recordingEnd,"%Y-%m-%dT%H:%M:%S")
Not sure if it was something due to my system or a typo.
— Reply to this email directly or view it on GitHubhttps://github.com/tschaumburg/MythRecordings.bundle/issues/1 .
Had crash:
2013-12-11 21:03:42,655 (7f7c34f2b700) : CRITICAL (runtime:880) - Exception (most recent call last): File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 840, in handle_request result = f(d) File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythRecordings.bundle/Contents/Code/init.py", line 84, in GetRecordingList oc.add(Recording(recording)) File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythRecordings.bundle/Contents/Code/init**.py", line 100, in Recording shouldStart = datetime.datetime.strptime(programStart,"%Y-%m-%dT%H:%M:%SZ") File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/_strptime.py", line 325, in _strptime (data_string, format)) ValueError: time data '2013-12-12T02:00:00' does not match format '%Y-%m-%dT%H:%M:%SZ'
Changed to: (Removed Z from %SZ) shouldStart = datetime.datetime.strptime(programStart,"%Y-%m-%dT%H:%M:%S") didStart = datetime.datetime.strptime(recordingStart,"%Y-%m-%dT%H:%M:%S") shouldEnd = datetime.datetime.strptime(programEnd,"%Y-%m-%dT%H:%M:%S") didEnd = datetime.datetime.strptime(recordingEnd,"%Y-%m-%dT%H:%M:%S")
Not sure if it was something due to my system or a typo.