LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-02-2014, 10:17 PM   #4576
cbpb
LQ Newbie
 
Registered: Oct 2014
Posts: 4

Rep: Reputation: Disabled

I ran into the same problem with mlbviewer selecting the wrong stream for international users.
I got it to work with the following crude fix in in lines 269 and 270 of mlbviewer2014/MLBviewer/mlbSchedule.py (before the comment line "# free game of the day"):

Code:
if '-NAT' in tmp['display']:
    coverage = away
This swaps the coverage whenever "-NAT" appears in the name of the stream. With this fix TBS-INT gets selected instead of TBS-NAT.

Don't forget to remove mlbSchedule.pyc to recompile the source when starting mlbviewer the next time.

Regards,
 
Old 10-02-2014, 10:50 PM   #4577
pajamian
Member
 
Registered: Oct 2009
Posts: 38

Rep: Reputation: 1
Quote:
Originally Posted by cbpb View Post
I ran into the same problem with mlbviewer selecting the wrong stream for international users.
I got it to work with the following crude fix in in lines 269 and 270 of mlbviewer2014/MLBviewer/mlbSchedule.py (before the comment line "# free game of the day"):
Thanks, it now seems to fetch the -INT stream, but it still gives me this error:
ERROR: BLACKOUT: MLB_NON_US_BLACKOUT

Not sure what to look at next.
 
Old 10-02-2014, 11:57 PM   #4578
pajamian
Member
 
Registered: Oct 2009
Posts: 38

Rep: Reputation: 1
Quote:
Originally Posted by pajamian View Post
Thanks, it now seems to fetch the -INT stream, but it still gives me this error:
ERROR: BLACKOUT: MLB_NON_US_BLACKOUT

Not sure what to look at next.
Ok, it now says TBS-INT when it attempts to play, but blackout.xml has this:
<domain-attribute name="call_letters">TBS-NAT</domain-attribute>
...so I think that somehow it's still trying to fetch the -NAT stream.
 
Old 10-03-2014, 12:36 AM   #4579
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by pajamian View Post
Ok, it now says TBS-INT when it attempts to play, but blackout.xml has this:
<domain-attribute name="call_letters">TBS-NAT</domain-attribute>
...so I think that somehow it's still trying to fetch the -NAT stream.
I'm assuming you are international?

Try setting postseason=1 in your ~/.mlb/config.

If that doesn't work, send me your ~/.mlb/unsuccessful-1.xml and -2.xml to the yahoo address in the README.

There's not a lot I can do testing-wise since I'm US, don't have a TV subscription (since they're now bass-ackwards and requiring one to watch live Postseason of their US customers), and even if I did have a TV package, they don't support my cable provider.

Best I can do is look at the response in the unsuccessful-*.xml files and see which tag or property I need to select on. The -NAT hack is definitely crude. There are a lot of tags and properties in the responses. One of them should be able to distinguish between the two streams without having to match on the call letters.
 
Old 10-03-2014, 12:42 AM   #4580
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Actually, please tar up all the xml files in ~/.mlb and send them my way. Seems I might want to catch this/filter it out with postseason=1 flag in the listings code rather than the media request code.
 
Old 10-03-2014, 01:45 AM   #4581
pajamian
Member
 
Registered: Oct 2009
Posts: 38

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
Actually, please tar up all the xml files in ~/.mlb and send them my way. Seems I might want to catch this/filter it out with postseason=1 flag in the listings code rather than the media request code.
I'll send you the xml files from today and try to get on for one of the earlier games tomorrow to test the postseason flag.
 
Old 10-03-2014, 03:43 AM   #4582
mkomko
Member
 
Registered: Mar 2010
Posts: 97

Rep: Reputation: 3
You know what's funny:
Using mlbviewer I can play the first ALDS game, but not the second ALDS game.
Using mlbplay I can play the second ALDS game, but not the first ALDS game.

Somehow the media selection seems to be different. Luckily, that allows me to watch both of the (archived) games .

If there is any debug data you need from me, please say so. I hope pajamian can get you everything you need.

Thank you so much in advance!

Last edited by mkomko; 10-03-2014 at 03:44 AM.
 
Old 10-03-2014, 10:40 AM   #4583
cbpb
LQ Newbie
 
Registered: Oct 2014
Posts: 4

Rep: Reputation: Disabled
For me the situatuion was like this:

1. I could watch the wild card games with postseason=0
2. To be able to watch the first ALDS game (Tigers @ Orioles) I had to set postseason=1
3. To be able to watch the second ALDS game (Royals @ Angels) I had to implement my fix

I think the games covered by TBS have two live streams and mlbviewer randomly selects one. FS1 seems to provide only one media stream, at least according to the "MEDIA DETAIL VIEW" in mlbviewer.

When today looking into the media detail view for yesterday (10/2/1014) there now only appears the TBS-INT stream, so probably my fix is not needed to watch archives of the games covered by TBS.

Regards
 
Old 10-03-2014, 03:44 PM   #4584
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by cbpb View Post
For me the situatuion was like this:

1. I could watch the wild card games with postseason=0
2. To be able to watch the first ALDS game (Tigers @ Orioles) I had to set postseason=1
3. To be able to watch the second ALDS game (Royals @ Angels) I had to implement my fix

I think the games covered by TBS have two live streams and mlbviewer randomly selects one. FS1 seems to provide only one media stream, at least according to the "MEDIA DETAIL VIEW" in mlbviewer.

When today looking into the media detail view for yesterday (10/2/1014) there now only appears the TBS-INT stream, so probably my fix is not needed to watch archives of the games covered by TBS.

Regards
Since I cannot really test this seeing as I'm blacked out, I have created a patch instead of committing my code just yet.

Please test out this patch. If it works for everyone, I'll commit it.

Code:
Index: MLBviewer/mlbSchedule.py
===================================================================
--- MLBviewer/mlbSchedule.py	(revision 650)
+++ MLBviewer/mlbSchedule.py	(working copy)
@@ -222,7 +222,13 @@
            for attr in media.attributes.keys():
                tmp[attr] = str(media.getAttribute(attr))
            out = []
+           # skip TBS-NAT for international postseason
            try:
+               if tmp.get('tbs_auth_required') == "Y":
+                   continue
+           except:
+               pass
+           try:
                tmp['playback_scenario'] = tmp['playback_scenario'].strip()
            except:
                continue
To apply the patch:

1. Put that into a diff file, e.g. no-tbs-nat.diff in the base mlbviewer directory.
2. Execute the patch command as: patch -p1 < no-tbs-nat.diff
3. If prompted for the "File to patch:" use MLBviewer/mlbSchedule.py
 
