LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MLB.TV in Linux (https://www.linuxquestions.org/questions/linux-software-2/mlb-tv-in-linux-432479/)

daftcat 04-24-2008 02:03 PM

Question:

Is it more intuitive to use 'L' (or lowercase 'l' too) to return to listings from Top Plays or would you rather use 'q' to quit out of the Top Plays screen?

My feeling is that 'q' should work universally to quit the application no matter what screen you're in and thus, 'l' or 's' (when scores is implemented and integrated) would indicate which screen you want to go to next.

Theophile 04-24-2008 02:25 PM

Personally, I think "t" should jump to "today."

I propose a menu-based system where you go to the day and game you want and press "m". This would bring up a menu for that game where you could select:

Audio
Top Plays
Game Notes
Box Score
Record (if implemented)

"Esc" would be the universal "Back" function. It also makes it easier to add functions as menu items rather then assign them hotkeys to remember.

CartersAdvocate 04-24-2008 02:41 PM

Quote:

Originally Posted by daftcat (Post 3131745)
Ah, now this is the beauty of open source. This sounds like a great opportunity for you to look at our splash screen code (which is all of about four lines) and decide if you want to implement your own custom splash screen (which would bloat it up to about six or eight lines.)

The biggest problem I see with implementing a user-defined splash screen is replacing whatever user-defined tag with the version string. I guess if the user wants to go through all the trouble of formatting an ascii graphic that doesn't look like a$$ when cooked through curses, then it should be up to them to also figure out where to put the version string in, how long the version string will be, and go through all the iterations of poorly formatted splash screen until they get it right.

All in all, this doesn't really sound like a feature I want to implement--a very low bang to buck ratio. Try bribing me with tickets and maybe I'll reconsider. ;-) What's your local team?

Ahh, I hadn't looked at the code, and just thought you were feeding it in there in plain text, so thought you could just pull the text from a file. I may add my own in there, but then I would have to re-do the changes everytime I pull down new versions from svn right? (this is my first time using svn)

I'm from St. Louis, so I'm a Cardinals fan, although I don't live there anymore. I'm in Columbus, OH now, so I don't really have a 'local' team. I'm right in between Cincinnati, Cleveland, and Pittsburgh.

daftcat 04-24-2008 03:01 PM

Quote:

Originally Posted by Theophile (Post 3131776)
Personally, I think "t" should jump to "today."

I propose a menu-based system where you go to the day and game you want and press "m". This would bring up a menu for that game where you could select:

Audio
Top Plays
Game Notes
Box Score
Record (if implemented)

"Esc" would be the universal "Back" function. It also makes it easier to add functions as menu items rather then assign them hotkeys to remember.

I hate menus because they are clutter magnets. What starts with a "Game" menu, turns into a "Preferences" menu, a "View", a "Help", etc. The other problem with menus is that we'd probably have to draw the menu differently based on the screen we're in, so it becomes another object to manage and more state to keep track of.

I hate "Back" buttons too. I like progress. If I want to start at listings, check the scores, see the line scores, the box scores, and then the highlight video of Alex Gordon's HR, I want to say, "take me to it" rather than retracing my steps until I reach a junction point again. I'm a big fan of hot keys because it's instant gratification (no hoops to jump through or menu options to look for.) From a code perspective, "back" functionality becomes a pain because then I have to keep a history of which screens you visited.

I can sympathize with having too many, though. Hotkeys is both a strength of mplayer and a point of contention. I find myself going to the docs or the man page frequently to figure out which hotkey does what I want. I think <enter> in jump prompt makes it easy enough to jump to today without wasting another hotkey on it. At least 'h' for help should work in every screen. ;-)

A compromise I could think of is to put hotkey hints at the bottom of the screen above the status bar like pine and nano (except without having to use the Ctrl-key to get anything done. ;-)

Another thing I'm talking to jkr about is supporting a core set of actions for each screen and implementing each screen as its own class. The screen would have to implement each core action (or print a "not supported" message.) The user experience would be a common set of methods like up/down/left/right/enter/jump/audio and selecting which screen they want to go to. This is similar to the web experience where you select your screen (scoreboard, standings, players, teams, etc) and your actions (play video, select date, give me more details.)

I'll look at the hotkey hint bar and see if it adds more value than clutter.

Theophile 04-24-2008 03:14 PM

Maybe I wasn't clear. I said "back" when I meant "up," I suppose. Think of it this way:

You navigate to the game that interests you (the object) and then you press one button that gives you a list of things you can do with that object. "Escape" just gets you out of that. It would do the same thing the "L" key does when you're in the "Top Plays" menu.

You already use menus, I'm just suggesting using one more to make the program's features transparent. Not only does it eliminate the needs to remember (or use a legend) all the hotkeys, it allows users to see new features after an upgrade without having to dig through documentation or read changelogs.

Suppose MLBAM reinstates Condensed Games and you add support for it. If you have an "action" menu, users can clearly see that "Condensed Game" is now something they can do with their chosen game. Otherwise, they just have to know that pressing "C" will accomplish this.

I'm not proposing a menu system like desktop applications have (File, Edit, View, etc.) but more of a navigational vehicle, akin to MythTV, though simpler.

daftcat 04-24-2008 03:16 PM

Quote:

Originally Posted by j3ff3r (Post 3131790)
Ahh, I hadn't looked at the code, and just thought you were feeding it in there in plain text, so thought you could just pull the text from a file. I may add my own in there, but then I would have to re-do the changes everytime I pull down new versions from svn right? (this is my first time using svn)

I'm from St. Louis, so I'm a Cardinals fan, although I don't live there anymore. I'm in Columbus, OH now, so I don't really have a 'local' team. I'm right in between Cincinnati, Cleveland, and Pittsburgh.


Ah, a rival. I'm not from Kansas City, but I've been a Royals fan ever since I was young. I think it started with all the George Brett cards I had in baseball card collection but it was definitely solidified by Danny Tartabull and his wife. She was a customer of my Dad's pharmacy and he gave me an autographed baseball of the late 80's Royals (don't remember the year but it has Seitzer, Saberhagen, Quiz, and Bo among others) and tickets to season finale at Kauffman. Mom was doing business trips to St. Louis at the time so it wasn't that hard for us to get out there.

Right now we print the splash directly using about three or four lines of code which automatically adjusts where to put the strings based on the length of the string.

It wouldn't be that hard to read it from a file except that you might be constantly changing that file to adjust for any differences in version string length between releases. Also your file would look kind of funky on the disk because you'd have to leave room in the ascii image for the string to expand the lines to right length.

If you wanted to code it up with a text replace on some tag like %version%, perhaps we could include it the official source and mask it out with a config file option so you wouldn't have to patch every version you download. Note that we use four lines (three for name, version, url, and one for "Please wait while listings load..." e.g. the real reason why we have a splash at all.)

daftcat 04-24-2008 03:32 PM

Quote:

Originally Posted by Theophile (Post 3131821)
Maybe I wasn't clear. I said "back" when I meant "up," I suppose. Think of it this way:

You navigate to the game that interests you (the object) and then you press one button that gives you a list of things you can do with that object. "Escape" just gets you out of that. It would do the same thing the "L" key does when you're in the "Top Plays" menu.

You already use menus, I'm just suggesting using one more to make the program's features transparent. Not only does it eliminate the needs to remember (or use a legend) all the hotkeys, it allows users to see new features after an upgrade without having to dig through documentation or read changelogs.

Suppose MLBAM reinstates Condensed Games and you add support for it. If you have an "action" menu, users can clearly see that "Condensed Game" is now something they can do with their chosen game. Otherwise, they just have to know that pressing "C" will accomplish this.

I'm not proposing a menu system like desktop applications have (File, Edit, View, etc.) but more of a navigational vehicle, akin to MythTV, though simpler.

I actually think a legend accomplishes the same thing without requiring extra key strokes. Code wise, I can see a menu as getting tricky because it would be another screen object to manage if you wanted to navigate the menu (e.g. up/down and select.) A legend is something we could manage as a hideable object that accomplish much the same except that you would still be responsible for entering in a hotkey but at least you'd see your options in front of you.

Then again....

I'm not ruling it out. There are a lot of OOP features and principles we're not using yet. We could define a base menu class and let each screen inherit that class with entries and functions that make sense for that screen.

You'll likely see a hideable legend first and perhaps a menu as our gui code becomes more object-oriented.

If there are no objections, when condensed games come back, I intend to put those on the top plays screen to reuse code. I suppose it would be possible to hotkey that to 'c' as well.

daftcat 04-24-2008 08:25 PM

Has anyone else noticed that mlbviewer says the second CLE @ KC game is to start at 3:33 AM ET?

That's not right. My scoreboard app says the same thing and it's pulling from a different xml.

Oh well, all we can do is parse what we're given. And I sure hope for both teams' sake that they're not pulling an all-nighter tonight.

daftcat 04-25-2008 12:52 AM

I just hit pay dirt! I found the xml that has real-time game highlights. No more waiting for Top Plays to get posted.

Because I'm anti-spoiler and because it comes from a different source, has different videos from Top Plays, and because there is no xml parser code in mlbviewer yet, I will initially implement it in mlbscores. That way if you want spoilers, this is where you'll find them. If and when the two code bases are merged, I'll look at how I can combine them without overlap. I do have stream id's so it should be possible.

I'm not sure if mlbscores will be in the coming official release but I'll let you know just as soon as it hits svn. Besides, I'll need everyone on long last name alert to make sure Saltalamacchia batting against Chamberlain doesn't overrun screen space buffers. ;-)

I found all kinds of cool xml's including a mapping of players in the game to their player id's. This means we'll eventually be able to link a box score directly up to their player page on mlb.com through a supporting external web browser.

Good things on the way....

daftcat 04-25-2008 08:48 PM

About scheduling feature...
 
For those who wanted the scheduling feature, is it okay to block or do you want it non-blocking?

The problem with implementing a non-blocking solution is that at the top of our event loop, we're sitting in a blocking getch() call waiting for input. I believe that would mean we would have to change from getch() to select(). I don't know how difficult that's going to be.

daftcat 04-25-2008 08:54 PM

Quote:

Originally Posted by daftcat (Post 3133160)
For those who wanted the scheduling feature, is it okay to block or do you want it non-blocking?

The problem with implementing a non-blocking solution is that at the top of our event loop, we're sitting in a blocking getch() call waiting for input. I believe that would mean we would have to change from getch() to select(). I don't know how difficult that's going to be.

Oh, it looks like we're already using select, I guess I'll look deeper at how we're doing this.

fang2415 04-27-2008 04:58 AM

Quote:

For those who wanted the scheduling feature, is it okay to block or do you want it non-blocking?
Not sure I'm smart enough to know what you're asking... If you're saying the scheduler would block other input until the scheduled event, it seems like we'd want to avoid that. ...But it also seems like you might need to check something else out first, so I'll hang tight till then.

Also, pulling svns from yesterday and today gives me this every time just after the splash screen:

Code:

Traceback (most recent call last):
  File "./mlbviewer.py", line 657, in <module>
    curses.wrapper(mainloop, mycfg.data)
  File "curses/wrapper.py", line 44, in wrapper
  File "./mlbviewer.py", line 237, in mainloop
    status_str_len = len(status_str) + len(speedtoggle.get(cfg['speed'])) + 2
TypeError: object of type 'NoneType' has no len()

I'm on revision 61 at the moment, on two different laptops. My backed-up old version (not sure which one, but I think it's at least a week old) works fine.

Anybody else seeing this?

daftcat 04-27-2008 11:38 AM

Quote:

Originally Posted by fang2415 (Post 3134327)
Not sure I'm smart enough to know what you're asking... If you're saying the scheduler would block other input until the scheduled event, it seems like we'd want to avoid that. ...But it also seems like you might need to check something else out first, so I'll hang tight till then.

Also, pulling svns from yesterday and today gives me this every time just after the splash screen:

Code:

Traceback (most recent call last):
  File "./mlbviewer.py", line 657, in <module>
    curses.wrapper(mainloop, mycfg.data)
  File "curses/wrapper.py", line 44, in wrapper
  File "./mlbviewer.py", line 237, in mainloop
    status_str_len = len(status_str) + len(speedtoggle.get(cfg['speed'])) + 2
TypeError: object of type 'NoneType' has no len()

I'm on revision 61 at the moment, on two different laptops. My backed-up old version (not sure which one, but I think it's at least a week old) works fine.

Anybody else seeing this?

Fixed.

It looks like you never defined your speed in the config file (not required) so we picked it up from DEFAULT_SPEED. The problem was this was defined as an int but anything that comes from the config file is treated as a str. So when we were looking up the speedtoggle string, it was returning a None (or not found.) I fixed it so that the DEFAULT_SPEED is a string instead of an integer.

You can run svn up to get the latest fix.

fang2415 04-27-2008 12:38 PM

Quote:

Originally Posted by daftcat (Post 3134597)
Fixed.

It looks like you never defined your speed in the config file (not required) so we picked it up from DEFAULT_SPEED. The problem was this was defined as an int but anything that comes from the config file is treated as a str. So when we were looking up the speedtoggle string, it was returning a None (or not found.) I fixed it so that the DEFAULT_SPEED is a string instead of an integer.

You can run svn up to get the latest fix.


Just got the new revision and it works great. I did wonder if it was an issue with a missing config option, but wasn't sure which one to look for.

It's pretty funny how much you and jkr pwn over whoever's running the offical MLB player. Thanks for the fix.

daftcat 04-28-2008 04:34 AM

About scheduling feature
 
Okay, it looks like code-wise, non-blocking scheduling could be added but it's not a trivial patch like I thought it might be.

It's not going to make the next release (which I've encouraged jkr to make available this week.) If you have the latest svn, there probably isn't going to be any big changes. Maybe the bug fix I added Sunday morning and an auto-configuration routine for anyone doing a fresh install.

Otherwise, the next release is just to have a recent official release to point new users to. Thanks for all your testing. I think we've accomplished a lot in a short time and have a really rich and stable product right now.

I'll be fielding bug reports and fixes as quickly as possible but new feature development may move slower for awhile.

daftcat 04-29-2008 01:15 AM

If anyone is wondering what "Unknown Status = S" means, it's fixed in the latest svn. ;-)

I'm assuming the crickets in here are indicative of happy baseball fans watching/listening to their favorite teams in total bliss.

jkr 04-29-2008 12:11 PM

Hey everyone,

I want to apologize for my absence here recently -- though I doubt you really noticed, since daftcat has more than taken up the slack. It's been quite busy here, and I haven't had a lot of development time.

But I did want to let you all know that (as daftcat suggested) a new release should be coming by the end of the week (barring any weird bugs that pop up between now and then). I imagine that you're all testing it out pretty much every day with your favorite teams, so I also imagine that it's working pretty well. Please let us know if anything pops up. Otherwise, just keep your eyes open for the announcement.

After this release, I think we'll all have the ability to watch baseball the way we want to, with the service we paid for. And hopefully we'll be able to open that up to a few more unix users as well. Thanks again for all your help with testing and suggestions. Development will continue after this, but at a rather more relaxed pace. Still, suggestions will, as always be heeded and appreciated.

Anyway, just wanted to say hi to everyone and let you know where things stood. Hope you're all enjoying the warmer weather (or, if you're in the Southern hemisphere, the cooler weather).

--J

Theophile 04-29-2008 01:54 PM

Was there every any headway made with MythTV integration?

jkr 04-29-2008 05:41 PM

Quote:

Originally Posted by Theophile (Post 3136919)
Was there every any headway made with MythTV integration?

Not exactly. The writer of mythstream did send me an experimental version which could handle python scripts, and that is coming out sooner or later, so it shouldn't be hard. But (a) for some reason I couldn't get it to build correctly (or, rather, it would build fine, but then crash), and (b) that was right around the time that the concurrent login issues were surfacing, so it seemed better to get that part handled.

Frankly, though, the reason I haven't given it that much time is that I've just been using your solution from a few weeks ago, with a mythtv button kicking it over to a full-screen terminal. With LIRC, it really does everything I need it to do, so it's a bit hard to work up the energy to figure out why the new mythstream is crashing for me and then redo it.

That all being said, the code is pretty nice and modular now, and all of the work of parsing and streaming has been separated out from the frontend. It should be pretty trivial for someone to either make a perl implementation for the current mythstream (it would just have to invoke python as an external process), a python version for the next one (cleaner, obviously) or a native c++ plugin that either rewrites the classes or calls them. My satisfaction with my current setup, though, is such that I might not be the one to do it. Be glad to help out anyone who wanted to, though.

daftcat 04-29-2008 09:56 PM

jkr

Can I add mlbviewer to my MLB Linux Howto yet?

jkr 04-30-2008 10:41 AM

Quote:

Originally Posted by daftcat (Post 3137294)
jkr

Can I add mlbviewer to my MLB Linux Howto yet?

Sure -- I'd say the silence around these parts either indicates a loss of interest in baseball or a relatively stable state of affairs. I would guess it's more the second.

dmandell 04-30-2008 11:36 AM

Quote:

Originally Posted by jkr (Post 3137830)
Sure -- I'd say the silence around these parts either indicates a loss of interest in baseball or a relatively stable state of affairs. I would guess it's more the second.

I would guess the second part, this tool is stable and there hasn't been a lot of change in the last week or so. Besides, I'm too busy listening to baseball to post!

1 note. The addition of an "i" option that shows interesting info about the selected game would still be appreciated here.

Thanks again,

d

daftcat 04-30-2008 01:05 PM

Quote:

Originally Posted by dmandell (Post 3137888)
I would guess the second part, this tool is stable and there hasn't been a lot of change in the last week or so. Besides, I'm too busy listening to baseball to post!

1 note. The addition of an "i" option that shows interesting info about the selected game would still be appreciated here.

Thanks again,

d

Yeah, I understand that. My progress with mlbscores has stalled somewhat as I figure out the best way to glean all the useful information into something that is both easy on the eyes and code pretty (e.g. easy to maintain.) Probably by month's end I'll have something ready. I also have a work project that, while starting slowly, I anticipate will take up much of my time.

It's coming. I'd like that too.

Off the record (e.g. no promise that I'll actually get all of this done anytime soon), I'd like to have mlb scoreboard, line scores, box scores, and standings integrated. Currently, the only sources I've seen for standings are either jsp's from mlb.com or xml's from third-party sites. I'd rather use the xml but that's probably just because I'm still not familiar with the json to python conversion. I also have a wealth of information available to me via xml so it's just a matter of writing the parsers and display code. Probably by season end I'll have everything I want integrated or integrate-able into mlbviewer. Just in time for them to change things all over again for the next season.

dmandell 04-30-2008 01:59 PM

Quote:

Originally Posted by daftcat (Post 3137949)
Yeah, I understand that. My progress with mlbscores has stalled somewhat as I figure out the best way to glean all the useful information into something that is both easy on the eyes and code pretty (e.g. easy to maintain.) Probably by month's end I'll have something ready. I also have a work project that, while starting slowly, I anticipate will take up much of my time.

It's coming. I'd like that too.

Don't get me wrong, it's not like I want it *right now,* I just wanted to make sure you guys know that the lack of posts here has nothing to do with a lack of interest in the project or new features. Honestly though, this is already an incredibly useful piece of software, if only MLB could have designed something so nice.

I'll be checking in here from time-to-time, and also spreading the word around a little bit about the script once you've decided you're ready to release the next version. If/when you need testers, just post here, I'll be glad to do what I can.

daftcat 04-30-2008 03:35 PM

I'm evaluating MiLB.TV (the minor league baseball equivalent of MLB.TV)

For starters, the Gameday audio is free. The video is $7/month and only a small number of games (like 4 or 5 a day) are available. The video is only 350K and the audio on these videos isn't great.

The workflow request method for video is very similar to mlb.com. The jsp schedule page that has the video does not have the audio on it. I'll have to do some more digging to find the audio jsp schedule page.

I'll try a game or two from home to see if I even care enough to modify mlbviewer. So far, I'm not impressed.

mr_e_uss 04-30-2008 05:16 PM

RE: The posting silence
 
I stopped posting once everything was working. :-) I'm very appreciative of your successful efforts at getting MLBTV and Gameday Audio working on Linux. Thank you!

dmandell 04-30-2008 08:52 PM

Before you do a release of the latest version, I'd recommend that you add the keybinding list from the help screen in mlbplayer to the README, replacing:

Watch baseball games by pressing return. Listen to hem by pressing a. Up goes up, down goes down.

with

a Play Gameday audio of highlighted game
Left/Right Navigate one day forward or back
d Toggle debug (does not change config file)
h Display version and keybindings
j Jump to a date
Up/Down Highlight games in the current view
q Quit mlbviewer
p Toggle speed (does not change config file)
r Refresh listings
t Display top plays listing for current game
Enter Play video of highlighted game


or similar. At the very least you should mention in the README that "h" shows you the help screen.

Also, it might be worth putting "press h for help" on the bottom of the main listings screen.

daftcat 04-30-2008 11:46 PM

Quote:

Originally Posted by dmandell (Post 3138305)
Before you do a release of the latest version, I'd recommend that you add the keybinding list from the help screen in mlbplayer to the README, replacing:

Watch baseball games by pressing return. Listen to hem by pressing a. Up goes up, down goes down.

with

a Play Gameday audio of highlighted game
Left/Right Navigate one day forward or back
d Toggle debug (does not change config file)
h Display version and keybindings
j Jump to a date
Up/Down Highlight games in the current view
q Quit mlbviewer
p Toggle speed (does not change config file)
r Refresh listings
t Display top plays listing for current game
Enter Play video of highlighted game


or similar. At the very least you should mention in the README that "h" shows you the help screen.

Also, it might be worth putting "press h for help" on the bottom of the main listings screen.

I can fix the README.

The bottom of the screen is getting cluttered, but I might make a pseudo H)elp menu (hint) at the top. Otherwise I'll just put 'h for Help' at the top of the README or possibly as part of the splash. I'll also add a mention to this forum in the README. Though chances are, they're going to find this via Google anyway. I'll play around with it tonight and try to get everything checked in tonight.

I'm going out of town this weekend starting tomorrow so I'll probably be scarce around here until next week.

daftcat 05-01-2008 01:49 AM

Update your svn and review the README content.

I also added a Help hint to the titlewin. Let me know if that looks okay.

I'm not sure when I'll next get a chance to make any new revisions--maybe not until Sunday night or Monday.

Onip 05-01-2008 06:24 AM

everything is fine here.

I've only got a little suggestion. When one is browsing top plays and presses L to go back to the games screen, it would be better to cache the game list instead of redownloading it. Games are ended at the time top plays are availabl and there would'nt be no more changes.

Anyway, thanks for your work

daftcat 05-01-2008 10:23 AM

Quote:

Originally Posted by Onip (Post 3138605)
everything is fine here.

I've only got a little suggestion. When one is browsing top plays and presses L to go back to the games screen, it would be better to cache the game list instead of redownloading it. Games are ended at the time top plays are availabl and there would'nt be no more changes.

Anyway, thanks for your work

That's not necessarily true. A day game's top plays might be available before a night game has started.

But there's probably not going to be a whole lot of change in the few minutes it takes to watch the top plays.

It's not a bad idea but it's also not a trivial change. I'll note it and we'll probably implement caching in a future release.

dmandell 05-01-2008 12:20 PM

The README looks good, I imagine it'll be a help for at least a few. It looks like you should have a hard return after "use" on the 81st line though (in the MLBGAMEID TEST TOOL section, the line that starts with "by the screen" is twice as long as any other line, somewhere close to 160 characters... I assume you want to keep all the lines at 80 characters or less?).

So, do you guys consider this release-worthy?

craigsn 05-01-2008 04:32 PM

MLB audio
 
Up front, let me apologize for not figuring this all out. I'm a linux newbie for the most part, and am trying to MLB audio to work. Is there a step by step instruction for someone who isn't sure what python is and how to make all of this stuff work? What platform it works on (I'm on Ubuntu Hardy 64bit), and what else I need to make it happen?

Thanks for the help.

Craig

jkr 05-01-2008 06:48 PM

Quote:

Originally Posted by Onip (Post 3138605)
everything is fine here.

I've only got a little suggestion. When one is browsing top plays and presses L to go back to the games screen, it would be better to cache the game list instead of redownloading it. Games are ended at the time top plays are availabl and there would'nt be no more changes.

I had thought about this, and wrote up a version a while back. It's not that hard -- you just need a unique name (YYYYMMDD works fine) and a directory to save caches in (.mlb/cache works fine for that). And then it's just a question of caching it as a pickle -- which is how python allows you to write its data structures persistently to disk.

I decided against including it, just because the second less of lag seemed to be offset by the user-unfriendliness of forcing more manual refreshes. Of course, I was using it when going backwards and forwards days, so it might be more useful to do it in the situation you suggested.

If people are interested, it would be simple to add it back in or (this is my mutt-user's answer to everything) make it a configurable option. I still think, though, that repolling when you change screen is as good a time to do it as any.

jkr 05-01-2008 07:03 PM

Quote:

Originally Posted by craigsn (Post 3139151)
Is there a step by step instruction for someone who isn't sure what python is and how to make all of this stuff work? What platform it works on (I'm on Ubuntu Hardy 64bit), and what else I need to make it happen?

Almost everything you need should be on your system already. We're going to release a new version quite soon, but if you just want to get audio, you can download the old version at

http://sourceforge.net/projects/mlbviewer

If you want a newer version that might have a few bugs in it, look a few pages back for daftcat's how to on getting the development version by using "subversion." It's easy, but you'll have to install one program. If you don't feel comfortable, though, the new version will be out quite soon.

The only other thing you'll have to install is a python module called simplejson. Just type:

'sudo aptitude install simplejson'

Now, at this point, you should check out daftcat's site

http://www.eds.org/~straycat/mlblinux.php

but I'll try to walk you through the rest.

If you're using the new (development) version, it will help you configure the program. If you're using the older version, you'll have to do it yourself. It's easy though. Just open a shell and type the following:

$ mkdir .mlb
$ cd .mlb
$ nano config

Then type
user = your_username
pass = your_password

Save it and exit.

Now if you go into mlbviewer and type 'python mlbviewer.py' a list of the day's games should come up. Find the one you want and press 'a'.

If you like the program, and want to install it to the system, type 'sudo python setup.py install'.

If you like the program, keep your eyes peeled, because the new version will be out quite soon.

daftcat 05-01-2008 07:10 PM

Quote:

Originally Posted by jkr (Post 3139271)
I had thought about this, and wrote up a version a while back. It's not that hard -- you just need a unique name (YYYYMMDD works fine) and a directory to save caches in (.mlb/cache works fine for that). And then it's just a question of caching it as a pickle -- which is how python allows you to write its data structures persistently to disk.

I decided against including it, just because the second less of lag seemed to be offset by the user-unfriendliness of forcing more manual refreshes. Of course, I was using it when going backwards and forwards days, so it might be more useful to do it in the situation you suggested.

If people are interested, it would be simple to add it back in or (this is my mutt-user's answer to everything) make it a configurable option. I still think, though, that repolling when you change screen is as good a time to do it as any.

That's a completely different (and more complicated) approach than what I had in mind. I was thinking we just manage the listings and top plays views as separate panel objects that we could raise and hide as needed. Instead of clearing the screen going from one screen to another, we just raise the active panel and hide the other. The data remains persistent until it needs to change (or is requested to change.) I've had a little time to play with curses windows and panels in mlbscores. I can look into cooking something up next week.

Whether we cache or we don't, we might want to display the time of the last refresh somewhere. We're starting to run out of screen space though. I'll play with that.

Turns out I've got wireless access at my hotel and plenty of time before the first workshop. I'm opting for a little R&R today before the weekend activities get going.

daftcat 05-01-2008 07:15 PM

Quote:

Originally Posted by dmandell (Post 3138928)
The README looks good, I imagine it'll be a help for at least a few. It looks like you should have a hard return after "use" on the 81st line though (in the MLBGAMEID TEST TOOL section, the line that starts with "by the screen" is twice as long as any other line, somewhere close to 160 characters... I assume you want to keep all the lines at 80 characters or less?).

So, do you guys consider this release-worthy?

Darn auto-wrap. Good catch.

Fixed.

Yeah, I think it's good for a release. I started to update the mini-Howto and saved a copy but then I saved again and overwrote the original. So now I have a premature release announcement on the howto. I hope jkr releases soon so I don't have to leave "not yet but soon" comment up for too long.

jkr 05-01-2008 07:32 PM

Quote:

Originally Posted by daftcat (Post 3139291)
I hope jkr releases soon so I don't have to leave "not yet but soon" comment up for too long.

Just wrote you a mail about that... I poked a couple of places in the code with a stick, but otherwise it all looks great, and I'm ready to run with it. So, yes, "imminently" would probably be right.

jkr 05-01-2008 07:35 PM

Quote:

Originally Posted by daftcat (Post 3139286)
That's a completely different (and more complicated) approach than what I had in mind. I was thinking we just manage the listings and top plays views as separate panel objects that we could raise and hide as needed. Instead of clearing the screen going from one screen to another, we just raise the active panel and hide the other. The data remains persistent until it needs to change (or is requested to change.) I've had a little time to play with curses windows and panels in mlbscores. I can look into cooking something up next week.

Right -- fair enough. That would be much more appropriate for the issue at hand. My solution was more based around the problem of switching days. But yeah, using a panel would make perfect sense in this case.

daftcat 05-01-2008 08:05 PM

Quote:

Originally Posted by craigsn (Post 3139151)
Up front, let me apologize for not figuring this all out. I'm a linux newbie for the most part, and am trying to MLB audio to work. Is there a step by step instruction for someone who isn't sure what python is and how to make all of this stuff work? What platform it works on (I'm on Ubuntu Hardy 64bit), and what else I need to make it happen?

Thanks for the help.

Craig

Hi Craig,

You probably already have python as part of the ubuntu installation. Since we haven't made a recent official release yet, your best bet is to get the code from svn.

You'll need to install the subversion package using ubuntu's package management system.

You'll also need mplayer or xmms or any media player that can play a windows media stream. For that matter, you may need to install the win32 codecs. I found this link for you:

http://ubuntuguide.org/wiki/Ubuntu:G...timedia_Codecs

It refers to Gutsy but it probably should be the same for Hardy.

I think the only thing that won't be in ubuntu package manager is simplejson. No, I take that back:

http://packages.ubuntu.com/gutsy/pyt...hon-simplejson

Again, adjust for hardy but it should be there.

Once you have python, mplayer, the codecs, subversion, and simplejson installed, you can get mlbviewer with the following command:

Code:

svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer
The README and INSTALL should have everything you need to get listening. :)

Cheers!
Matthew

jkr 05-01-2008 08:38 PM

Okay, folks -- sorry. There was a slight problem with the setup script not doing the right thing with the test directory. No bugs or anything, just a slight packaging snafu.

Anyway, it's fixed, but it seems to take a little while for changes to propogate to all of sourceforge's download mirrors. So the official announcement will come later on tonight.

In the meantime, I dunno, watch some baseball or something...

Update: cool, it seems to have propagated. So...

jkr 05-01-2008 09:53 PM

Who likes new releases?

mlbviewer 0.1alpha6 officially available now.

http://sourceforge.net/projects/mlbviewer

Changes since the last release include:
* Online help
* Change video speed on the fly
* Game highlights available
* Configuration files autocreated when program started for the first time.
* Jumping to different days
* Timezone aware, defaults to your computer's timezone, but can also be set manually
* Configurable X display
* More robust error-handling
* And many more new conveniences and bugfixes. See the README for more information.

Get it while it's hot.

quonset 05-02-2008 12:13 AM

Hey again guys! Been using mlbviewer happily for the past few weeks, and even went so far as to order mlb.tv premium, as gameday audio just wasn't cutting it anymore now that the video works so wonderfully under Linux. :)

My major request is being able to define multiple video players and having the ability to flip between them (like how it is set for changing speed types now). Sometimes I find that mplayer is better then xine, and sometimes vlc is better than both for archived games, etc., and having to exit, edit the config, and restart mlbviewer is kind of a bummer.

edit: Also, I notice that you can define local blackouts, but is it possible to define national blackouts as well?

trippinnik 05-02-2008 01:02 AM

Wow, Thanks!
 
Thanks guys! Just found this last night. MLB tv was the only reason I had windows on my laptop and on my desktop I've been running it in a virtual machine. This also makes sure I don't run into any spoilers while trying to watch archived games. I'm living in Japan and for some unknown reason all games in Japan are blacked out (even though there are no cable/sattelite/broadcast stations that air my Mets games), so being able to avoid those banners with "Santana dominates" or "Wright hits walk off" is awesome. Now if only I could rely on MLB to consistently put up the 800k feed (even with their client the feed isn't there way too often recently).
Makes me want to learn some python so I can help out some.

daftcat 05-02-2008 11:46 AM

Quote:

Originally Posted by trippinnik (Post 3139502)
Thanks guys! Just found this last night. MLB tv was the only reason I had windows on my laptop and on my desktop I've been running it in a virtual machine. This also makes sure I don't run into any spoilers while trying to watch archived games. I'm living in Japan and for some unknown reason all games in Japan are blacked out (even though there are no cable/sattelite/broadcast stations that air my Mets games), so being able to avoid those banners with "Santana dominates" or "Wright hits walk off" is awesome. Now if only I could rely on MLB to consistently put up the 800k feed (even with their client the feed isn't there way too often recently).
Makes me want to learn some python so I can help out some.

