xboxscene.org forums

Author Topic: Python Xm Script Help  (Read 897 times)

ZeroIF

  • Archived User
  • Newbie
  • *
  • Posts: 4
Python Xm Script Help
« on: September 20, 2005, 07:11:00 PM »

I have been using the xm script or some time now. The only problem i see right now, is that the genres and category are not current.
I made an attempt to update the XmBase file, however, every time the file size reaches 16k, the script either wont run or is missing data.

Has anyone experienced this problem too?

by the way, all the changes i made up until the file size reached 16k worked perfectly fine...


Cheers,
Z.IF
Logged

NewNole2001

  • Archived User
  • Newbie
  • *
  • Posts: 8
Python Xm Script Help
« Reply #1 on: September 23, 2005, 02:21:00 PM »

Check out XBMCScripts.com I have posted a greatly updated version of this script.  it automatically downloads the genre and channel lists upon startup, and updates the song list every 25 seconds.  I did away with the Categories as I felt they were pointless. The name of the script is: XMROforXBMCv0.9.1 check it out and tell me what you think.  
Before you upload this script to your xbox, delete RunXM.py and the XmBase directory and the upload and restart your xbmc.. this will make sure that the scripts inside the XmBase directory are properly interpreted by the Python Interpreter.
Have fun!!

I wrote and tested this script on the 2005-09-12 T3CH build, so if you don't have that then update your XBMC as well for optimal performance.

This post has been edited by NewNole2001: Sep 23 2005, 09:22 PM
Logged

ZeroIF

  • Archived User
  • Newbie
  • *
  • Posts: 4
Python Xm Script Help
« Reply #2 on: September 24, 2005, 04:14:00 PM »

wow. Thats great.

I was looking to learn python scripting, however i suppose i dont need to now.

Thanx again,

ZIF
Logged

ZeroIF

  • Archived User
  • Newbie
  • *
  • Posts: 4
Python Xm Script Help
« Reply #3 on: September 24, 2005, 05:31:00 PM »

NewNole2001,

I tried your script. I ran into some problems where it kept telling me to change the settings file.

Maybe it was something i was doing wrong. Anyhow, here's how i made your stuff work:

remmed out the f.open line thru f.close

added:
USERNAME = "<myuserhere>"
PASSWORD = "<mypasshere>"

thanks again!

Z.IF

PS Ever think about adding a nicer GUI?
Logged

NewNole2001

  • Archived User
  • Newbie
  • *
  • Posts: 8
Python Xm Script Help
« Reply #4 on: September 25, 2005, 01:22:00 AM »

I'm not sure why you're having problems with the settings.txt file.  commenting it out and hardcoding it will work, but I was trying to make it less intimidating for n00bs...  As far as the GUI, what would you like?  My only problem is that I do not have an HDTV, so I can only do stuff on my SDTV.  What would your suggestions be?  I personally really like the GUI as it is now, but that is mainly b/c I created it  tongue.gif I am open to suggestions.  Also, everyone is free to update my code if they want, there is a lot of extraneous code in there for features that I implemented and then took away access to for personal reasons.  If you would like to get a copy of my current working copy of the code just PM me.  It is not guaranteed to work though as it is a working copy (makes no sense, I know.. But by working copy I mean that I am working on it to add new features.. Actually I'm mainly working on killing 99% of the bugs..)  I am also working on adding code directly into XBMC with the hopes that I can set the Artist and Title for the current playlist item.  This would make the visualization look better, since it would look like any MP3 or other item.  Unfortunately, this will take a while as I have to do more research into where and what I need to add to expose the functionality to Python correctly.  I have added the code for "setTitle" and "setArtist' to musicListItem.cpp or whatever the name of the file is.. but properly exposing this to Python where it isn't a pain in the ass to use is the hard part. Lots of reading the code and trying to figure out how stuff gets set.  If anybody can offer me their expertise, or better yet, just write the code and commit it to CVS for me, it would be awesome.

Again, what type of changes to the GUI would you like?  I can't guarantee you that I will make them, because I wrote this script first for me, and second for the community ( don't we all when we come up w/the idea on our own ), but I think you can rest assured that someone could implement the changes you would like.  Now off to sober up after waaay too many drinks, and another unnecessary trip to the Waffle House...  beerchug.gif
Logged

