NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Kodi / XBMC X-NEWA v
« Previous 1 … 7 8 9 10 11 … 13 Next »
[WIP] New Confluence Skin for XNEWA

 
  • 0 Vote(s) - 0 Average
[WIP] New Confluence Skin for XNEWA
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#71
2014-06-24, 11:37 AM
pkscout Wrote:Yea, I just figured out basically the same thing.

I looked at a recording in the NextPVR client, and it shows The Last Ship recorded from 5:59pm - 7:03pm on 22 June 2014. The same show when queried using the RecordingSummary reports back it started recording at 03:59:04 on June 23, 2014. So that's exactly 10 hours off.


Is that what you are seeing with after the change I suggested from sum2dict_json?

Martin
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#72
2014-06-24, 06:43 PM
mvallevand Wrote:Is that what you are seeing with after the change I suggested from sum2dict_json?

I think so. Here's what I changed in sum2dict
Code:
theDict['start'] = summary.StartTime

to:
Code:
theDict['start'] = datetime.datetime.fromtimestamp(time.mktime(time.strptime(str(summary.StartTime),'%Y-%m-%d %H:%M:%S')))

I had to wrap summary.StartTime in str() because without it strptime complained that it wasn't a string object. I also removed the 'T' from the middle of the datetime format, as summary.StartTime didn't include that (with the 'T' XNEWA generated an exception error).

Even with that change, I still get the time/date without the 10 hour offset for my timezone. It feels like NEWA isn't adjusting properly for timezone when it sends back the response.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#73
2014-06-24, 09:39 PM
I've suggested a change to UJB. I consider it largely cosmetic anyway as the sort order is correct.

Martin
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#74
2014-06-24, 10:33 PM
mvallevand Wrote:I've suggested a change to UJB. I consider it largely cosmetic anyway as the sort order is correct.

Thanks. When your the guy working on the skinning, it's all cosmetic, but it's all important to you. Wink
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#75
2014-06-24, 10:47 PM
pkscout Wrote:Thanks. When your the guy working on the skinning, it's all cosmetic, but it's all important to you. Wink

Fair enough. Kind of like your "cosmetic" change to take the date time format from XBMC. Not only does XBMC not give Canadians a 24h time option, they think we use American-style short format. A pain in the butt to have to edit a UAC controlled file langinfo.xml to get around this.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#76
2014-06-25, 01:59 AM
pkscout Wrote:all times will be in 24 hour format (like 17:04). If you chose US(12h), you'll get something like 5:04 PM. If you choose a non-US region, your date will match the date format for your region.

There is a problem stripping too many leading zeroes between midnight and 1am in 24 hr format the following might be better

Code:
def xnewa_time( dt, withsecs=False, leadzero=False ):
    if leadzero:
        return dt.strftime( _timeformat( withsecs ) )
    else:
        newTime = dt.strftime( _timeformat( withsecs ) ).lstrip('0')
        if newTime[0].isdigit():
          return newTime
        else:
          return '0' + newTime

Martin
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#77
2014-06-25, 02:53 AM
mvallevand Wrote:There is a problem stripping too many leading zeroes between midnight and 1am in 24 hr format the following might be better

Code:
def xnewa_time( dt, withsecs=False, leadzero=False ):
    if leadzero:
        return dt.strftime( _timeformat( withsecs ) )
    else:
        newTime = dt.strftime( _timeformat( withsecs ) ).lstrip('0')
        if newTime[0].isdigit():
          return newTime
        else:
          return '0' + newTime

I was trying to match the display exactly in XBMC. In both 12 and 24 hour format, XBMC (Well Gotham Confluence at least) doesn't show the leading zero. So if you want the leading zero by default, you could just change the code in that function to:
Code:
def xnewa_time( dt, withsecs=False, leadzero=True ):
    if leadzero:
        return dt.strftime( _timeformat( withsecs ) )
    else:
        return dt.strftime( _timeformat( withsecs ) ).lstrip('0')

BTW, if you don't want XNEWA to format the time/date any differently than it does now, that's fine. I'll probably just modify the date/time format codes on my local system as updates come out.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#78
2014-06-25, 03:11 AM
pkscout Wrote:I was trying to match the display exactly in XBMC. In both 12 and 24 hour format, XBMC (Well Gotham Confluence at least) doesn't show the leading zero. So if you want the leading zero by default, you could just change the code in that function to:
BTW, if you don't want XNEWA to format the time/date any differently than it does now, that's fine. I'll probably just modify the date/time format codes on my local system as updates come out.

I have no problem with using XBMC to decide, but XBMC doesn't truncate the zero hour which the current code does.

Martin
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#79
2014-06-25, 09:12 AM (This post was last modified: 2014-06-26, 08:50 AM by pkscout.)
OK, now I see what you were talking about. My bad. Here's a fix for the leading zeros and a fix for the lack of timezone offset in the RecordingSummary. The zip just has xnewa_datetime.py and recent.py. The changes are really all in the xnewa_datetime library. recent.py only needed a small change to call the GMT offset when needed.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#80
2014-06-25, 07:26 PM
I like your fix for midnight but not keen on moving time fixes out of xnewa_connect. I want it to be the glue to newa having it do all the data normalization. I might move it to lib but I definitel want it to b e a lib any future xbmc addon could use. I still have to move player out of details to isolate things better but web client and x-newa should in theory be able to work as two addons with proper planning.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (12): « Previous 1 … 6 7 8 9 10 … 12 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  XNewa on Kodi 18.8 on Android TV Jumps out Playing Show Currently Recording jksmurf 28 10,979 2020-09-13, 06:09 AM
Last Post: jksmurf
  Changing the KNEWC UI Client Skin cweseloh 5 2,729 2020-05-04, 04:45 PM
Last Post: mvallevand
  [Moved] Comskip with XNEWA on Kodi 18 Leia jksmurf 50 14,981 2019-03-02, 08:53 PM
Last Post: jksmurf
  Location of Guide.xml in XNEWA on RPi2? jksmurf 2 2,275 2018-01-27, 02:34 AM
Last Post: jksmurf
  X-NEWA Skin Options / Classic Font Size Increase drl516 1 2,053 2017-10-22, 03:53 PM
Last Post: mvallevand
  In progress recordings in xnewa stustunz 63 18,154 2017-04-05, 01:00 AM
Last Post: stustunz
  Playing commercial-less recordings from HTPC to android clients from xnewa, nPVR tryingtocordcut 5 3,027 2017-02-08, 11:34 PM
Last Post: mvallevand
  XNEWA Estuary Skin for Kodi 17 pkscout 21 11,773 2016-11-27, 12:33 AM
Last Post: pkscout
  How do I exit XNEWA? fuzzweed 12 5,974 2016-07-27, 06:04 PM
Last Post: mvallevand
  What skin file(es) is/are used to layout the Info OSD when played via X-NEWA? BrettB 22 9,211 2016-05-15, 07:44 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode