LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MLB.TV in Linux (https://www.linuxquestions.org/questions/linux-software-2/mlb-tv-in-linux-432479/)

daftcat 03-12-2013 09:57 AM

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. :p Sometimes I make debug additions I forget I made. :D 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.

BostonPeng 03-12-2013 10:38 AM

Quote:

Originally Posted by daftcat (Post 4909462)
Check both video_player and audio_player.

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.

randcoop 03-12-2013 12:37 PM

Cannot create configuration file
 
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.

Thanks for any help that can be offered.

daftcat 03-12-2013 01:15 PM

Quote:

Originally Posted by randcoop (Post 4910128)
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.

Thanks for any help that can be offered.

Post the error.

chrisVV 03-12-2013 01:56 PM

Quote:

Originally Posted by daftcat (Post 4910017)
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.

It works fine, thanks.

daftcat 03-12-2013 10:22 PM

Quote:

Originally Posted by BostonPeng (Post 4910040)
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. ;)

randcoop 03-13-2013 06:27 AM

Quote:

Originally Posted by daftcat (Post 4910162)
Post the error.

File "mlbviewer.py", line 113
print 'Creating configuration files'

SyntaxError: invalid syntax

Then, if I comment out line 113 (the print command), I get this:

File "mlbviewer.py", line 118
print 'Could not create directory: ' + '\n'

SyntaxError: invalid syntax

BostonPeng 03-13-2013 08:25 AM

Quote:

Originally Posted by daftcat (Post 4910408)
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.

daftcat 03-14-2013 12:39 AM

Quote:

Originally Posted by randcoop (Post 4910648)
File "mlbviewer.py", line 113
print 'Creating configuration files'

SyntaxError: invalid syntax

Then, if I comment out line 113 (the print command), I get this:

File "mlbviewer.py", line 118
print 'Could not create directory: ' + '\n'

SyntaxError: invalid syntax

Sounds like you have python 3.0. Mlbviewer is written for 2.x (Mostly 2.7ish)

What does "python --version" say?

See if you can install python2.7 on your system.

daftcat 03-14-2013 12:45 AM

Quote:

Originally Posted by BostonPeng (Post 4910722)
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. :)

The other thing(s) I'm working will take longer.

randcoop 03-14-2013 08:32 AM

Quote:

Originally Posted by daftcat (Post 4911206)
Sounds like you have python 3.0. Mlbviewer is written for 2.x (Mostly 2.7ish)

What does "python --version" say?

See if you can install python2.7 on your system.

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.

BostonPeng 03-14-2013 09:14 AM

Quote:

Originally Posted by daftcat (Post 4911209)
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.

daftcat 03-14-2013 12:11 PM

Quote:

Originally Posted by BostonPeng (Post 4911478)
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.

BostonPeng 03-14-2013 12:15 PM

Quote:

Originally Posted by daftcat (Post 4911590)
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.

daftcat 03-14-2013 12:24 PM

Quote:

Originally Posted by randcoop (Post 4911448)
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.


All times are GMT -5. The time now is 09:04 PM.