Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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.
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?
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?
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:
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.
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.
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.
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'
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.