NewNole2001

  • Archived User
  • Newbie
  • *
  • Posts: 8
Python Xm Script Help
« Reply #5 on: September 28, 2005, 01:10:00 PM »

QUOTE(ZeroIF @ Sep 24 2005, 08:06 PM)
NewNole2001,

I tried your script. I ran into some problems where it kept telling me to change the settings file.

Maybe it was something i was doing wrong. Anyhow, here's how i made your stuff work:

remmed out the f.open line thru f.close

added:
USERNAME = "<myuserhere>"
PASSWORD = "<mypasshere>"

thanks again!

Z.IF

PS Ever think about adding a nicer GUI?
*




A possible fix is posted in the other thread for XMROonXMBC thread that was just created. This might have been your problem as well.. Check it out smile.gif
Logged

zukunft

  • Archived User
  • Newbie
  • *
  • Posts: 3
Python Xm Script Help
« Reply #6 on: October 05, 2005, 04:43:00 PM »

I have followed all of your tips in each thread and still cannot get this script to work.  It keeps telling me to edit my settings file which I have done already.  My settings file only consists of 2 lines.  One for my username and one for my password.  I have entered thos and when I run the script, it says "loggong in" but then tells me I need to edit the settings file.  Any suggestions?

The previous script worked without any problems for me but was very slow and didn't update the songs correctly.  I would really love to get this one working so if you have any suggestions, that would be great.  Thanks in advance and keep up the great work.
Logged

zukunft

  • Archived User
  • Newbie
  • *
  • Posts: 3
Python Xm Script Help
« Reply #7 on: October 05, 2005, 07:39:00 PM »

Never mind.  I figured it out.  My login on listen.xmradio.com is in all caps but for this script, I needed to type it all in lower case.  Thanks.

One question I have though.  Is it normal for each channel to take a while to buffer?  It must take a good 3-4 minutes after I pick a channel that the music finally starts to play.  Just curious.
Logged

NewNole2001

  • Archived User
  • Newbie
  • *
  • Posts: 8
Python Xm Script Help
« Reply #8 on: October 05, 2005, 08:25:00 PM »

QUOTE(zukunft @ Oct 5 2005, 10:14 PM)
Never mind.  I figured it out.  My login on listen.xmradio.com is in all caps but for this script, I needed to type it all in lower case.  Thanks.

One question I have though.  Is it normal for each channel to take a while to buffer?  It must take a good 3-4 minutes after I pick a channel that the music finally starts to play.  Just curious.
*


lower your cache size for unknown internet streams to 256 kb
Logged

zukunft

  • Archived User
  • Newbie
  • *
  • Posts: 3
Python Xm Script Help
« Reply #9 on: October 05, 2005, 09:07:00 PM »

QUOTE(NewNole2001 @ Oct 5 2005, 11:00 PM)
lower your cache size for unknown internet streams to 256 kb
*



Excellent!  That worked perfectly.  Thanks for your help.  The default is like 4 megs so no wonder it took so long to fill up.  Love the script too by the way.
Logged

NewNole2001

  • Archived User
  • Newbie
  • *
  • Posts: 8
Python Xm Script Help
« Reply #10 on: October 05, 2005, 09:13:00 PM »

glad you like it.. it was a lot of work.. not because the script is complicated, but because I taught myself python while writing it.  When I get back around to it, I will finally release v1.0
Logged

lath19

  • Archived User
  • Newbie
  • *
  • Posts: 1
Python Xm Script Help
« Reply #11 on: March 05, 2006, 05:31:00 PM »

I hate reviving old threads but I still haven't been able to find a fix for this.  After searching for a while it is obvious that several people have gotten this script to work.  I have tried every suggestion that I have found without any luck.

Anybody out there have a working version of XMROforXBMCv0.9.1 care to upload it somewhere?  Everytime I try logging in I get a "please edit your settings" message then it just hangs until I do a IGR.
Logged