LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-07-2014, 05:42 PM   #4456
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86

Everyone else, please update to SVN rev 611 and reassure me that time conversions are done correctly.

For now, the new code only relates to figuring out initial start date and displaying the regular listings. Other places in the code may still be wrong (if they were wrong before) like MiLB.tv, master scoreboard, etc. Once I know listings are correct, I'll move all the other time conversions to the new code.

EDIT: So I have a virtual machine at work running mlbviewer. It is on UTC so it makes for a great test of time_offset. I have verified on my home machine (no time_offset= option) and this VM (time_offset=-3:00, e.g. PDT) and now both listings and master scoreboard are updated with mlbGameTime class. Looks good for me, but how about the rest of you?

Last edited by daftcat; 05-07-2014 at 06:05 PM.
 
Old 05-08-2014, 07:59 PM   #4457
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 614: Media Detail View and more MLBGameTime conversions

Every window except Calendar view is now using the MLBGameTime class. So the updates to DST conversions and the time_offset= option should now carry over to all the other windows. Calendar view at the moment uses its own method for game time conversions. I have not yet migrated this to the common class.

But more exciting than that...

The 'z' key screen has long been a great resource for peaking into media availability when home/away toggles weren't yielding the correct stream. Inspired by a post I made recently about debugging missing coverage (and how surprisingly difficult it was to explain), I decided to create a new screen that displays the call letters of home and away media and when one or both are missing (e.g. national game of the week on Sundays which is neither a home nor away broadcast but an MLB broadcast.)

The new screen can be accessed with the 'e' key. Sorry, I'm running out of keys. Both m and M are taken as well as d.

Next up is to add alternate language audio support and then roll up all my recent enhancements and fixes into a new Sourceforge release. Hopefully the Royals will be winning by then and I can take a break and watch some good baseball.

EDIT: The [C] and [A] flags on the right edge indicate whether Condensed Game and Archived stream are available.
Attached Thumbnails
Click image for larger version

Name:	MediaDetailView.png
Views:	16
Size:	36.3 KB
ID:	15461  

Last edited by daftcat; 05-08-2014 at 08:01 PM.
 
Old 05-09-2014, 04:20 AM   #4458
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 615: Alternate audio support

Finally!

mlbviewer now supports alternate audio (usually a Spanish or Japanese language broadcast.)
  • You can see which games offer alternate audio with the brand spanking new Media Detail screen ('e' key.)
  • You must select the proper coverage (e.g. [HOME] or [AWAY]) with the 's' key. I don't do the same kind of best effort matching like I do with regular audio or video. If you request a home alternate audio and there isn't one available, I don't use the away stream or the normal audio stream as a fallback option.
  • Once you have matched the coverage with the desired alternate audio, use the 'A' key (uppercase 'A' vs. lowercase 'a' which is regular audio) to play the alternate audio broadcast.
  • Since alternate audio is often team-specific such as a Japanese broadcast is usually available with SEA, you can specify an alt_audio_follow= in your config. This will let you skip the coverage matching step.
  • Alternate audio is still a feature that must be selected explicitly, even with alt_audio_follow=. In other words, if alt_audio_follow=sea, the normal broadcast will be selected with the lowercase 'a'. You must use the uppercase 'A' to select the alternate audio.

Over the last several revisions, in order to debug various problems, I added in some intentional crashes that will spit out useful information to me. Under normal circumstances, you should not see these crashes. If you do, let me know. This weekend, I will be looking for them and removing them.

I am aiming for a Sourceforge release this weekend. All the features and fixes that have been added/checked in since revision 592 need to be documented on the Sourceforge mlbviewer Wiki and the download link updated with a new stable release.

I would really appreciate it if a few of you would update to the latest and greatest revision and let me know if you encounter any problems. Or you can let me know that you updated and encountered no issues. I'd be happy to hear that too.

Cheers!
 
Old 05-10-2014, 04:20 PM   #4459
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 617: So I broke video and no-one noticed?

My check-in for alternate audio did an incorrect check that pretty much forced all media requests to be audio or alt-audio.

I'm assuming from the lack of bug reports that no-one has updated to it yet. Well, I have fixed it now and checked it into rev 617.
 
Old 05-11-2014, 04:12 AM   #4460
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
New stable release updated on Sourceforge: 2014-sf-2

All the latest enhancements have been rolled up into the latest Sourceforge release, 2014-sf-2.

These include media detail screen, alternate audio support, enhancements to favorite= behavior, enhancements to game time localization, and "clickable" stats support from box scores.

Sourceforge releases are not SVN releases and should not be mixed/merged in the same directory.

See https://sourceforge.net/p/mlbviewer/news/ for the official announcement.

I have also been updating the Wiki pages on Sourceforge so that I don't have to keep a monolithic README. That means at some point the README will go away or at least point to the Wiki pages.
 
Old 05-11-2014, 12:35 PM   #4461
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
I am afraid the game times shown by mlbviewer in the latest revision (r619) are worse than ever. I have one machine where the machine clock is on local time, which is UTC+1, and one where the clock is on UTC time. The first of them does show game times in local time, but the second of them shows them in EDT (eastern time in the US, UTC-4).

This is most confusing. Can you revert it to how it was before, which was at least consistent even if sometimes wrong?
 
Old 05-11-2014, 11:03 PM   #4462
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by chrisVV View Post
I am afraid the game times shown by mlbviewer in the latest revision (r619) are worse than ever. I have one machine where the machine clock is on local time, which is UTC+1, and one where the clock is on UTC time. The first of them does show game times in local time, but the second of them shows them in EDT (eastern time in the US, UTC-4).

