Kodi Community Forum
Release Xbox One Skin - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: WIP Skins (https://forum.kodi.tv/forumdisplay.php?fid=160)
+---- Thread: Release Xbox One Skin (/showthread.php?tid=167601)



RE: [WIP] Xbox One Skin - mikexmayhem - 2014-04-19

I have been getting an error like script.gamertag.py. Is there something I'm not doing right with that? Or how can I fix it?


RE: [WIP] Xbox One Skin - toyota12303 - 2014-04-19

Hello

Currently this is only working when you are signed in with a gmail account but you can send to any email.
Also i will be trying to add support for different emails and an option to send attachments. Smile

If you are interested in integrating this in to your skin then I have created a thread on the Python Development Page that explains it a bit better : Email Script

Also how is the snap section coming along ?

I have created that program that will detect your resolution.

Here is a copy the program :

http://www.mediafire.com/download/i8lvx7sial0p2so/SnapItem.zip

You just need to create 2 versions of the snap item.exe (Zuro720p.exe & Zuro1080p.exe) and place them in to the \assistance\zuro\ folder.
The script will open Zuro720p if your resolution is around 720p. If it is bigger then it will open up Zuro1080p.
The program is created and compiled with autoit, and i have included the the source code incase you want to change things around.

@mikexmayhem : Have you run the skin setup ? by going in to settings - preferences - settings - uncheck to run setup.

Also when running through the setup don't forget to choose the option that says "make your own" when creating a gamertag (add your own gamertag) when it asks you to. (It is also case sensitive)

(Make sure that your gamertag is your gamertag, and your profile name is your name or something different to your gamertag)

If you still experience the script error then there may be a problem with the script getting certain information from your account.
This error sometimes comes up when 1 of your 5 most recently played games contains unsupported characters, for example the copyright symbol, TM symbol or anything like that.

To get rid of the error you just go in to the skin settings and disable the option that says "link Xbox gamertag". Then the error should go away.


RE: [WIP] Xbox One Skin - toyota12303 - 2014-04-19

Also everyone the latest update should be out in a few days, it's coming along very nicely Smile

I just need to fix the pins section and i am trying to create a script that will notify you when you receive a new email. (The notification is optional - can be toggled in the settings)

I have also added quite a few cool new features but i will list everything that's changed when i upload the update.


RE: [WIP] Xbox One Skin - senna99 - 2014-04-19

Hello toyota12303
I solved the problem with snap apps to stay Alwaysontop,later I'll send you the script.
Everything works perfectly for now ,also I solves the problem with taskbar to set auto hide, because sometimes appears taskbar when I switching programs.
Now the sky is only the limit for snap apps my friend.

Best Regards


RE: [WIP] Xbox One Skin - toyota12303 - 2014-04-19

That's great! and thanks. I am also looking in to how to do the same kind of thing with python, but i'm not too sure if it's possible. I have been looking in to the pywin32 module and this looks like it may do something similar but i haven't tested it out yet. This would be awesome if it did work as anyone on any platform could then pick their own app that they would like to snap from an option in the skin Smile

I have also changed around the email script that i have made and it now works with any email address, you just simply change 1 word in the python script to fit your address and it all works. I will also try and control this from the skin so then before you input your email there will be a common list of email types to choose from e.g. gmail, yahoo, hotmail ect.

Best Regards.


RE: [WIP] Xbox One Skin - toyota12303 - 2014-04-19

I have now changed it around a little and you can now pick your own email server from a list in the skin. At the moment there are gmail, hotmail, yahoo, facebook, mail.com and aol but i will be adding more.


RE: [WIP] Xbox One Skin - senna99 - 2014-04-19

Hello
I just finished the python script, now is possible to store images anywhere on hard disc, but I use C:\Assistance\Werbung ...etc
Everything works just fine, now I collect images for music and games but I'm trying to take picture with the correct title then I can use them for label name,
for now here I'm losing the race.

Best Regards


RE: [WIP] Xbox One Skin - toyota12303 - 2014-04-19

Awesome! which way have you used to save the images ?

with my advert script i used :

PHP Code:
import urllib2
import re
import os
from os
.path import basename
from urlparse import urlsplit
url 
"http://www.xbox.com/en-GB/#fbid=lqvFb1IO9j9"
urlContent urllib2.urlopen(url).read()
# HTML image tag: <img src="url" alt="some_text"/>
imgUrls re.findall('img .*?src="(.*?)"'urlContent)

# download all images
for imgUrl in imgUrls:
    try:
        
imgData urllib2.urlopen(imgUrl).read()
        
fileName basename(urlsplit(imgUrl)[2])
        
output open(fileName,'wb')
        
output.write(imgData)
        
output.close()
    
except:
        
pass 

To get everything from the website, but then to change the directory i had to include the chdir module and use :

PHP Code:
os.chdir(path


To set the working directory. This way you can have separate folders for different adverts.

And as for taking pictures i already have this integrated in to my skin.
I have created a program that detects your resolution and screenshots the right size for the snap tile. Also the charms bar will detect what window you are on and set the correct label.
I can send you the program and how to use it if you like ? as it works perfectly.

Best Regards.


RE: [WIP] Xbox One Skin - senna99 - 2014-04-19

Thank you, send me program when you have time.
These are my codes in .py but will test and your version,because I have a problem with some sites in my .py version.[/quote]
[quote]import urllib, sys
def savepage(url = "http://www.neoseeker.com/Games/Xbox_One/", dir = 'C:\Assistance\Werbung\Games\./'):
if not url:return
src = urllib.urlopen(url).read()
tags = src.split('<img')
source = tags[0]
for tag in tags[1:]:
try:
href = ''
escape = False
quote = ''
s = tag[tag.index('src'):]
after = s[s.index('>'):]
s = s[Confused.index('>')]
for c in s:
if quote == '':
if c in ('"',"'"):quote = c
else:
if c == quote:
if escape:
href += c
escape = False
else:
break
elif c == '\\':
if escape:
href += c
escape = not escape
else:
href += c
except:
pass
print href
n = href.split('/')[-1]
f = file(dir+n,'wb')
f.write(urllib.urlopen(urllib.basejoin(url,href)).read());f.close()
source += '<img'+n.join(tag.split(href))
n = url.split('/')[-1]
if not n:n = 'index'
f = file(dir+n,'w')
f.write(source)
f.close()

if __name__=="__main__"Confusedavepage(*sys.argv[1:])


RE: [WIP] Xbox One Skin - toyota12303 - 2014-04-19

Thanks! and i will send you the program in a minute as at the moment i am having some pretty bad problems with the extendedinfo script, widgets script and the simplejson module. All of them are failing for some reason.

Are you getting any problems with the extendedinfo script on your system ?

And would you be able to just send me the python file please ? as i would have to rewrite all of the above lines with the correct spaces ect. lol

Best Regards.


RE: [WIP] Xbox One Skin - senna99 - 2014-04-19

I can confirm that does not work script.extendedinfo. Now I will upload the python and new snap that stays always on top.

Best Regards.

This is the link ; https://onedrive.live.com/#cid=B862B92BC5C1C2AA&id=B862B92BC5C1C2AA%211757

Folder test is for you.


[WIP] Xbox One Skin - ADHDMedia - 2014-04-19

Don't forget iCloud, if it's possible!


RE: [WIP] Xbox One Skin - senna99 - 2014-04-19

Hello

Now I have a picture in several folder but also I have a problem to integrate them in <control type="panel"> .Every time the image changes name on new download from web.Some have the same name but that will be change for the month or two months.
And I'm not in the mood to write, in each xml <control type="multiimage">
Is it possible to use multiimage in <control type="panel"> or some type the patch,do you have a solution for this problem?

Best Regards.


RE: [WIP] Xbox One Skin - toyota12303 - 2014-04-19

@senna99 :

I have just tested out the scripts that you sent me and the snap script works perfectly! Now the windows always stay focused Smile
But the python script to get the images isn't downloading anything for me. It's just creating a blank file. I have also tested out the script without modifying the url and it still won't work.

Best Regards.

@ADHDMedia : I've just added it, any email will work as long as it supports smtp. But i will add a nice list of popular email types in to the skin so that it will fill in any settings for you (like smtp address and port number)

senna99 :

Yeah sure that's possible i've got something similar in my skin. here is the panel taken from my dashboard that includes multiimage controls: PasteBin

Best Regards.





I have also added a pretty cool new section to my skin that will help you fix any problems.

I have added a little menu in the settings where you can :

Reset System - This will do a full reset for the skin, resets all settings and re runs the setup as if you have just downloaded it.
Fix System - This reinstalls all of the dependencies and any required modules, and then restarts XBMC.
View Log - This will open up your XBMC log and you can read through it from inside XBMC.
Report Log - This will send a copy of your log to my alternative email. This will help when fixing problems and this saves copying it all and posting it on here.
Run Setup - This runs the skin setup.
Terminal - this is like a little command prompt for XBMC. You can type in commands and XBMC will execute them.
I will also be adding a python terminal, this way you can type in python commands from XBMC and it will execute them.

I have also fixed the contacts list where you can add peoples emails to it.

I am also working on facebook smtp and looking in to other ways of contacting facebook with python.

If i can get this working then you will be able to send messages to people on facebook, post status updates, upload pictures/videos. And you might even be able to have a friends list. But i am not too sure if it's all going to work out yet as i am still testing a lot of it.

Also a lot of people may experience problems with extendedinfo errors at the moment as i think they are doing something to their server.

Here are some images :

Image

Image

Image

Image


RE: [WIP] Xbox One Skin - senna99 - 2014-04-19

Very nice it is quite a big improvement for skin.
About python script I'm not sure why is not working, do you have C:\Assistance\Werbung\Games folder.
I have twenty different python for music and games , now I'll send all on skydrive , the only thing I noticed sometimes it takes time to start download.

Link : https://onedrive.live.com/#cid=B862B92BC5C1C2AA&id=B862B92BC5C1C2AA%211757
Folder python script
Best Regards