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.
SVN revision 383: added use_wired_web configuration option and updated test/mediaxml.py
So that you don't have to make that edit every time you update, I have added the configuration file option use_wired_web. It defaults to 0 but you can change it to 1 for basic subscribers who want to use nexdef.
In fact, if premium subscribers want to do some testing for me, they can add use_wired_web=1 to their configuration file as well. I want to know if you notice any performance or quality differences. If you see no difference, I could make use_wired_web=1 the default for everyone.
Also, did you know that those XML replies from the test tools are saved to ~/.mlb/successful-1.xml and ~/.mlb/successful-2.xml (or unsuccessful-1.xml and unsuccessful-2.xml) for all media requests? Yeah, me neither. Sometimes I make debug additions I forget I made. You can use test/mediaxml.py on either one of those files to see a decoded version of the xml similar to that pastebin I posted above.
vlc is not the default player in mlbviewer so you are picking it up somewhere. Try removing/renaming the config file and let it auto-generate a new one.
The help error occurs when there are either more lines or more columns of text to print than your terminal supports. Sorry, I just haven't implemented truncation or scrolling in all my addstr()'s. Then again, the help screen is formatted for a standard 80x24 terminal.
I had forgotten there was a top_plays_player, which is where vlc was being picked up since I'm just watching highlights since I don't have a subscription.
ETA: Is there any way to play all the top plays from a game in a playlist? I'm not sure if it's possible but I'd love to be able to catch the highlights form a game that way.
Last edited by BostonPeng; 03-12-2013 at 10:47 AM.
Reason: Added a top plays query
For some reason, mlbviewer.py is giving me an error in trying to create a configuration file. I'm wondering if I can bypass the problem by manually creating the file. Can someone here pass along a generic configuration file and tell me where it should be located?
I don't see how this can be a permissions issue, since it happens even if I try to run the program as root.
For some reason, mlbviewer.py is giving me an error in trying to create a configuration file. I'm wondering if I can bypass the problem by manually creating the file. Can someone here pass along a generic configuration file and tell me where it should be located?
I don't see how this can be a permissions issue, since it happens even if I try to run the program as root.
So that you don't have to make that edit every time you update, I have added the configuration file option use_wired_web. It defaults to 0 but you can change it to 1 for basic subscribers who want to use nexdef.
I had forgotten there was a top_plays_player, which is where vlc was being picked up since I'm just watching highlights since I don't have a subscription.
ETA: Is there any way to play all the top plays from a game in a playlist? I'm not sure if it's possible but I'd love to be able to catch the highlights form a game that way.
Interesting thought. I'm away from my comp right now so I can't comment with authority yet. If top plays are just direct links to the videos, it shouldn't be too hard. Maybe a lazy Sunday project. If it takes two XML requests like normal video then probably not.
Also I have something else up my sleeve that I've been playing with that as a non-subscriber, you'll probably appreciate.
Interesting thought. I'm away from my comp right now so I can't comment with authority yet. If top plays are just direct links to the videos, it shouldn't be too hard. Maybe a lazy Sunday project. If it takes two XML requests like normal video then probably not.
Also I have something else up my sleeve that I've been playing with that as a non-subscriber, you'll probably appreciate.
Thanks for looking into the top plays playlist. It's a bit of a pain to have to close my player after each video to see the next one, although I haven't even looked to see if there's a way to bypass closing the player to let mlbviewer know I'm ready for something else. And goodies for us poor folk who can't afford a subscription? I look forward to seeing what you have in mind.
Thanks for looking into the top plays playlist. It's a bit of a pain to have to close my player after each video to see the next one, although I haven't even looked to see if there's a way to bypass closing the player to let mlbviewer know I'm ready for something else. And goodies for us poor folk who can't afford a subscription? I look forward to seeing what you have in mind.
Top plays is a single file (...gameid/media/highlights.xml) and each individual highlight has a direct url. It should be a problem to implement a playlist. Sunday afternoon project.
Top plays is a single file (...gameid/media/highlights.xml) and each individual highlight has a direct url. It should be a problem to implement a playlist. Sunday afternoon project.
The other thing(s) I'm working will take longer.
I was afraid top plays worked like that. Is it possible to select a new video in mlbviewer without closing my video player? If so that could work for me. As far as the other thing? No rush from me. I'm just glad to have mlbviewer to be able to watch my daily highlight videos. It may even keep me from saving each video in my web browser to be able to watch them, although it won't help me with getting them in game order. And that's just a personal quirk of mine.
I was afraid top plays worked like that. Is it possible to select a new video in mlbviewer without closing my video player? If so that could work for me. As far as the other thing? No rush from me. I'm just glad to have mlbviewer to be able to watch my daily highlight videos. It may even keep me from saving each video in my web browser to be able to watch them, although it won't help me with getting them in game order. And that's just a personal quirk of mine.
I meant to say "should not" be a problem to implement playlist functionality this weekend.
No, it's more of a problem to interact with an already open mplayer instance.
If you want a sneak preview of what will eventually be implemented:
Code:
cd test
wget http://gdx.mlb.com/components/game/mlb/year_2013/month_03/day_13/gid_2013_03_13_anamlb_sdnmlb_1/media/highlights.xml
./mediaxml.py highlights.xml | grep mp4 | awk '{print $2}' > highlights.m3u8
mplayer -playlist highlights.m3u8
I'm just going to add a new keybinding (or overload an existing one for the highlights screen) that will automate this for you once you've navigated to the top plays screen for a particular game.
I meant to say "should not" be a problem to implement playlist functionality this weekend.
No, it's more of a problem to interact with an already open mplayer instance.
If you want a sneak preview of what will eventually be implemented:
Code:
cd test
wget http://gdx.mlb.com/components/game/mlb/year_2013/month_03/day_13/gid_2013_03_13_anamlb_sdnmlb_1/media/highlights.xml
./mediaxml.py highlights.xml | grep mp4 | awk '{print $2}' > highlights.m3u8
mplayer -playlist highlights.m3u8
I'm just going to add a new keybinding (or overload an existing one for the highlights screen) that will automate this for you once you've navigated to the top plays screen for a particular game.
I had an idea I needed to close the player between videos. That looks pretty cool. I'll wait to take it for a spin since I'm also running tests for SolydK's Update Pack 1 and don't want to confuse me or my laptop too much. I know when you roll it out it'll probably be well worth waiting for.
I have both python 3.3 and python 2.7 installed (it's Arch linux).
I don't know how to get mlbviewer to use 2.7, though. Any suggestion?
Thanks again for your help.
Gah! I understand that python3 is the next generation but python2.7 is still probably more widely used. I don't like distros that try to be bleeding edge just to be bleeding edge.
Now that I have that off my chest.
You could change the symbolic link from /usr/bin/python from python3.3 to python2.7 but that may break a whole ton of system stuff if they actually did the system stuff in python3.3.
You could change the top line of every file from #!/usr/bin/env python to #!/usr/bin/python2.7 except you'll have to do that every time a file gets updated. Not a good option.
If you have /usr/local/bin ahead of /usr/bin in your PATH (env | grep PATH), you can add try adding a symbolic link in /usr/local/bin to python2.7 (ln -s /usr/bin/python2.7 /usr/local/bin/python)
That third option may be the safest but there may still be user-level python bindings that could get affected.
You can try it and see if that fixes mlbviewer for you. Then you'll have to watch to see if anything else breaks (maybe anything that uses dbus?)
Let me look into this and see what I can come up with.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.