LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 04-03-2013, 09:21 PM   #3931
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76

Quote:
Originally Posted by mchapter View Post
Looking good daftcat.

Went to watch the phils @ barves, a couple hours in. It looks like the live_from_start setting is not recognized, which lead me to another oddity: after 2 hours of game time, on the innings screen mlbviewer shows "Last available half inning is: Bot 14"

i'm using mlbhls version 64 and mlbviewer 402.
Short answer: Just checked the fix into rev403.

Long answer:

Exactly as I mentioned above. Tops are stored as 1-9 and bottoms as 11-19. Had a statement like so:

Code:
if latest < 10:
   str = 'Top ' + str(latest)
elif latest < 20:
   str = 'Bot ' + str(latest)  // should be str(latest - 10)
So you were actually seeing the last half available is Bot 4 but I didn't account for my storage trick to tell the tops from the bottoms.
 
Old 04-04-2013, 03:22 AM   #3932
randcoop
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Rep: Reputation: 0
More inning jump issues

OK. So I'm using the truly updated version of mlbhls and mlbviewer. Trying to watch the archive of the Boston - New York game of April 3. If I jump to the top of the second inning, it's perfect. If I jump to any half inning after that, it takes me to the end of the game (thank you for watching).

The only difference I can identify is the time. When I go to the first or top of the second inning, the jump to time shows as before 00:00:00 (eg, 23:45:10). When I try to go to the bottom of the second, it shows a jump to time as 00:03 and some seconds. That takes me to the end of the game.

Is it possible that for some reason the before midnight time works, but the after doesn't?

I'm located in Europe, so I'm GMT +2 (I think), but that may not matter.
 
Old 04-04-2013, 04:24 AM   #3933
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
Quote:
Originally Posted by randcoop View Post
OK. So I'm using the truly updated version of mlbhls and mlbviewer. Trying to watch the archive of the Boston - New York game of April 3. If I jump to the top of the second inning, it's perfect. If I jump to any half inning after that, it takes me to the end of the game (thank you for watching).

The only difference I can identify is the time. When I go to the first or top of the second inning, the jump to time shows as before 00:00:00 (eg, 23:45:10). When I try to go to the bottom of the second, it shows a jump to time as 00:03 and some seconds. That takes me to the end of the game.

Is it possible that for some reason the before midnight time works, but the after doesn't?

I'm located in Europe, so I'm GMT +2 (I think), but that may not matter.
Nexdef times are now in GMT so it doesn't matter that you are GMT+2 or I'm GMT-7.

I am guessing it's another mlbhls bug. Maybe 00:03:45 is considered before the stream start. Not sure why that jumps the stream to the end. thegryghost? Want to look into this? Jump to innings past 4th on April 3 Bos-NYY game.

Non-nexdef works fine with rtmpdump because they use a relative offset rather than an absolute timecode.
 
Old 04-04-2013, 05:10 AM   #3934
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
SVN revision 405: Experimental code needs testing - scrollable windows

So I said I was working on a new feature that I've been wanting for a few seasons. The first step is to introduce scrollable windows.

For the most part, I just want you to use this revision like you normally would. Go through all the screens you normally use (innings, highlights, listings, jump, left/right etc.) Make sure all the lists and cursors are behaving as you would expect them to.

If you want to see the scrolling in action, quit out of mlbviewer, reduce the terminal to something small like 80x10, and then restart mlbviewer. At the moment, I still haven't figured out how to handle the window resizing dynamically. That will definitely crash mlbviewer. But if we were to get more games (doubleheaders) than lines on the screen, the scrolling should let you "up", "down", "page up" to first page, and "page down" to last page. I do plan on changing "page up" and "page down" to actually move a page at a time rather than absolute top and absolute bottom. For now, I just wanted to get something released and tested by more than myself. I also haven't implemented any visual indicator that more records are available. Any ideas? I will probably have a line counter like [1/30] at the bottom next to speed and nexdef.

Also, "Options" ('o' key) and "Help" ('h' key) are new screens (e.g. very different code than before) so those could also be tested for proper operation and unwanted interactions (e.g. trying to get to "innings" screen from "help" or 'z' debug from "options", etc.)

If you encounter a show-stopper bug (e.g. something I did is preventing you from normal operation), please report it first and then you can revert back to 403 with:

Code:
$ svn -r403 up
 
Old 04-04-2013, 05:13 AM   #3935
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
Quote:
Originally Posted by mchapter View Post
Looking good daftcat.

Went to watch the phils @ barves, a couple hours in. It looks like the live_from_start setting is not recognized, which lead me to another oddity: after 2 hours of game time, on the innings screen mlbviewer shows "Last available half inning is: Bot 14"

i'm using mlbhls version 64 and mlbviewer 402.
I can't do anything with live_from_start tonight because there are no more live games. Kinda didn't think of that earlier. I'll look at it again tomorrow. Hopefully the new scrollable window code won't be too buggy and you can at least benefit from the innings display bug fix.
 
Old 04-04-2013, 06:58 AM   #3936
splittter
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
Updated to 405. When the window is small enough so games would be over the page, if I go back a day (to Apr 3rd) I get this:
Code:
Traceback (most recent call last):
  File "/home/phil/mlbviewer-2013/mlbviewer.py", line 677, in <module>
    curses.wrapper(mainloop, mycfg)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/phil/mlbviewer-2013/mlbviewer.py", line 161, in mainloop
    mywin.statusRefresh()
  File "/home/phil/mlbviewer-2013/MLBviewer/mlbListWin.py", line 211, in statusRefresh
    raise Exception,'(' + str(slen) + '/' + str(cols) + ',' + str(n) + '/' + str(rows) + ') ' + status_str
Exception: (57/54,0/12) Status: Final (Condensed Game Available)[HOME][NEXDF][--]
If I scroll forwards, though, it's fine. Went 3 or 4 days ahead with no trouble, even on pages that would scroll. It's also fine going back a day if the window is big enough.
 
Old 04-04-2013, 09:28 AM   #3937
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
Quote:
Originally Posted by splittter View Post
Updated to 405. When the window is small enough so games would be over the page, if I go back a day (to Apr 3rd) I get this:
Code:
Traceback (most recent call last):
  File "/home/phil/mlbviewer-2013/mlbviewer.py", line 677, in <module>
    curses.wrapper(mainloop, mycfg)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/phil/mlbviewer-2013/mlbviewer.py", line 161, in mainloop
    mywin.statusRefresh()
  File "/home/phil/mlbviewer-2013/MLBviewer/mlbListWin.py", line 211, in statusRefresh
    raise Exception,'(' + str(slen) + '/' + str(cols) + ',' + str(n) + '/' + str(rows) + ') ' + status_str
Exception: (57/54,0/12) Status: Final (Condensed Game Available)[HOME][NEXDF][--]
If I scroll forwards, though, it's fine. Went 3 or 4 days ahead with no trouble, even on pages that would scroll. It's also fine going back a day if the window is big enough.
The constructed status string is 57 characters long but your terminal window is only 54 characters wide. I have only implemented vertical scrolling. If you try this with an 80 (or even 60) character wide screen, you won't encounter this.

I went ahead and fixed that. Turns out it was quite simple to detect and trim the string based on whether the calculated padding length was a negative number (e.g. padding=curses.COLS - len(status_str) ). If it is a negative number, I can use that number itself to shrink the string:

Code:
if padding < 0:
    status_str=status_str[:padding]
I will admit that I don't always understand the slice notation but it's pretty awesome when the fix just works out like this.

Fix is in 406.

Last edited by daftcat; 04-04-2013 at 09:50 AM.
 
Old 04-04-2013, 10:11 AM   #3938
chrisVV
Member
 
Registered: Aug 2010
Posts: 109

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I am guessing it's another mlbhls bug. Maybe 00:03:45 is considered before the stream start. Not sure why that jumps the stream to the end. thegryghost? Want to look into this? Jump to innings past 4th on April 3 Bos-NYY game.

Non-nexdef works fine with rtmpdump because they use a relative offset rather than an absolute timecode.
There was something similar with mlbhls last season. The jump to inning feature didn't work correctly if the inning began less than about 1 hour from the end of the game. So it wasn't reliable from about the 7th inning onwards. rtmpdump worked OK though.
 