This is most confusing. Can you revert it to how it was before, which was at least consistent even if sometimes wrong?
If it shows in EDT, that means the conversion failed. But it can also more likely mean that the config contains an incorrect time_offset= parameter. Can you check the one in EDT and comment out any time_offset= lines in your config?
 
Old 05-12-2014, 10:57 AM   #4463
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by daftcat View Post
If it shows in EDT, that means the conversion failed. But it can also more likely mean that the config contains an incorrect time_offset= parameter. Can you check the one in EDT and comment out any time_offset= lines in your config?
Try the following. If you're comfortable with the python shell, do this from your mlbviewer source directory:

Code:
$ python
>> from MLBviewer import *
>> from datetime import datetime, timedelta
>> edt=datetime.now()
>> edt+=timedelta(hours=-5)
>> gt=MLBGameTime(edt)
>> gt.localize()
The first edt line is your localtime. The next line subtracts 5 hours to get to EDT (since you said you are at UTC+1.) gt is an object instance of MLBGameTime and gt.localize() should get you back to localtime. If that works correctly, then the problem is a time_offset= option in your config file that didn't parse correctly. Comment it out and try mlbviewer again.

EDIT: I added test/mlbgametime.py in revision 621. Copy this to base mlbviewer directory and run it. It will test the localization of a 10:05 PM EDT game time.

Last edited by daftcat; 05-12-2014 at 12:14 PM.
 
Old 05-12-2014, 11:11 AM   #4464
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 620: defensive code to ignore old time_offset= option

With this revision, if time_offset= is non-blank and in the old format without the colon (e.g. time_offset=+100 instead of time_offset=+1:00), the MLBGameTime class will ignore the old format. In other words, old format should not break the time conversions and result in EDT.
 
Old 05-12-2014, 02:03 PM   #4465
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by daftcat View Post
With this revision, if time_offset= is non-blank and in the old format without the colon (e.g. time_offset=+100 instead of time_offset=+1:00), the MLBGameTime class will ignore the old format. In other words, old format should not break the time conversions and result in EDT.
Ah right. That resolves the issue. Game times are showing correctly now, thanks.
 
Old 05-12-2014, 02:13 PM   #4466
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by chrisVV View Post
Ah right. That resolves the issue. Game times are showing correctly now, thanks.
Excellent! This should also fix the weird issues in Spring Training when US goes to DST and the rest of the world does not.

Also, I added some defensive code to MLBGameTime in revision 620 to ignore time_offset's in the old format (without the ":")
 
Old 05-14-2014, 07:11 PM   #4467
mgoetze
LQ Newbie
 
Registered: Aug 2013
Posts: 12

Rep: Reputation: Disabled
I just updated to r621 and tried to check out the new view by pressing e on tonight's BOS@MIN game. Crashed with

Traceback (most recent call last):
File "./mlbviewer.py", line 1351, in <module>
curses.wrapper(mainloop, mycfg, mykeys)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "./mlbviewer.py", line 573, in mainloop
detailwin.getMediaDetail(gameid)
File "/home/mgoetze/mlbviewer2013/MLBviewer/mlbMediaDetailWin.py", line 40, in getMediaDetail
self.formatMediaDetail()
File "/home/mgoetze/mlbviewer2013/MLBviewer/mlbMediaDetailWin.py", line 74, in formatMediaDetail
away_video=game['media']['video']['away']
KeyError: 'away'
 
Old 05-15-2014, 01:08 AM   #4468
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by mgoetze View Post
I just updated to r621 and tried to check out the new view by pressing e on tonight's BOS@MIN game. Crashed with

Traceback (most recent call last):
File "./mlbviewer.py", line 1351, in <module>
curses.wrapper(mainloop, mycfg, mykeys)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "./mlbviewer.py", line 573, in mainloop
detailwin.getMediaDetail(gameid)
File "/home/mgoetze/mlbviewer2013/MLBviewer/mlbMediaDetailWin.py", line 40, in getMediaDetail
self.formatMediaDetail()
File "/home/mgoetze/mlbviewer2013/MLBviewer/mlbMediaDetailWin.py", line 74, in formatMediaDetail
away_video=game['media']['video']['away']
KeyError: 'away'

It was actually the STL-CHI game that was causing the error. Since the game was rained out, the media dictionary was empty. I had code to check for a single broadcast missing (always with game of the week and sometimes with the FREE game of the day), but when there was no media at all, that workaround for a single missing media was getting bypassed completely.

I have checked in the fix into 622. Let me know how you like the new screen.
 
Old 05-15-2014, 01:26 AM   #4469
mgoetze
LQ Newbie
 
Registered: Aug 2013
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
I have checked in the fix into 622. Let me know how you like the new screen.
Hm, will probably take a bit of getting used to but should help to avoid some confusion I have had in the past.

What's currently bugging me is

r604 | daftcat75 | 2014-05-06 22:36:43 +0200 (Tue, 06 May 2014) | 1 line
if favorite team is specified, ensure it also gets added to video_follow and audio_follow options

I usually watch the Red Sox but hate the NESN broadcast. (I don't suppose the media details screen could alert me when Jerry Remy has a day off? ) So it would be nice for the Red Sox game to be highlighted but to still have the option to watch the other team's broadcast.
 
Old 05-15-2014, 01:34 AM   #4470
pajamian
Member
 
Registered: Oct 2009
Posts: 38

Rep: Reputation: 1
Working great now!

not sure exactly what you did, but I checked out r622 and it's working perfectly now. Games are showing the correct time (in local New Zealand time) and today's games are displaying when I start mlbviewer instead of tomorrow's games. time_offset is blank, I didn't have to set it.
 
  


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

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

All times are GMT -5. The time now is 01:18 AM.

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