Added a getInfoTag to python.

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Nuka1195 Offline
Skilled Python Coder
Posts: 3,916
Joined: Dec 2004
Reputation: 17
Post: #11
i noticed the aspectratio has changed.

in the python docs, which is how it use to be.
Quote:"aspectratio : integer - (values 0 = scale down (black bars), 1 = scale up (crops), 2 = stretch (default)");

this is how it currently works.
Quote:"aspectratio : integer - (values 0 = stretch (default), 1 = scale up (crops), 2 = scale down (black bars)");

i just want to make sure it's going to stay this way.

thanks

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #12
yes, that is the correct behaviour. stretch = 0 as default.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,916
Joined: Dec 2004
Reputation: 17
Post: #13
(nuka1195 @ may 29 2006,22:52 Wrote:the getcputemp() doesn't work. looking at cfancontroller::getcputempinternal() theres a lot different.

since you can now get the infolabel for it may i suggest deleting it? i doubt there are many if any scripts that use it.

also the sleep() method. i don't understand it. if it's suppose to do what the description says, it doesn't. when i tried using it. all it did was keep the script from continuing after that call. maybe it's not necessary eitherConfused

Quote:  // sleep() method
 pydoc_strvar(sleep,
"sleep(integer) -- sleeps for 'time' msec.\n"
"\n"
"throws: pyexc_typeerror, if time is not an integer\n"
"this is useful if you have for example a player class that is waiting\n"
   "for onplaybackended() calls.\n");

 pyobject* xbmc_sleep(pyobject *self, pyobject *args)
{
pyobject *pobject;
if (!pyarg_parsetuple(args, "o", &pobject)) return null;
if (!pyint_check(pobject))
{
pyerr_format(pyexc_typeerror, "argument must be a bool(integer) value");
return null;
}

long i = pyint_aslong(pobject);
while(i != 0)
{
py_begin_allow_threads
sleep(500);
py_end_allow_threads

py_makependingcalls();
i = pyint_aslong(pobject);
}

py_incref(py_none);
return py_none;
}
i'm bumping this question for the getcputemp() and sleep() methods.

about the sleep() it looks to me that if you call it with any integer other than zero, it enters an endless loop.

can the sleep(500); statement be changed to sleep(i); and get rid of the while loop?

thanks

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Post Reply