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 snagged it from SF since I forgot to snag the svn update when I was celebrating Saturday. But that's ok, because I have later code than I would have gotten anyway this way. Thanks for posting it so fast!
But damn. Now I see I have another update to snag. Good thing I'm on a fast pipe, eh?
Last edited by BostonPeng; 05-20-2013 at 04:12 PM.
I snagged it from SF since I forgot to snag the svn update when I was celebrating Saturday. But that's ok, because I have later code than I would have gotten anyway this way. Thanks for posting it so fast!
But damn. Now I see I have another update to snag. Good thing I'm on a fast pipe, eh?
Provided there are no showstopping bugs that make the sourceforge releases unusable without a fix, sf-6 is likely to be the last sf release for a good long time. Bug fixes and new tweaks will continue to get checked into SVN as they are reported or requested.
Donations are not required but would be greatly appreciated
I hate this part but really, I do put in a lot of time (sleepless nights, weekends, crazy ideas when I woke up too early in the morning) to maintain this code and to bring new features. A small donation would be appreciated if you can afford it.
Recap of what I brought to mlbviewer in 2013:
+ complete code rewrite making it a lot easier to maintain and add to mlbviewer, and add to it I did...
+ scoreboard view
+ line scores
+ box scores
+ standings
+ RSS
+ custom keybindings
+ MiLB.tv integration
+ and numerous bug fixes and customizations based on user requests
So if you can spare a few dollars, it would be greatly appreciated. If you can't, that's okay too. Donations can be made via Paypal to the email address at the bottom of the README ("tail README" )
Thank you and keep the bug reports and enhancement requests coming so I can keep improving on mlbviewer.
Then I use test/mediaxml.py to parse it and pretty-print it.
Quote:
matthew@dubstep32:~/mlbtv/mlb2013/test$ ./mediaxml.py grid.xml |grep _code
away_file_code: sea
home_file_code: cle
home_code: cle
away_code: sea
away_file_code: tb
home_file_code: tor
home_code: tor
away_code: tba
away_file_code: nyy
home_file_code: bal
home_code: bal
away_code: nya
away_file_code: cin
home_file_code: nym
home_code: nyn
away_code: cin
away_file_code: min
home_file_code: atl
home_code: atl
away_code: min
away_file_code: phi
home_file_code: mia
home_code: mia
away_code: phi
away_file_code: oak
home_file_code: tex
home_code: tex
away_code: oak
away_file_code: bos
home_file_code: cws
home_code: cha
away_code: bos
away_file_code: kc
home_file_code: hou
home_code: hou
away_code: kca
away_file_code: la
home_file_code: mil
home_code: mil
away_code: lan
away_file_code: ari
home_file_code: col
home_code: col
away_code: ari
away_file_code: stl
home_file_code: sd
home_code: sdn
away_code: sln
away_file_code: was
home_file_code: sf
home_code: sfn
away_code: was
This isn't a complete list but only the games played today.
They are often two different codes in use and sometimes they will use one but not the other. For example, the home_code may be used in the section where I parse home run data for line scores, whereas the home_file_code may be used almost everywhere else. It gets even worse for MiLB where the home_code and home_file_code are vastly different and used for different purposes. The home_code may be something like oma for Omaha and t541 for the home_file_code. So for line scores, I have to check whether I am parsing a minor league file or not and use the home_code where I would normally use the home_file_code.
I believe I use the *_file_code wherever possible. Even in places where they use the *_code, I build a dynamic mapping of *_code to *_file_code so I can continue to use the *_file_code. This is the reason why "la" is used in place of "lan" even though lan is what will show up in the game id:
So if you wanted to build your own dictionary, find a day with a full schedule and make your own map of home_code to home_file_code and away_code to away_file_code. The (home,away)_code is what will appear in the game id but the (home,away)_file_code is what you'll need to select the stream in the v= or a= parameters.
Long story short, I'll do this myself and update the documentation wherever necessary.
For MiLB, I build the TEAMCODES dictionary dynamically. Every time I parse the media JSON page (it's not even XML), I add an entry to TEAMCODES in memory. Therefore for MiLB, I recommend you always use milblistings first to see if the desired team is even on the broadcast schedule for the day. If it's not and you request a game for that team code in milbplay, TEAMCODES won't have the entry and report "invalid teamcode". For milbplay and milblistings, the code in the milblisting is what I use in milbplay.
I'll look into making this the behavior in mlblistings/mlbplay as well.
I am working on the new map, since I use mlbplay.py instead of mlbviewer.py - unless you happen to have it on hand!
EDIT: I also sent a very small donation to you via Paypal. More on the way when I get some spare change Thanks for everything you do!
Thanks for the donation. I appreciate it.
As I rambled on in the last post, the codes in mlblistings are different from the codes used in mlbplay. Mlblistings will show sln, nyn, nya, chn, cha, etc whereas mlbplay will expect stl, nym, nyy, chc, cws, etc. I do see the error with mia vs fla. I'll double check the others and update the documentation wherever necessary.
SVN rev 494: Favorite team highlighting in scoreboard view
Only seemed logical that if favorite team highlighting in listings view, I should also highlight in scoreboard view. I can't use the underlining if use_color=0 because I already use underline to break up the games. But, if use_color=1, favorite_color= will be used to highlight the game in scoreboard view. Really helpful because now I can see both my team and their first place rivals much easier. Grr! @ Cleveland!
SVN rev 495: Modifications to status line to properly reflect MiLB
MiLB listings will display status flags of:
Code:
Status: In Progress (No audio) [MILB][1000K][--]
Only debug toggle will be functional. Other toggles will be ignored in MiLB mode to properly reflect MiLB.tv capabilities.
SVN rev 498: Fixed (Archived) game indicator in MiLB listings as well as changing [MILB] to [MiLB] in status line
I just discovered another perk to running mlbviewer: When highlights are available during the game they're also available in mlbviewer! I'm following the Dodgers/Brewers game in MLB Gameday (thank Tux for day games!) and the video of Kemp's RBI single is already available in the Top Plays for the game. Sweeeet!
I just discovered another perk to running mlbviewer: When highlights are available during the game they're also available in mlbviewer! I'm following the Dodgers/Brewers game in MLB Gameday (thank Tux for day games!) and the video of Kemp's RBI single is already available in the Top Plays for the game. Sweeeet!
I've been seeing that as well, but the videos are the most welcome since I can't seem to enjoy the in-browser videos for some reason. All of them seem to stutter, including the live lookins, so at least being able to see the highlights are welcome, even if I'd like clips from things that aren't shown like the injury delay earlier in this game.
SVN revision 501: filename_format and various bug fixes
Updated error message for non-subscribers requesting subscription content.
Updated error message for jump-to-inning and condensed games not supported in MiLB.
Added filename_format option (icelancer, this one's for you).
If %f appears in audio_player or video_player, default filename format was always GAMEID-CALL_LETTERS.suffix (mp3 for audio or mp4 for video)
That's still the default. But if filename_format= is in config file, it will override this default.
Code:
Supported_tokens = ( '%g', gameid, e.g. 2013-05-28-slnmlb-kcamlb-1
'%l', call_letters, e.g. FSKC-HD
'%t', team_id, e.g. 118 (mostly useless)
'%c', content_id, e.g. 27310673
'%e', event_id, e.g. 14-347519-2013-05-28
'%m', suffix, e.g. 'mp3' or 'mp4')
Default format (%g-%l.%m) would translate to:
2013-05-28-slnmlb-kcamlb-1-FSKC-HD.mp4
Default milb format is %g.%m (as call letters are always empty in MiLB)
And anything that doesn't match one of those tokens is taken literally such as filename_format=mlbgame.%m would be mlbgame.mp3 for audio or mlbgame.mp4 for video.
Also added same functionality to milb.
Also changed both mlbplay and milbplay to display the command string (not just the media URL) when d=1 flag is included. This let's you dry run your filename_format without actually running the streamer/player commands.
Rev 502
Fixed a line score bug. Zimmerman did actually hit 3 HR's despite what my buggy code was telling you.
Checked in a couple more fixes into 504; one for CG (%t is int(0) so coerce it to str(0).) Removed separate prepareFilename in MiLBMediaStream so it can inherit it from MediaStream base class (e.g. consolidate the code with a couple checks for milbtv so I only have to maintain the code in one place.)
I see that as of Monday it looks like MLB is changing their online video system. Instead of the highlights showing up in the usual 640x360 size they have a new larger option of 960x540. I can't see if there are quality differences but I was able to get the info in the attached image from VLC on a pair of downloaded videos. (Videos were downloaded with my web browser, not mlbviewer, and strictly for my own viewing.)
@daftcat:
I'm wondering if this has any impact on what you're doing with mlbviewer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.