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.
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.
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
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.
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.
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.
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.
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.
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.
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
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.
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!
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.