The stream availability is out of our control. Once we've received the stream url, our job is done and everything else is up to the competency and whims of the content servers. The speed switching feature was born out of this frustration because I found the 400k streams are more often available than the 800 which sucks because I'm paying for the 800. But... the season is still early and they're still working out the kinks. The official clients don't have much better luck either.

daftcat 05-02-2008 12:02 PM

Quote:

Originally Posted by quonset (Post 3139467)
Hey again guys! Been using mlbviewer happily for the past few weeks, and even went so far as to order mlb.tv premium, as gameday audio just wasn't cutting it anymore now that the video works so wonderfully under Linux. :)

My major request is being able to define multiple video players and having the ability to flip between them (like how it is set for changing speed types now). Sometimes I find that mplayer is better then xine, and sometimes vlc is better than both for archived games, etc., and having to exit, edit the config, and restart mlbviewer is kind of a bummer.

edit: Also, I notice that you can define local blackouts, but is it possible to define national blackouts as well?

We could do both. I find myself changing video_player lines myself so yeah. I'm thinking we could map the number keys, maybe 1 through 3 plus a way to dynamically enter in a player line and recall it for copy/paste into the config file.

National blackouts are noted in the schedule. I'll get that fix into svn next week.

daftcat 05-02-2008 03:59 PM

