LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2008, 09:31 PM   #166
ilikerobots
LQ Newbie
 
Registered: Apr 2008
Posts: 17

Rep: Reputation: 0

On the MLB support forum is this from a mlb rep:

Quote:
the account verification was turned back on today, so if your having issues please contact MLB.com support as they should be able to reset your user account.

This has nothing to do with the latest build, they are two separate items.
__________________
Thank you,
Mosaic Support
and this

Quote:
I can tell you that when this occurs you are locked out of your account for an hour. I did not set the time period, I'm just the messenger. Web browser uses a session and Mosaic uses a session. After three sessions you may be locked out. When using the website make sure you "sign out" if you want to release that session. Mosaic does this automaticly.
and finally FYI if you're impatient:
Quote:
When this happens, you can call MLB.tv (866-800-1275) and they will reset your account immediately.

Last edited by ilikerobots; 04-08-2008 at 09:36 PM.
 
Old 04-08-2008, 10:38 PM   #167
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
I think the issue is that I need to look a bit more closely at the various communication steps in the script to make sure that it "signs out" when it disconnects, to release the session. Apologies to anyone if they get this error as a result of the script -- it does go away, but it's annoying.

EDIT: Yeah, I think the problem is that the user never officially logs out. I've written a new method that logs out after the video is done playing. I have to wait until tomorrow when my current ban is lifted to try it out on live games. If it fixes the problem, it will go into that 0.1beta version with all the other new stuff.

Wolfvorkian -- daftcat had a similar issue a couple of pages back. He had a solution...

Last edited by jkr; 04-08-2008 at 11:56 PM.
 
Old 04-09-2008, 01:26 AM   #168
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by Wolfvorkian View Post
Thank you. Very nice of you offer. Below are the error messages I get after I select a game and hit enter and a bunch of lines have flown by. Everything then comes to an abrupt halt and it goes back to the prompt again. I appreciate the help.


File "/usr/lib/python2.5/site-packages/ClientForm.py", line 698, in do_input
raise ParseError("start of INPUT before start of FORM")
ClientForm.ParseError: start of INPUT before start of FORM
For specific details, there was a link I posted a page or two back.

For a quick fix, edit that file:

/usr/lib/python2.5/site-packages/ClientForm.py

Comment out line 698 and change it to return instead of raising an error:

Seek this line 698:

Code:
    raise ParseError("start of INPUT before start of FORM")
and change to:

Code:
    #raise ParseError("start of INPUT before start of FORM")
    return
Make sure you match the indenting or you'll flag a different error. That should fix it for you.
 
Old 04-09-2008, 01:39 AM   #169
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
I can't get the Dodgers / Diamondbacks game tonight. It says:

[mlbviewer couldn't read this...]

That's the April 8 game if you want to debug it.
 
Old 04-09-2008, 01:48 AM   #170
Wolfvorkian
Member
 
Registered: Sep 2007
Distribution: Arch
Posts: 108

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
For specific details, there was a link I posted a page or two back.

<snip>
Make sure you match the indenting or you'll flag a different error. That should fix it for you.
Thanks to you and Jesse, I now have it working. I went back and found the post and the fix and feel silly for having overlooked it. All is well that ends well, I now can watch games without using the browser.
 
Old 04-09-2008, 10:11 AM   #171
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
I wanted to release this newer version to help deal with the multiple login problem. It's not ideal -- it logs in and out for each game, instead of keeping one session the whole time (would make things a bit snappier). The problem there is that I don't know how to ensure that there's a final log-out if the script exits ungracefully. This way, at least, you'll log out of your session when you stop watching video.

Note: this version has new configuration. First, video and speed have been moved to .mlbtv (though if you don't enter them, it has default values). Also, mlbtv, now uses EQUAL signs, not colons.
Code:
user = email
pass = pass

# If you don't put in %s, it will append the url at the 
# end of the command, but if you want to do pipe output or something, 
# you can use %s.

video_player = whatever %s

speed = 800

# These are optional. If there are teams in your area 
#(Mets and Yanks, Giants and A's) that are blacked out 
# and you don't want listed among the live games (they'll 
# still be listed among the archived games, because those 
# aren't blacked out), you can put them here.
#
# codes are: 
#       'ana', 'ari', 'atl', 'bal', 'bos', 'chc', 'cin', 
#       'cle', 'col', 'cws', 'det', 'fla', 'hou', 'kc', 'la', 
#       'mil', 'min', 'nym', 'nyy', 'oak', 'phi', 'pit', 'sd', 
#       'sea', 'sf', 'stl', 'tb', 'tex', 'tor', 'was'

blackout = nym
blackout = nyy
- Basic LIRC support (useful for watching on tv or mythtv). Configure in ~/.lircrc (prog = mlbviewer, cmds = Left, Right, Up, Down, Enter, Exit, Refresh).

- Generate the game names from given team codes, instead of trying to parse the text string. Should cut down on errors. (This also means that in the future, it will be easy for the user to configure the presentation.)

- No more requirement for ClientCookie. ClientForm still required.

- ClientFrom automatically turns off backwards compatibility which removes the annoying warning.

NOTE: This isn't beta yet. I just wanted to share it early, in the hopes that it will solve the login issue. Testing is, of course, appreciated.

Script can be found here:

http://www.columbia.edu/~jr2075/mlbviewer.py

Older version, in case something got screwed up, can be found at:

http://www.columbia.edu/~jr2075/mlbviewer_old.py

Last edited by jkr; 04-09-2008 at 11:31 AM.
 
Old 04-09-2008, 01:37 PM   #172
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by jkr View Post
I wanted to release this newer version to help deal with the multiple login problem. It's not ideal -- it logs in and out for each game, instead of keeping one session the whole time (would make things a bit snappier). The problem there is that I don't know how to ensure that there's a final log-out if the script exits ungracefully. This way, at least, you'll log out of your session when you stop watching video.

Note: this version has new configuration. First, video and speed have been moved to .mlbtv (though if you don't enter them, it has default values). Also, mlbtv, now uses EQUAL signs, not colons.
Code:
user = email
pass = pass

# If you don't put in %s, it will append the url at the 
# end of the command, but if you want to do pipe output or something, 
# you can use %s.

video_player = whatever %s

speed = 800

# These are optional. If there are teams in your area 
#(Mets and Yanks, Giants and A's) that are blacked out 
# and you don't want listed among the live games (they'll 
# still be listed among the archived games, because those 
# aren't blacked out), you can put them here.
#
# codes are: 
#       'ana', 'ari', 'atl', 'bal', 'bos', 'chc', 'cin', 
#       'cle', 'col', 'cws', 'det', 'fla', 'hou', 'kc', 'la', 
#       'mil', 'min', 'nym', 'nyy', 'oak', 'phi', 'pit', 'sd', 
#       'sea', 'sf', 'stl', 'tb', 'tex', 'tor', 'was'

blackout = nym
blackout = nyy
- Basic LIRC support (useful for watching on tv or mythtv). Configure in ~/.lircrc (prog = mlbviewer, cmds = Left, Right, Up, Down, Enter, Exit, Refresh).

- Generate the game names from given team codes, instead of trying to parse the text string. Should cut down on errors. (This also means that in the future, it will be easy for the user to configure the presentation.)

- No more requirement for ClientCookie. ClientForm still required.

- ClientFrom automatically turns off backwards compatibility which removes the annoying warning.

NOTE: This isn't beta yet. I just wanted to share it early, in the hopes that it will solve the login issue. Testing is, of course, appreciated.

Script can be found here:

http://www.columbia.edu/~jr2075/mlbviewer.py

Older version, in case something got screwed up, can be found at:

http://www.columbia.edu/~jr2075/mlbviewer_old.py
Good stuff. I'm going to hack it up for mlbrecord. The idea I have is to remove the curses and support something like:

mlbrecord kc

to record the kc game today

mlbrecord kc 04062008

to record the game from the 4/6

mlbrecord

to print out today's schedule

This way I don't have to draw a curses (please wait blah blah seconds for your game to begin recording) when the game appears in 'W' but is not yet 'I' (or 'F')

If you have audio support, I'll use that too as an option.

By the way, I was able to watch the Dodgers game this morning even though the text wasn't printable.

I'm also going to get mlbviewer working under cygwin and I'll post that on the howto. Speaking of the howto, let me know when you want mlbviewer posted on the howto. Right now I still only describe the firebug hack.

http://www.eds.org/~straycat/mlblinux.php
 
Old 04-09-2008, 01:58 PM   #173
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
quick python question

If I open a file in mainloop, will its file descriptor be available to other classes? Would I have to pass that file descriptor as an argument? How would I do that? Does python support pointers or can I pass by name directly?

I hacked up the original mlbviewer to add in some basic logging support so I could see what mlbviewer knows and when it knows it, but I wouldn't mind providing a patch to mlbviewer (separate from my mlbrecord project) to include a debug log feature.

Thanks!
 
Old 04-09-2008, 02:17 PM   #174
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Well python mixes oop and procedural. mainloop isn't in a class, but it introduces instances of the other two classes. That wasn't very clear... With what I think you want to do, though, you would have to return the file descriptor. However, that's not really what mainloop is for -- it's mainly made the way it is in order to do the necessary redraws for curses.

What I would actually suggest doing is creating a new file, mlbrecord.py, in the same directory and at the top of it:

import mlbviewer

This will make the classes in mlbviewer available to your script, under the mlbviewer namespace. So you could then initialize a class in your new script:

sched = mlbviewer.MLBSchedule()

or whatever. Same with mlbviewer.GameStream(). So you don't have to hack up a workflow which might is mainly suitable for an interface that you don't have much need for.
 
Old 04-09-2008, 02:58 PM   #175
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Also, if you've already downloaded the new version (pre 4pm ET), you'll have to download it again.

Or you could just find the line that says 'mp_login_register' on line 242 and change it to 'mp_login'
 
Old 04-09-2008, 03:02 PM   #176
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by jkr View Post
Well python mixes oop and procedural. mainloop isn't in a class, but it introduces instances of the other two classes. That wasn't very clear... With what I think you want to do, though, you would have to return the file descriptor. However, that's not really what mainloop is for -- it's mainly made the way it is in order to do the necessary redraws for curses.

What I would actually suggest doing is creating a new file, mlbrecord.py, in the same directory and at the top of it:

import mlbviewer

This will make the classes in mlbviewer available to your script, under the mlbviewer namespace. So you could then initialize a class in your new script:

sched = mlbviewer.MLBSchedule()

or whatever. Same with mlbviewer.GameStream(). So you don't have to hack up a workflow which might is mainly suitable for an interface that you don't have much need for.
They're actually two different projects. With mlbrecord, I'll probably hack up mlbviewer pretty good or import it as you suggested.

I have a basic hack of your old script that just uses the curses menu to select a game to record, generates a filename based off date and gameid, and calls mplayer with the necessary arguments to record. I did a couple of quick tests yesterday and I have to say, it was awfully cool to be able to pause and seek through the file. I'm recording the Dodgers game right now.

The other question is when I was trying to figure out why things were going wrong, I inserted my own logging in various places. This meant moving the file i/o calls from mainloop to deeper into the classes until I could figure out exactly how far the script was getting and what it knew at the time before it crapped out on me. Eventually, I figured out it wasn't the script at all but the Clientform library. But still, it might be nice to have some optional debug logging that says where it is and what it knows. Then again, it might not be necessary since most of the problems encountered so far have been outside of the script's code (mlb.com's problems or clientform problems.)
 
Old 04-09-2008, 03:41 PM   #177
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
Sounds like the recording feature could be used to make something of a baseball DVR. When watching live TV, MythTV records the stream to disk and plays it back, creating the DVR functionality. It would be pretty nice to be able to do that with baseball games, too. Save the stream to disk and immediately begin playing back the stream. Then yes, seeking should be possible and buffer problems wouldn't cause a complete failure of the player window.

And if you came in late, you can watch it from the beginning and "catch up" during commercials.

I like it!
 
Old 04-09-2008, 03:56 PM   #178
ilikerobots
LQ Newbie
 
Registered: Apr 2008
Posts: 17

Rep: Reputation: 0
Quote:
Originally Posted by jkr View Post
Or you could just find the line that says 'mp_login_register' on line 242 and change it to 'mp_login'
Awesome. Works for archived and live now. Great job again, jkr.
 
Old 04-09-2008, 05:26 PM   #179
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by Theophile View Post
Sounds like the recording feature could be used to make something of a baseball DVR. When watching live TV, MythTV records the stream to disk and plays it back, creating the DVR functionality. It would be pretty nice to be able to do that with baseball games, too. Save the stream to disk and immediately begin playing back the stream. Then yes, seeking should be possible and buffer problems wouldn't cause a complete failure of the player window.

And if you came in late, you can watch it from the beginning and "catch up" during commercials.

I like it!
I may have you test the watch while recording aspect when I have something ready. My linux machine is a sputtering 700mhz/256mb ram. I get that "your machine is too slow" error if I have a firefox window open while I'm playing the stream. I can only imagine what it would do if I was dumping and watching at the same time.

But yeah, it will be pretty nice when it's working. I was recording the Dodgers game until my router timed out my connection :-( I might keep the curses interface after all just so I can print a time counter and mb counter to keep the session active while I'm at work.


[EDIT: I remember where I was going with that thought. I have part of a Dodgers game recorded. I was able to fast forward through the commercial breaks and pause it when I got a phone call. I had to come back for work but I can seek back to where I left off when I get home again. Try that with an archived stream.]

I'm still learning python and not putting a whole lot of time into this yet. I might have a very alpha version available by next Monday.

Last edited by daftcat; 04-09-2008 at 05:29 PM.
 
Old 04-09-2008, 08:19 PM   #180
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
I have it now working under cygwin...almost. The archived games work about 80% of the time. The live games aren't working yet. I've tested with both Windows Media Player and the cygwin-ized mplayer. Mplayer definitely behaves better (and provides more information.) In the process, I've started some basic work on putting debugging information into mlbviewer using the curses interface.

This is really just informational, jkr. Unless I run into a problem that is also present on Linux, I don't expect you to support the cygwin version.

But if I can get it working, I like this a lot better than navigating the web site. ;-)
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration