View Full Version : XBOX InBox (V.0.1) - FEEDBACK IF YOU WILL!
stanley87
2007-01-16, 12:49
What does everyone think?
Bugs?
Ideas?
At the moment, i am finishing off email notification popup’s in XBMC (script runs in background and when new emails received, popup box notifies user)
Let me know,
Cheers
Stanley87
First.. No need to include shutil.py and poplib.py with your script since they are already built in to python!
Second.. You need to remove the line.lower thing from writing/reading the settings, since if you for instance have the password "Mypass" it would end up as "mypass" and we have a login failure.. it will also do username "Myuser" as "myuser" and the thing fails again
Feature suggestion: unlimited InBoxes.. eg, instead of making a check mail function for server1 and one for server2 .. do a checkmail(servername)
which reads from config user,pass,pop etc for that servername..
also it builds buttons for the inboxes by counting the servers in the config..
;)
Nuka1195
2007-01-16, 16:26
suggestion (actually for all scripters). Add a build.bat. The following is what i use and is easily changed for other scripts. I usurped one from the skinning svc project.
@Echo off
SET ScriptName=XBOX InBOX
:: Create Build folder
Echo ------------------------------
Echo Creating %ScriptName% Build Folder . . .
rmdir BUILD /S /Q
md BUILD
Echo.
:: Create exclude file
Echo ------------------------------
Echo Creating exclude.txt file . . .
Echo.
Echo .svn>"BUILD\exclude.txt"
Echo Thumbs.db>>"BUILD\exclude.txt"
Echo Desktop.ini>>"BUILD\exclude.txt"
Echo.
Echo ------------------------------
Echo Copying required files to \Build\%ScriptName%\ folder . . .
xcopy src "BUILD\%ScriptName%\src" /E /Q /I /Y /EXCLUDE:BUILD\exclude.txt
copy default.* "BUILD\%ScriptName%\"
Echo.
Echo Build Complete - Scroll Up to check for errors.
Echo Final build is located in the BUILD folder.
Echo copy: \%ScriptName%\ folder in the \BUILD\ folder.
Echo to: /XBMC/scripts/ folder.
pause
edit:
1. I would also skin it with guibuilder. This would allow others to write a simple xml file to match their skins. It would also eliminate the need for you to code for different resolutions.
2. Can you incorporate a list control for the mail accounts instead of buttons. Maybe use a different icon for enbabled and disabled accounts.
stanley87
2007-01-16, 23:06
First.. No need to include shutil.py and poplib.py with your script since they are already built in to python!
Second.. You need to remove the line.lower thing from writing/reading the settings, since if you for instance have the password "Mypass" it would end up as "mypass" and we have a login failure.. it will also do username "Myuser" as "myuser" and the thing fails again
Feature suggestion: unlimited InBoxes.. eg, instead of making a check mail function for server1 and one for server2 .. do a checkmail(servername)
which reads from config user,pass,pop etc for that servername..
also it builds buttons for the inboxes by counting the servers in the config..
;)
Umm, it needed to be a newer version of poplib as i use SSL... unless XBMC has updated theres?
Yes, guibuilder etc will be used, again - just geting it functional.
Yes, unlimited inbox's will be used in the future and all could be checked at the same time etc.
:-D
stanley87
2007-01-16, 23:08
First.. No need to include shutil.py and poplib.py with your script since they are already built in to python!
Second.. You need to remove the line.lower thing from writing/reading the settings, since if you for instance have the password "Mypass" it would end up as "mypass" and we have a login failure.. it will also do username "Myuser" as "myuser" and the thing fails again
Feature suggestion: unlimited InBoxes.. eg, instead of making a check mail function for server1 and one for server2 .. do a checkmail(servername)
which reads from config user,pass,pop etc for that servername..
also it builds buttons for the inboxes by counting the servers in the config..
;)
oh, i just used code from emulauncher, i had someone point out that there password would always undo caps... couldn't figure it out. Thanks heaps, this was annoying and thought that the "READ" function only could read lower case. :-D, this will help allot with some other things i struggled with.
Is the email system working for everyone? As, checking emails, not downloading emails twice etc??
Nuka1195
2007-01-17, 00:39
I'm not getting the settings screen on a fresh install. It acts like it's active though as it takes two 'back' presses to exit script. Nothing in the log.
stanley87
2007-01-17, 01:08
I'm not getting the settings screen on a fresh install. It acts like it's active though as it takes two 'back' presses to exit script. Nothing in the log.
Hmm, i'm not too sure, someone else found this but it works fine for me... i will try as soon as i get home from work, and get an update :-D
Cheers,
stanley87
2007-01-17, 09:24
Hi,
Check out the latest SVN, allot of these issues have been fixed:
http://xbmc-scripting.googlecode.com/svn/trunk/XBOX InBOX
:-D
stanley87
2007-01-17, 09:25
oh, try this:
http://xbmc-scripting.googlecode.com/svn/trunk/XBOX%20InBOX/
http://www.norin.dk/build-bat.zip an improved build.bat that also makes a zipfile for uploading to xbmcscripts.com
Nuka1195
2007-01-17, 18:26
This part automatically names the zip file with date and svn revision number. It also replaces spaces in the script name with underscores.
:: Creating zip for upload to xbmcscripts.com
ECHO --------------------------------------------------------------
ECHO Creating zip-file for upload to xbmcscripts.com
ECHO Press Enter to skip, otherwise type Y.
Set /P RunZip="Create zip file (y/n) ?: "
If /I "%RunZip%"=="Y" (
Goto CREATEZIP
) Else (
Goto SKIPZIP
)
:CREATEZIP
SET ZipName=%ScriptName: =_%
For /F "Tokens=2-4 Delims=/.- " %%i IN ('DATE /t') DO (
Set FileDate=%%k.%%i.%%j
)
Type "%CD%\.svn\entries" | FIND /v /n "&_&_&_&" | FIND "[4]" > "%CD%\revision.txt"
For /F "UseBackQ Tokens=2 Delims=]" %%r IN ("%CD%\revision.txt") DO Set Revision=%%r
Del "%CD%\revision.txt"
Set ZipName=%ZipName%-%FileDate%-Rev%Revision%.zip
MD RELEASE
CD BUILD
..\zip -rq9 ..\RELEASE\%ZipName% *.*
ECHO.
ECHO --------------------------------------------------------------
ECHO ZIP is created as: \RELEASE\%ZipName%
CD ..
GOTO ENDZIP
Good approach nuka, will set some more guidelines and this will surely come in handy, tired of always fixing stuff manually :D
stanley87
2007-01-17, 23:08
Thanks, this will be handy :-D
Whats the story?
i just downloaded this script about 4 times but its still not workin, every time i click on the script it opens up for about a second and then just kicks me back to the scripts menu...
has anybody else got this problem with this script?
21:23:13 M: 51978240 NOTICE: -----------------------------------------------------------------------
21:23:13 M: 51957760 NOTICE: Starting XBoxMediaCenter. Built on Jan 17 2007
21:23:13 M: 51957760 NOTICE: Q is mapped to: Harddisk0\Partition1\Apps\XBMC
21:23:13 M: 51957760 NOTICE: Log File is located: Q:\xbmc.log
21:23:13 M: 51957760 NOTICE: -----------------------------------------------------------------------
21:23:13 M: 51957760 NOTICE: Setup DirectX
21:23:13 M: 51933184 NOTICE: load settings...
21:23:13 M: 51933184 NOTICE: loading T:\guisettings.xml
21:23:13 M: 51798016 NOTICE: Getting hardware information now...
21:23:13 M: 51798016 NOTICE: Checking resolution 10
21:23:13 M: 51798016 NOTICE: Setting autoresolution mode 6
21:23:13 M: 51798016 NOTICE: Per AV pack settings are on
21:23:13 M: 51798016 NOTICE: Standard found : loading T:\avpacksettings.xml
21:23:14 M: 51777536 NOTICE: Getting hardware information now...
21:23:14 M: 51757056 NOTICE: Checking resolution 10
21:23:14 M: 51757056 NOTICE: Setting autoresolution mode 6
21:23:14 M: 51884032 NOTICE: q:\userdata\sources.xml
21:23:14 M: 47452160 NOTICE: Checking the Date!
21:23:14 M: 47452160 NOTICE: start dvd mediatype detection
21:23:14 M: 46927872 NOTICE: initializing playlistplayer
21:23:14 M: 46927872 NOTICE: DONE initializing playlistplayer
21:23:14 M: 46927872 NOTICE: load default skin:[Project Mayhem III]
21:23:15 M: 44810240 NOTICE: use DHCP
21:23:15 M: 44810240 ERROR: Control 901 in window 10113 has been asked to focus, but it can't
21:23:15 M: 44810240 NOTICE: initialize done
21:23:15 M: 44810240 NOTICE: Running the application...
21:23:15 M: 44396544 NOTICE: XBFileZilla: Starting...
21:23:17 M: 31838208 NOTICE: XBFileZilla: Started
21:25:03 M: 30531584 ERROR: Texture manager unable to load file: Q:\skin\Project Mayhem III\media\panel-email.png
21:25:03 M: 30531584 ERROR: Texture manager unable to load file: Q:\skin\Project Mayhem III\media\panel.png
21:25:04 M: 35954688 ERROR: Texture manager unable to load file: Q:\skin\Project Mayhem III\media\panel-email.png
21:25:04 M: 35987456 ERROR: Texture manager unable to load file: Q:\skin\Project Mayhem III\media\panel.png
21:25:04 M: 35938304 ERROR: Scriptresult: Error
realjobe
2007-01-18, 12:33
Excelent Job Stanley87! This is goinging to right direction, that I'm glad.
Ok, sorry to be a bummer, but v0.1 has still that character problem. When mail has ÄÖÅ chas init (subject also) they are interpeted quite funny.
I'm sorry, but I don't know about the char-set.???
is this pop3 only? if so is it possible to leave emails on the server? if you cant atm could you implement imap which i think allows you to leave emails on the server?
Nuka1195
2007-01-18, 23:47
bad news, i'm still not getting the settings window.
it leaves email on server (thought i read it somewhere).. but imap is a possibility.. there is a builtin lib for it in python imaplib.py i think..
stanley87
2007-01-19, 04:02
it leaves email on server (thought i read it somewhere).. but imap is a possibility.. there is a builtin lib for it in python imaplib.py i think..
Doesn't change the emails/delete them AT ALL off the server :-D
Nuka - this is not good, does it create a settings.xml file on first startup?
Nuka1195
2007-01-19, 04:27
yes
<settings>
<masterpassenable>no</masterpassenable>
<masterpass>-</masterpass>
<server1>-</server1>
<user1>-</user1>
<pass1>-</pass1>
<ssl1>-</ssl1>
<server2>-</server2>
<user2>-</user2>
<pass2>-</pass2>
<ssl2>-</ssl2>
</settings>
Nuka1195
2007-01-20, 20:51
Hi,
720p is what I run in. Your missing the settings BG for that.
self.seoverlay = xbmcgui.ControlImage(0,0,1280,720, 'background.png')
Really you should code for one resolution and use setCoordinateResolution(WHATEVER_YOU_USED)
just use only the PAL controls block and make a call to setResolution() in __init__().
def setResolution( self ):
try:
offset = 0
resolutions = {'1080i' : 0, '720p' : 1, '480p' : 2, '480p16x9' : 3, 'ntsc' : 4, 'ntsc16x9' : 5, 'pal' : 6, 'pal16x9' : 7, 'pal60' : 8, 'pal6016x9' : 9}
currentResolution = self.getResolution()
resolution = resolutions[ 'pal' ]
# if current and skinned resolutions differ and skinned resolution is not
# 1080i or 720p (they have no 4:3), calculate widescreen offset
if (( not ( currentResolution == resolution )) and resolution > 1 ):
# check if current resolution is 16x9
if ( currentResolution == 0 or currentResolution % 2 ): iCur16x9 = 1
else: iCur16x9 = 0
# check if skinned resolution is 16x9
if ( resolution % 2 ): i16x9 = 1
else: i16x9 = 0
# calculate widescreen offset
offset = iCur16x9 - i16x9
self.setCoordinateResolution( resolution + offset )
except: print 'ERROR: setting resolution'
stanley87
2007-01-21, 00:14
sorry, this is still based on the old xbmcmail script.
stanley87
2007-01-21, 00:44
i use this in the main init:
setCoordinateResolution(6) so it is pal
then i call self.setResolution
but is the setCoordinateResolution(6) needed as in your code snippit above you use:
resolution = resolutions[ 'pal' ]
should i change this to resolution = resolutions[self.getCoordinateResolution]or something?
stanley87
2007-01-21, 00:51
Ok, i did that and it works great, its up on svn now :-D
Give it a go and let me know.
Cheers
Nuka1195
2007-01-21, 01:05
the setResolution() function takes in to account widescreen tv's. if you skin for pal 4x3, but someone runs in pal16x9 it can be off a little. so don't call setCoordinateResolution() method in __init__(), just call the setResolution() function.
Something else. I like the name Xbox Inbox. But what about:
XinBox
:nod:
Sollie.
Nuka1195
2007-01-21, 01:32
This line is wrong.
resolution = resolutions[self.getCoordinateResolution]
You need to set it at the resolution you skinned at.
so resolution = 6
or for convienince i included the values for all resolutions as a dictionary
so resolution = resolutions[ 'pal' ]
stanley87
2007-01-21, 02:27
This line is wrong.
resolution = resolutions[self.getCoordinateResolution]
You need to set it at the resolution you skinned at.
so resolution = 6
or for convienince i included the values for all resolutions as a dictionary
so resolution = resolutions[ 'pal' ]
Well before i call this function, i go self.getCoordinateResolution(6), and then call the function, so when it runs the line:
resolution = resolutions[self.getCoordinateResolution]
it gets resolution = resolutions[6] = pal
yeS?
stanley87
2007-01-21, 02:28
Oh by the way, check out the latest SVN, email popups all working great :-D
Sollie, me like! Rolls off the tounge abit better, *changing now*
stanley87
2007-01-21, 02:42
Ok, changed the resolution thing and tried different reso's in xbmc_pc and they all work great :-D, also, new name XinBox. Also i'v got rid of two images that weren’t even used panel & panel-email...
If someone felt so inclined to wip up a cool logo for "XinBox" , that would be great - im no Photoshop wiz, you will get credit.
Nuka1195
2007-01-21, 03:05
self.getCoordinateResolution does not exists, so the call to setResolution() is erroring and try/except is catching it. look at the info window.
You don't need the setResolution() function, but it does compensate for some image aspect ratio issues between 4x3 and 16x9 displays.
so either use what i posted and get rid of your call to setCoordinateResolution() or get rid of setResolution().
I while ago i mailed you about the settings page. I could not open it. But your last changes fixed that. Thanks (i use 720p).
Sollie.
PS: when i change server and pass in settingswindow and use "save settings" to aply, i have to restart the script. Thats no problem, but maybe its idea to give an dialog to stop the script.
stanley87
2007-01-21, 13:06
why do you have to restart the script? it should close the "settings saved" dialog and then you can click Back??
What SVN version you using?
I use newest svn build. After changing my server and pass, hit save, pressed back, Xinbox remembered the old values. I think he cached it.
Sollie.
stanley87
2007-01-22, 01:00
I use newest svn build. After changing my server and pass, hit save, pressed back, Xinbox remembered the old values. I think he cached it.
Sollie.
Oh k, i think it might be my "checking if settings have been changed" method where it saves the first lot of settings and compares it with the new settings, I will check after work :-D
stanley87
2007-01-23, 13:28
I while ago i mailed you about the settings page. I could not open it. But your last changes fixed that. Thanks (i use 720p).
Sollie.
PS: when i change server and pass in settingswindow and use "save settings" to aply, i have to restart the script. Thats no problem, but maybe its idea to give an dialog to stop the script.
This should be fixed in the newest SVN..
YES?
Skindred
2007-01-24, 19:26
I don't work for me :(
It loads but it quits instantly.
I just put it in the scripts dir
and I am running it from the scripts option
any ideas?
I don't work for me :(
It loads but it quits instantly.
I just put it in the scripts dir
and I am running it from the scripts option
any ideas?
i have the same problem, posted ther log file on page 2 i think!!!
Nuka1195
2007-01-24, 19:51
have you grabbed the latest from svn, it's now called xinbox and it works here.
http://xbmc-scripting.googlecode.com/svn/trunk/XinBox (https://xbmc-scripting.googlecode.com/svn/trunk/XinBox)
Skindred
2007-01-24, 19:53
yeah I did
I also grabbed the latest from xbmcscripts.com ...
stanley87
2007-01-25, 06:22
yeah I did
I also grabbed the latest from xbmcscripts.com ...
Hmm, in the next SVN i will try to write in some debug information, so i can help you get it working.
What XBMC build you using? You did do a FRESH install, and not use any old files from older releases?
stanley87
2007-01-25, 06:27
Hi,
my SVN has changed, it is now:
http://xbmc-scripting.googlecode.com/svn/trunk/XinBox
:-D
Some things i like to see in the future:
- date
- read/ not read indication
- resume back to maximode
-...
Sollie.
XinBox rocks!!! :nod: :grin:
stanley87
2007-01-25, 10:53
Is anyone having issues with the script downloading the same emails twice? I have noticed sometimes after i have deleted emails off the server, then XinBox recognises some of the emails still on the server that it allready has as new emails and downloads them again.
I plan to fix this with a better way of id'ing the emails... in the futire, maybe the mail.top function....
Anyone having issues with this?
Skindred
2007-01-25, 18:13
Hmm, in the next SVN i will try to write in some debug information, so i can help you get it working.
What XBMC build you using? You did do a FRESH install, and not use any old files from older releases?
No fresh install
but I used an older XBMC before
the one with only one .xml config file in the rootdir of XBMC
now they are all stored in userdata, and I didn't have that dir before
are there any files in need to delete in E:\TDATA or E:\UDATA?
Coz I remember XBMC used to work with those...
(I haven't updated my XBMC in like, uhm, a year or so :x
But I grabbed XBMC-2.0.1-FINAL-FAT-T3CH and been using it for uhm 3 days or so)
When you use an 1 year old xbmc, you running probaly an incompatible python engine. Python has been updated to 2.4 a little year ago. So i yhink you have to update your xbmc.
Sollie.
i have the latest build of xbmc, but it still wont run..
just opens up for a second and kicks me back to the script screen!!!!
stanley87
2007-01-26, 02:34
i have the latest build of xbmc, but it still wont run..
just opens up for a second and kicks me back to the script screen!!!!
Hmm, i will try hard to fix this, the version on xbmc-scripts actually didn't run for me either :-s, i will fix over weekend and get the new version up :-D sorry about this everyone :-(
stanley87
2007-01-26, 06:53
i have the latest build of xbmc, but it still wont run..
just opens up for a second and kicks me back to the script screen!!!!
I found the problem, for some reason when it is downloaded straight from XBMCscripts.com, it doesn't create the DATA directory, and hence the script faulting. I have corrected this so the script makes the data directory, this will be uploaded to xbmcscripts.com.
Think when it is unzipped, it doesn't like creating empty folders.
For now, if you go into where you have put XinBox and add a new folder named "Data" into the /XinBox/Src directory, and then run the script, it should now work... if this folder is already there, then check the "temp" folder is already there... if both are and it still doesn't start then I’m confused. Let me know please. If you don't know how to create directories on your xbox then please get the latest xinbox v.0.3 script off xbmcscripts (should be up on there tomorrow)
This may also be the problem for the other guy who can't get this working.
Cheers,
Stanley87
Stanley, it's called errorcontroling .. always check for files and folder before accessing them.. Always assume the worst ;)
nice one stanly87 its workin great now....
nice script, love the mini mode!!!!!
stanley87
2007-02-01, 08:37
Cheers! :-D u make scripters want to continue!
tried the Script under Clearity Skin and there is nothing but a white background to see?!
In PMIII everything is okay. Any ideas why that?
Thanks. Oh, and cool script. Keep on the good work, please.
Maybe its an idea to use fullscreen as default. Like that the attachment button can be moved to the fullscreen window.
Sollie.
stanley87
2007-02-04, 12:50
satyris - i have fixed this problem with Clearity skin in the newest SVN. All the scripts images are now sourced through the scripts images folder (so doesn't rely on skins images). Get the newest SVN at:
http://xbmc-scripting.googlecode.com/svn/trunk/XinBox
all you would need to grab is the newest default.py and all the new images in the Src/Images folder.
They have all been grabbed from the PM3 skin.
satyris - i have fixed this problem with Clearity skin in the newest SVN. All the scripts images are now sourced through the scripts images folder (so doesn't rely on skins images). Get the newest SVN at:
http://xbmc-scripting.googlecode.com/svn/trunk/XinBox
all you would need to grab is the newest default.py and all the new images in the Src/Images folder.
They have all been grabbed from the PM3 skin.
Thanks, worked great. Will continue testing ;-)
stanley87
2007-02-05, 11:23
Appreciate The Help! :-d