Just in time for the weekend:

National blackout support checked into svn.

dmandell 05-02-2008 08:28 PM

It looks like mlbviewer's requirement of python-simplejson was not included in the README or INSTALL files. I'd highly recommend putting it in one or both of them (INSTALL makes more sense, especially because I think it'd be easier to see).

As near as I can tell it's included in both Ubuntu and Fedora repositories (I only use Ubuntu, but I found rpms for it in Fedora on my first search), so just about anyone should be able to figure out how to install that package.

trippinnik 05-03-2008 12:56 AM

Quote:

Originally Posted by daftcat (Post 3140126)
The stream availability is out of our control. Once we've received the stream url, our job is done and everything else is up to the competency and whims of the content servers. The speed switching feature was born out of this frustration because I found the 400k streams are more often available than the 800 which sucks because I'm paying for the 800. But... the season is still early and they're still working out the kinks. The official clients don't have much better luck either.

Yeah, I know stream availability is out of mlbviewer's control, more of a wish directed at MLBtv. I was happy you all added the stream switching feature for that reason.

kweisen 05-04-2008 08:34 AM

OK - I haven't read through all the messages on this forum, but I do know I've read through many of the first few pages and tried many of the suggestions and it still did not work until I tried this and please be aware I subscribe to the MLB audio only, not the video.

After logging in and clickig on the game I want, the black Flash screen appears and I would normally click on the icon in the middle of the screen. It would appear to try to start playing and then nothing. This morning, on an archived game, I click on the close button (X) in the top right for the Flash window. This closed out the application and launched the Mozilla media player connectivity link actually two of these windows popped up. I then clicked on the link and then the icon in the middle of the new flash window. This launched my vlc player and started playing. I tried this several times and it seemed to work a little differently each time - I was probably clicking too fast while not waiting for applications to begin.

In any case, the key was closing out the first Flash screen and progressing from that point. So, if you're still having problems - give this a try. It may take several attempts on what works for your system.

Good luck. Will be interested if this works for anyone else.

Also, I need to update my profile - I'm running Linux Fedora 6.


All times are GMT -5. The time now is 04:15 AM.