LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-16-2014, 10:31 AM   #4471
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76

Quote:
Originally Posted by mgoetze View Post
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.
Added disable_favorite_follow= option in r623. If present and set to 1 in your config, it will override the favorite follow code but does not disable highlighting or focus on favorite.
 
Old 05-16-2014, 10:40 AM   #4472
mgoetze
LQ Newbie
 
Registered: Aug 2013
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
Added disable_favorite_follow= option in r623. If present and set to 1 in your config, it will override the favorite follow code but does not disable highlighting or focus on favorite.
Seems to work, thanks!
 
Old 05-16-2014, 10:42 AM   #4473
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
Quote:
Originally Posted by pajamian View Post
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.
Excellent!

So I did the following:

1. When starting up, I effectively convert your local time to US/Eastern before fetching the schedule.

2. For game times, I have implemented my own class to convert US/Eastern to UTC. This conversion was failing in the old code because it was using local time DST rules to determine whether US/Eastern was DST or not.

This should also fix a long standing issue where US goes on DST before the rest of the world and Spring Training times are off by an hour until local timezone goes to DST.
 
Old 05-20-2014, 11:31 AM   #4474
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
SVN revision 624: Enhancement to media detail screen

So the whole intent of media detail screen was to give a prettier face to the 'z' debug screen. The 'z' screen has been very useful to me over the years because it is the raw object debug of the listings screen. Since all the media-related commands are derived from the listings, there's actually a lot more contained in each line of the listings than what is displayed. Try the 'z' key on the default listings view. Lot of information. Kind of ugly. Of particular interest in this screen is the "prefer" line at the bottom. The "prefer" dictionary is built based on a combination of the coverage (home or away), the follow settings (video_follow, audio_follow, alt_audio_follow), and the general availability of media (sometimes only one stream is available so that's obviously preferred over the missing stream even though it may not be the coverage selected (e.g. a game forcing home coverage even though away is selected because there is no away stream available.)

In revision 624, I have replaced the redundant game status in the status line with the media that is preferred based on the settings and the availability. Also, for anyone interested in alternate audio, it is clear in this status line when the alternate audio is available given the settings and media availability.

It's a minor enhancement, but I hope you guys like it.
 
Old 05-23-2014, 02:28 PM   #4475
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
SVN revision 626: Favorite team division highlighting

So my team is actually not in last place. You know what that means? That means I am looking for results from the teams in my team's division in the master scoreboard. Not always easy.

You know what would be easier? Highlight all the games in which a division team played in a separate color in master scoreboard view.

Here's how this works:

1. You must have a favorite team specified in favorite= option. Without it, the rest of this is skipped.

2. Open master scoreboard view ('m' key.)

3. Enable division highlighting with the 'D' key. (Remember lowercase 'd' is for DEBUG.)

4. The default division highlighting color is red. Assuming default colors, you'll see your favorite team in cyan and the cursor should jump right to it. The free game of the day will be green (yep! I finally added this to master scoreboard to match listings and media detail behavior.) The other games in your team's division will be highlighted in red. To turn off the highlighting, press the 'D' key again.

5. If you want to make this permanent (always highlight division teams in master scoreboard view), set highlight_division=1 in your config.

6. To change the colors, there are three color settings: free_color, favorite_color, and division_color. The possible choices are: black, red, green, yellow, blue, magenta, cyan, and white.

7. Colors are processed in this order: favorite, free, division. They are mutually exclusive: if your favorite team is colored, it won't also be colored with free or division color. If a division team is playing in the free game, it won't also show up in the division color.


This should be a disabled-by-default feature so I am not forcing you guys to use it. However, it solved a problem I had which means someone else might like it too. If you do find it useful, let me know. I like feedback.

Last edited by daftcat; 05-23-2014 at 02:39 PM.
 
Old 05-24-2014, 01:24 PM   #4476
tonycpsu
LQ Newbie
 
Registered: Apr 2014
Posts: 1

Rep: Reputation: Disabled
Is there any possibility of a fix for the sign-on restriction problem? I don't know a ton about the internals of the MLB sign-on process, but with other authentication mechanisms, you can usually save the session cookie or whatever the site gives you to identify yourself between requests to disk (or a database, or whatever) and simply re-use those cached credentials until they expire and you have to re-authenticate. Any possibility of doing this with mlbviewer / mlbhls?

I'm a C and Python developer, so if someone can explain to me how the authentication handshake works, maybe I could work on a fix myself.
 
Old 05-24-2014, 11:20 PM   #4477
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
I believe I am already re-using session key but I want to redo the logging in mlbLogin.py to be certain.

I am out of town this weekend and the wifi here is pretty crappy. Give me a week to get back and recover from this weekend.
 
Old 05-26-2014, 12:26 AM   #4478
mkomko
Member
 
Registered: Mar 2010
Posts: 67

Rep: Reputation: 0
Just for info:
I always use mlbplay.py to start my games. When the game isn't available yet or the stream doesn't start but craps out, I have to try multiple times. After a few tries (I believe something between 5 and 10) I get the sign-on restriction error.
 
Old 05-26-2014, 04:17 PM   #4479
pajamian
LQ Newbie
 
Registered: Oct 2009
Posts: 15

Rep: Reputation: 0
If I set favorite= then it seems to force video_follow on the same team. How can I highlight my favorite team but not force the away feed when they're on the road?
 
Old 05-26-2014, 04:33 PM   #4480
pajamian
LQ Newbie
 
Registered: Oct 2009
Posts: 15

Rep: Reputation: 0
Quote:
Originally Posted by pajamian View Post
If I set favorite= then it seems to force video_follow on the same team. How can I highlight my favorite team but not force the away feed when they're on the road?
I figured it out, I had to update mlbviewer to the latest SVN and then set disable_favorite_follow=1 (don't ask me how I figured that out).

Anyways, that should be documented better for those of us who have a basic subscription so can't video_follow our team on the road (yes I should really just stop pinching pennies and fork out the extra $5/month for a premium sub).
 
Old 05-27-2014, 02:15 PM   #4481
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
Back home from being on the road for the better part of the last two weeks. My main development laptop needs some surgery tonight (replace the LCD hinge) and I could definitely use more sleep than I got this past weekend. I will have a look at the session/authentication code in the next few days. It looks like it's doing everything right in mlbviewer but I cannot say the same about mlbplay. Also, it could take awhile to fix if I get Sign-On Restriction errors since I generally don't have very many development hours available each day.

If you're encountering frequent Sign-On Restriction errors and you are also using mlbplay primarily, switching to mlbviewer won't make an SOR error go away but it may make them appear less frequently.
 
Old 05-28-2014, 07:45 AM   #4482
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Just in case it helps anyone: in my experience, game links already retrieved by mlbplay or mlbviewer will still work even after a sign-on restriction (it's only discovery of new links that is blocked). So if the stream crashes a few times and you get blocked, you can fish the link out of the .mlb/log file and use it to run mlbhls or rtmpdump manually.
 
Old 05-28-2014, 03:01 PM   #4483
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
Quote:
Originally Posted by fang2415 View Post
Just in case it helps anyone: in my experience, game links already retrieved by mlbplay or mlbviewer will still work even after a sign-on restriction (it's only discovery of new links that is blocked). So if the stream crashes a few times and you get blocked, you can fish the link out of the .mlb/log file and use it to run mlbhls or rtmpdump manually.
mlbhls, yes. This is true. rtmpdump links expire. Not super quickly, but they do seem to have a limited lifetime (unless they have changed that in recent years.)
 
Old 05-28-2014, 03:07 PM   #4484
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
SVN revision 629: At least one bug fixed in session key code

Found a rather big bug in MLBSession.readSessionKey() that was being masked by incorrect error checking. Basically, the stored session key was never being re-used because readSessionKey() routine was broken.

I added "k=1" as an option to mlbplay which is session-key debugging. It will display the value read from MLBSession.readSessionKey() in init() (stored session-key) and the value returned from MLBMediaStream.locateMedia() (media requests.) You should see two extra lines at the top of the output, e.g.

Code:
$ ./mlbplay.py k=1 a=kc
readSessionKey: IAttUXod6XOmGibBaBHV/ZBBvME=
Session-key from media request: IAttUXod6XOmGibBaBHV/ZBBvME=
Depending on how long it's been since you last ran mlbplay, these values may not be the same. However, within several hours (not sure how long the session-key is good for), this value should not change.

If you just want to beat up the new readSessionKey fix, try running this many times in succession:

Code:
$ ./mlbplay.py n=1 nu=1 k=1 v=la
That will request the video for Dodgers, print the nexdef base64 URL and exit without starting a player. The new k=1 will how the session key being re-used for as long as the key is good on the server.

The reason why mlbplay was a lot more susceptible to SOR errors than mlbviewer is that mlbviewer will re-use the session key for the lifetime of that mlbviewer session even if the stored value was missing (buggy readSessionKey routine.) On the other hand, mlbplay was always starting without a session key because readSessionKey was broken and even if it stored the correct key from the media response, it was unable to read it and use it the next time it ran due to the bug this revision fixes.

I can't guarantee that this will resolve any or all SOR errors but it will certainly get us closer to the desired functionality.

Last edited by daftcat; 05-28-2014 at 07:10 PM.
 
Old 05-28-2014, 07:15 PM   #4485
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,748

Rep: Reputation: 76
Didn't want to annoy MLB too much but I did just run the command above in a while loop for at least 10 iterations without an SOR error. I even got to see the session key change to a new value and that new value getting used the very next time.

For those who still prefer mlbviewer to mlbplay, you can watch session key actions in ~/.mlb/cookielog.
 
  


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 12:58 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