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.
As a side note, do you know of any way to force which CDN to use (i.e. Level3 over Akamai) in the media request?
I always have issues with games that have Akamai set as the primary CDN, but Level3 works well every time. I see there is an alternate smil for each game (just change 'aka' to 'lev3') -- but I need the correct auth parameters to actually make it work.
Never really got *that* deep into it. I am guessing that the media response is not portable since there's an auth chunk that gets returned as part of the URL. I could be wrong. I honestly don't understand much of the architecture. I reverse architected something that works from wireshark traces.
If it helps you any, all three responses from MLBAM are logged in ~/.mlb as:
successful-1.xml : First request looks up content-id
successful-2.xml : Receives FMS cloud URL
fmscloud.xml : Receives the bits to put together the actual content URL
You can "pretty print" these responses with the mediaxml.py script in the test directory, e.g.
Checked in a fix. I had pruned out "lan" as a teamcode for Dodgers not realizing I was using it as a lookup for highlights. Let me know if you see any other teams whose highlights don't work.
First, thanks for your work on this project! It's so awesome to be able to work with this.
Secondly, I don't know if anyone has tried this yet, but I'm going to make an attempt to integrate mlbviewer on a Raspberry Pi with the PiFace Control and Display. It's a 16x2 LCD with 5 switches, a rocker switch, and IR port. I've used the RasPi + PiFaceCAD to do Internet radio and ripping CDs. Now I'd like to see if I can create the same experience with mlbviewer. My thought is to use the LCD to browse games, see current scores, and potentially display current info about the game (teams, score, inning, pitcher, batter, etc).
Initially I'd start with just audio because it's easy, but then look at video as well.
I know there are other devices that will do it (PC, smart TV apps, etc), I just enjoy seeing if I can make it work, learning more Python, and enjoying baseball.
Are the times correct since daylight savings time switchover this past weekend?
Looks good to me but I want to know from others since that's always been a weak point in the MLBSchedule class. Sometime last season I changed this class to stop using hard-coded dates for DST and to use a datetime class method to determine DST.
Are the times correct since daylight savings time switchover this past weekend?
Looks good to me but I want to know from others since that's always been a weak point in the MLBSchedule class. Sometime last season I changed this class to stop using hard-coded dates for DST and to use a datetime class method to determine DST.
Are the times correct since daylight savings time switchover this past weekend?
Times are an hour out for any areas which have not yet advanced their clocks to summer time, as in Western Europe. mlbviewer seems to assume all clocks have advanced if US time has advanced.
However I should leave it. mlbviewer has always had this problem, and trying to fix it may mess things up when clocks change here at the end of the month. The issue will resolve itself in 2 weeks' time, and will not reappear until the end of October (US clocks go back a week later than in Europe). You quickly learn to live with it.
Times are an hour out for any areas which have not yet advanced their clocks to summer time, as in Western Europe. mlbviewer seems to assume all clocks have advanced if US time has advanced.
However I should leave it. mlbviewer has always had this problem, and trying to fix it may mess things up when clocks change here at the end of the month. The issue will resolve itself in 2 weeks' time, and will not reappear until the end of October (US clocks go back a week later than in Europe). You quickly learn to live with it.
Chris
I'm glad you're okay with it because there's probably no easy fix for it. Game times are always published in US/Eastern. From there, I convert once to GMT and again to localtime. During the GMT conversion, I either add 4 hours or 5 hours depending on the value of time.daylight. Can you do the following for me?
Code:
$ python
Python 2.7.5+ (default, Sep 17 2013, 17:31:54)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.daylight
1
>>>
(Ctrl-D to exit.)
If it also returns one, then python is using US dates for DST rather than using local dates. If time.daylight = 0 where you are, then I have a genuine bug to fix.
There is a time_offset= config file option but it doesn't look like I brought that code in when I did the rewrite last year.
It does. I googled time.daylight and discovered that it didn't mean what I thought it did.
Please update to rev 590 and let me know if the times are correct now. I've only modified the listings code (main screen) for the moment. If it turns out to be wrong, I don't want to bother updating all the other classes. If it does turn out right, I'll go ahead and modify the other classes as well.
Please update to rev 590 and let me know if the times are correct now. I've only modified the listings code (main screen) for the moment. If it turns out to be wrong, I don't want to bother updating all the other classes. If it does turn out right, I'll go ahead and modify the other classes as well.
Revision 590 is still an hour out in Western Europe on the main screen.
Also, can you give me the output of the date command? Just want to know what timezone your system is set for. I'm guessing that I should be able to use a python library to adjust tzdata temporarily for my session so I don't have to keep asking you to test this code for me.
$ python
Python 2.7.3 (default, Sep 26 2013, 16:38:10)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.localtime()
time.struct_time(tm_year=2014, tm_mon=3, tm_mday=16, tm_hour=19, tm_min=43, tm_sec=9, tm_wday=6, tm_yday=75, tm_isdst=0)
Okay, so the flag works as I was expecting it, but perhaps I put my edit in the wrong place. What's your timezone (from date command) so I can try to fix this from here?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.