Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
roens
Visitor

Re: My Media - Your Music and Video on the Roku DVP

I'm attempting to be a new user of MyMedia. However, mymedia.py will not start:
$ python mymedia.py 
Traceback (most recent call last):
File "mymedia.py", line 1132, in <module>
ensure_configuration(config)
File "/store/home/mario/netguy204-roku_media_server-932629b/server/common.py", line 63, in ensure_configuration
ensure("photo_dir", default_photo_path)
UnboundLocalError: local variable 'default_photo_path' referenced before assignment


The only version of python I've got installed on this FreeBSD9 machine is v2.7.2. I even tried downloading the zip a second time, from a different URL, and even from the project page on github. But download attempts produce exactly the same file, by md5 checksum. I even tried generating a config.ini, from versions of that file that others have posted to this thread. No luck there, just the same error. (I guess the config is supposed to be generated on first run?)

I've tried searching this forum thread (and the net at large) via various means & have found no one mentioning things like "default_photo_path" or "referenced before assignment". So, I will add this posting.

This seems like it'd be interesting software to use with my Roku2… but so far, it's a non-starter. Maybe there's a bug in the source? I don't feel like trying to dig into that at the moment.
0 Kudos
el_wubo
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"roens" wrote:

The only version of python I've got installed on this FreeBSD9 machine is v2.7.2.


The problem is a chunk of code immediately above common.py:61 that's figuring out what an appropriate path is for your OS. It only includes checks for windows, mac, and linux--so the default path isn't defined for freebsd. So, is there a standard directory for music, videos, and pictures on FreeBSD? On linux it's $HOME/Music, $HOME/Videos, and $HOME/Pictures.

Let me know and I'll add freebsd support and you should be good to go.
0 Kudos
roens
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"el.wubo" wrote:
So, is there a standard directory for music, videos, and pictures on FreeBSD? On linux it's $HOME/Music, $HOME/Videos, and $HOME/Pictures.

Let me know and I'll add freebsd support and you should be good to go.


No, there's no standard location for such data in FreeBSD. But I've created a place. On this machine it happens to be /store/Media/… Since there is no primary, non-root user of the machine, it's not in any $HOME, but for the paths you mention above, "$HOME" could be swapped for "/store/Media" (again, only as I've set up this one machine). Wouldn't it make more sense for MyMedia to not block on launch if such data path(s) don't exist? It could make guesses, but then prompt the user for the path if not found…

FWIW, if I comment out those three lines, mymedia.py does run:
#  ensure("music_dir", default_music_path)
# ensure("video_dir", default_video_path)
# ensure("photo_dir", default_photo_path)


… then it spits out error with zeroconf:
$ python mymedia.py 
warning: this server has not completed rendezvous
http://0.0.0.0:8001/


… still, I can visit its webconf at "http://fs:8001/" (my server's name is "fs", and it does have Avahi running, and my router does know it by its advertised name: "fs.local")

So, I've successfully "registered" it on my Roku & seem to be able to use it.
0 Kudos
xwin
Visitor

Windows executable

Hi,
I finally cracked the py2exe puzzle and have a windows executable that appears to work. The complete working set of files is around 14MB and seems to be working just as good as the original sources. I have tried the pictures, and the video streaming as well as the registration pages.
This set is based on "mymedia beta" client and server with addition of MKV streaming support.
If anyone wants to try this please reply to this thread and I will post it somewhere. Please note that I use a limited subset of functionality so some things are untested. I think this should simplify Windows user setup experience to "unpack and run".

Thanks.
0 Kudos
tdurrant420
Visitor

Re: My Media - Your Music and Video on the Roku DVP

Hey i know we have a github group and a google group and this but i thought the following might be a usefull tool for developing

www.wunderkit.com

makes it easy to set up tasks and such that can be fixed and marked off. Not really on topic, but usefull none the less.

Also good job with the pyth2.exe I will try it on my array and see if it works
0 Kudos
xwin
Visitor

Re: My Media - Your Music and Video on the Roku DVP

Hi,
I have tested the windows executable for a few days and not found any problems so far. For anyone who is interested in trying it out please use the following link to download it: http://db.tt/D6alDlN4

Just unpack the zip file in to a directory and launch mymedia.exe file. After that it behaves like the python executed script. Please post any problems in this forum. If there are no problems I will submit all of the modifications that I had to make to get it to work. Please use MyMedia Beta channel as the server is based on this code.

Thanks.
0 Kudos
bpwwer
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
Here you go:
datamodel.brs
appMain.brs

I think that's all you need for the client. They go in the client/source directory, of course.

Now I can put off getting my github act together for a little longer. Smiley LOL

-JT


Hmm, I guessing these still haven't made it to github 🙂

I just got an XS a few days ago and after trying a number of different server/channels settled on My Media as the one that worked best for my needs. Now my needs are probably somewhat unique. I want to use the Roku with a whole house audio system (Russound) and have it controllable via the in-wall keypads. I pulled the version of the code from github and after hacking on it for a bit I have something that works. I don't know if this will work with the beta or if some of my changes are already there.

I added the ability to shuffle a playlist. When I start playing a playlist, I don't want it playing the songs in there in-order. Right now I hard-coded playlists to always shuffle, but figure this should be a configuration setting.

I added the ability to accept a feed as a launch parameter (right now it's a playlist feed only).

What these two changes allow me to do is:

1) Select the Roku as a source from the in-wall keypad
2) Send an ECP launch command with the feed URL to My Media
3) My Media starts and starts playing songs from the playlist (shuffled)

The changes I've made would need to be cleaned up and made more generic, but if they sound useful, I just need to get access to the latest version and I can do that.
-- Bob --
[url]http://www.bobsplace.com/ISYai/[/url]
0 Kudos
castalla
Visitor

Re: My Media - Your Music and Video on the Roku DVP - My Str

This is a great app - much better than ro-connect which charged for the app (and doesn't work)!

I notice there's a folder for My Streams.

Can somebody explain how this can be used?
0 Kudos
castalla
Visitor

Re: My Media - Your Music and Video on the Roku DVP

Okay - I see there's an option in the config to add mp3 streams.

If only the Roku could handle wma streams ....
0 Kudos
el_wubo
Visitor

Re: My Media - Your Music and Video on the Roku DVP

It might handle .wma. I'm not sure. Sounds like you're on the right track.

The streams feature is pretty fidgety. The hardest part is getting the real URL for the stream for whatever station you want to listen to. Typically that involves finding a link to an .m3u and opening that in a text editor and picking your favorite url out of what you see there.
0 Kudos