Old 10-03-2014, 03:51 PM   #4585
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
How it works (and why I don't want to commit it just yet):

The grid.xml file that the listings are built from contains entries for each stream. The TBS-NAT stream has this parameter in it: tbs_auth_required="Y". So when I parse the listings, if I see that parameter, I toss that stream.

The reason I don't want to commit it just yet is that if a North American subscriber does have a TV subscription from one of the supported providers (How could they omit the largest provider in the US?!), I don't want to prevent them from doing so.

The patch above is a temporary fix for you guys to test and tell me if it works for you.

In the meantime, I have to feed the MLBConfig object into MLBSchedule in order to get the config file parameters. Once I make that change, I can wrap this code in a config file option and commit it.

I don't want to do that today while I'm at work. So the earliest I can have this committed will be tomorrow.
 
Old 10-03-2014, 05:02 PM   #4586
pajamian
Member
 
Registered: Oct 2009
Posts: 38

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
How it works (and why I don't want to commit it just yet):

The grid.xml file that the listings are built from contains entries for each stream. The TBS-NAT stream has this parameter in it: tbs_auth_required="Y". So when I parse the listings, if I see that parameter, I toss that stream.
Tested with the archived Tigers/Orioles game, the live Giants/Nationals game and the Cadinals/Dodgers game ("This game is about to start" screen). All of the above work great for me now. I'll let you know if there's an issue with the Angels/Royals game later on.

Quote:
The reason I don't want to commit it just yet is that if a North American subscriber does have a TV subscription from one of the supported providers (How could they omit the largest provider in the US?!), I don't want to prevent them from doing so.
It would probably be a good idea to have an "international" setting to control this. Enable the code if international=1. On the flip side, if international=0 you may want to put in some code to make certain they get the -NAT stream instead.

Quote:
I don't want to do that today while I'm at work. So the earliest I can have this committed will be tomorrow.
That's fine, I'm just happy I can watch the game now that I've applied the patch. As always, thanks for all your hard work on this program!
 
Old 10-03-2014, 05:50 PM   #4587
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by pajamian View Post

It would probably be a good idea to have an "international" setting to control this. Enable the code if international=1. On the flip side, if international=0 you may want to put in some code to make certain they get the -NAT stream instead.
Good point!

MLBSchedule is one of the oldest classes in mlbviewer. As such, while most of the other classes take an MLBConfig (your config file) object as an argument, this class does not. On top of all of that, many of the screens use MLBSchedule as their starting point. So there's a lot of room for breakage in changing MLBSchedule from an argument list to an MLBConfig object. However, the benefit is great because then I can start filtering the listings based on configuration options.

Anyway, glad to hear the patch is working for you. I expect to have the changes I mention here committed this weekend.

Last edited by daftcat; 10-03-2014 at 06:16 PM.
 
Old 10-03-2014, 08:15 PM   #4588
cbpb
LQ Newbie
 
Registered: Oct 2014
Posts: 4

Rep: Reputation: Disabled
The patch works fine for me. Before it was applied the TBS-NAT stream did appear first for the Royals-Angels game in the media detail view. After applying the patch it no longer appears, instead (None) is shown like for the FS1 games.

Thanks to daftcat for the fast delivery of the patch.

Regards
 
Old 10-04-2014, 06:40 PM   #4589
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 651: Fix for international postseason and international= config file option

International users using my patch above, please revert it and update to SVN 651:

Code:
svn revert MLBviewer/mlbSchedule.py && svn up
After updating to 651, you will need to add international=1 to your ~/.mlb/config

This covers both TBS and MLBN. At some point, Fox may also have a -NAT/-INT separation. When that happens, I'll be adding another *_auth_required check.

There's a bug in my media detail screen that doesn't want to show me media past tomorrow. I'll fix that bug today or tomorrow.

For the reverse, e.g. US users who want to watch the -NAT streams, I'm not exactly sure the right approach to take for that. With international, it's easy to toss out the *_auth_required listings. However, the international streams do not have a *_auth_required=N. So tossing out anything that doesn't have an *_auth_required will break regular season. Probably not a big deal now but it will be for next season or even wanting to go back and watch games from this season. I'm considering a postseason_us= option so that will at least be descriptive of the behavior rather than just assuming international=0 or no international= option. I think I'm running out of time to work on this today so I'll revisit the US behavior tomorrow.
 
Old 10-05-2014, 02:02 PM   #4590
cbpb
LQ Newbie
 
Registered: Oct 2014
Posts: 4

Rep: Reputation: Disabled
I have checked out the current sourcecode (r652) from the repository: Works perfectly with international=1. Although I hadn't the time to update before the Cardinals/Dodgers game on MLBN for which I reverted to my crude fix I expect it will although work for games on MLBN. Thanks for the quick fix.

Sadly I have two times now had the problem that during a game mlbviewer stopped working and went back to the listings screen. Restarting mlbviewer didn't help and neither did disabling nexdef. This happened during the Royals/Angels game on 10/3 and the Giants/Nationals game yesterday. The Cardinals/Dodgers game at the same time worked perfectly and also in the browser the Giants/Nationals game could be watched. In the log file nothing unusual was logged. I think this was more a technical issue on mlbtv's side than an error in mlbviewer so probably not much can be done about it. I hope that it doesn't happen again.

Regards
 
  


Reply

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



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 03:28 PM.

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