Old 04-04-2013, 11:01 AM   #3939
splittter
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
I went ahead and fixed that. Turns out it was quite simple to detect and trim the string based on whether the calculated padding length was a negative number (e.g. padding=curses.COLS - len(status_str) ). If it is a negative number, I can use that number itself to shrink the string:

Code:
if padding < 0:
    status_str=status_str[:padding]
I will admit that I don't always understand the slice notation but it's pretty awesome when the fix just works out like this.

Fix is in 406.
Great stuff, thanks.

On the jump to innings issue with mlbhls it seemed to be specifically affecting games that started before and ended after midnight GMT. I tried a couple like that from last night, and only innings before midnight worked, but the games that started after midnight I tried all seemed to work fine.
 
Old 04-04-2013, 03:03 PM   #3940
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
Checked in live_from_start fix. Logic error. Was using continue instead of break to break out of for loop.
 
Old 04-04-2013, 03:22 PM   #3941
thegryghost
LQ Newbie
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 28

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
Nexdef times are now in GMT so it doesn't matter that you are GMT+2 or I'm GMT-7.

I am guessing it's another mlbhls bug. Maybe 00:03:45 is considered before the stream start. Not sure why that jumps the stream to the end. thegryghost? Want to look into this? Jump to innings past 4th on April 3 Bos-NYY game.

Non-nexdef works fine with rtmpdump because they use a relative offset rather than an absolute timecode.
Yes, there is a bug since the time wraps around. I've put in a temporary fix (rev 66) that adds 24 hours worth of seconds if the user specified start time is less than the playlist start time. It's an ugly hack but it should suffice. I'll do a proper fix if this breaks something else but I don't think it should.

Last edited by thegryghost; 04-04-2013 at 03:27 PM. Reason: fixed a small issue
 
Old 04-04-2013, 04:08 PM   #3942
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
Quote:
Originally Posted by thegryghost View Post
Yes, there is a bug since the time wraps around. I've put in a temporary fix (rev 66) that adds 24 hours worth of seconds if the user specified start time is less than the playlist start time. It's an ugly hack but it should suffice. I'll do a proper fix if this breaks something else but I don't think it should.
Working for me now. Thanks!
 
Old 04-07-2013, 06:46 PM   #3943
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
SVN revision 409: Added line scores

Been too quiet in here so here you go. A new feature. This should get some bug reports.

I added line scores using the 'b' key ('l' and 's' are already taken) and updated the help screen. It's a good thing the help screen can scroll now.

I also removed some of the cross-screen restrictions. For example, you can now bring up highlights (top plays) from the line score screen or play a condensed game from the highlight or line score screens. Most keys should work with most screens. Innings from line score, Enter and 'a'udio from line score, etc.

To refresh the line score screen, just press the 'b' key again. I thought about overloading the 'r' key, but it's not necessary. 'r' key will remain for refreshing the listings.

EDIT: Added HR's to line scores. Didn't test with "In Progress" games so the implementation may change. I also plan to add "Last play" to the line score of an in progress game. I doubt I will go as far as implementing a refreshing gameday view but a few bits of information aren't bad just to check into a game and see how it's doing (e.g. watch the Royals game and update the Twins line during commercial breaks.)

Box scores are also coming soon (the real reason I implemented scrolling.) Unfortunately, the box scores have blobs of HTML embedded in the XML that I need to write some proper
conversion code into curses.

And finally, by mid-season when it actually starts to matter, I hope to have standings.

I sure hope MLB.com is okay with all of this.

Last edited by daftcat; 04-08-2013 at 05:55 AM.
 
Old 04-07-2013, 08:06 PM   #3944
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
It's kinda driving me nuts that 'l' key does not go to 'l'inescore. I'm not changing that anytime soon (not by default anyway), but I may be implementing a keybindings file sooner than I expected. So if 'b' seems awkward to you too, you may not have to wait too long to change all the keys the way you want them (and have your help screen update to the new bindings.)
 
Old 04-08-2013, 05:29 AM   #3945
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,751

Rep: Reputation: 76
SVN revision 412: Added HR to line score

Only just finished implementing the HR code in the line score. No idea if it's going to work in all cases. I guess we'll just have to find out.
 
  


Reply

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration