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: 
renojim
Community Streaming Expert

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

Hmm... that's strange. I thought it used the first image it finds, which would usually make 0.jpg the one that would be used. That's always worked for me. Let me look into it. It would probably be better if it used something more definitive, like folder.jpg or something with the same name as the folder/directory. I'm thinking folder.jpg would be the easiest to implement.

Just out of curiosity, what OS are you using?

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
fubaya
Visitor

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

This is on a Pogoplug running Debian Squeeze.

I like the folder.jpg idea. What's odd is that only the Movies folder does that. I have a "Series" folder for TV series and it's never changed, but inside that are folders and one image for the directory. In the Movies folder are both movies and images, about 90 of each. Another odd things is that, at the moment, it is showing the second movie alphabetically, but it was showing a movie in the Ts.
0 Kudos
renojim
Community Streaming Expert

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

I'm running on a Dockstar (Pogoplug clone), but I'm running Plugbox Linux. I'm probably more surprised that using 0.jpg has always worked for me than that it doesn't work for you.

I'll put this in the next update, but for now you can edit mymedia.py in the server directory (using your favorite text editor). Find the getart routine. It starts with:
def getart(path):

Go down towards the end of the routine and you'll see:
  for base, dirs, files in os.walk(path):
# don't recurse when searching for artwork
del dirs[:]

Add these lines after the blank line after those lines:
    # look for a 'folder' image
for file in files:
fp = os.path.join(base,file)
fn = os.path.splitext(file)[0].lower()
ext = os.path.splitext(file)[1].lower()
if ext and img_re.match(ext) and (fn == "folder"):
return fp

# no 'folder' image, look for any image

You should be able to copy and paste, but make sure the indentation matches the similar for file in files: block that will be right under the lines you add. Make sure you restart the server after you make the change.

I've only given it minimal testing, but it should work. Just add a file named folder.jpg, folder.jpeg, or folder.png (JPEGs are recommended unless you use 300x300 PNGs so they are the correct size) to your folder and it should be picked up. Let me know how it goes.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
fubaya
Visitor

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

That worked as soon as I added a folder.jpg and restarted it. Thanks.
0 Kudos
cptdondo
Visitor

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

I installed MyMedia on an access point running OpenWRT. It works just fine, except that it apparently crashes when trying to read my music collection.

The collection is about 6,000 mp3 files. MyMedia starts to index this, and after about 60 seconds, says it's lost contact with the server. The system has 64 MB of RAM and 1GB of swap.

Any way to diagnose this better? Or tell MyMedia to index in smaller chunks?

Here's the logs:

Nov 13 14:51:02 rtmovies user.info sysinit: Traceback (most recent call last):
Nov 13 14:51:02 rtmovies user.info sysinit: File "/www/mymedia/server/web/application.py", line 242, in process
Nov 13 14:51:02 rtmovies user.info sysinit: return self.handle()
Nov 13 14:51:02 rtmovies user.info sysinit: File "/www/mymedia/server/web/application.py", line 233, in handle
Nov 13 14:51:02 rtmovies user.info sysinit: return self._delegate(fn, self.fvars, args)
Nov 13 14:51:02 rtmovies user.info sysinit: File "/www/mymedia/server/web/application.py", line 412, in _delegate
Nov 13 14:51:02 rtmovies user.info sysinit: return handle_class(cls)
Nov 13 14:51:02 rtmovies user.info sysinit: File "/www/mymedia/server/web/application.py", line 387, in handle_class
Nov 13 14:51:02 rtmovies user.info sysinit: return tocall(*args)
Nov 13 14:51:02 rtmovies user.info sysinit: File "/www/mymedia/server/mymedia.py", line 898, in GET
Nov 13 14:51:02 rtmovies user.info sysinit: return getdoc(feed.key, path, base_dir, range, config, collapse_collections).to_xml()
Nov 13 14:51:19 rtmovies user.info sysinit: 192.168.129.160:57275 - - [13/Nov/2011 14:51:19] "HTTP/1.1 GET /feed" - 500 Internal Server Error

The 192.168.129.160 IP is the roku itself.
0 Kudos
cptdondo
Visitor

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

Is it possible to run MyMedia without being connected to the internet? I have a mobile platform, and my internet connection is not always available. I need to be able to start and run the app without being connected to the internet.
0 Kudos
mikebdoss
Roku Guru

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

"cptdondo" wrote:
Is it possible to run MyMedia without being connected to the internet? I have a mobile platform, and my internet connection is not always available. I need to be able to start and run the app without being connected to the internet.


MyMedia works fine without an internet connection, as long as your local network is up and running.
0 Kudos
renojim
Community Streaming Expert

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

"cptdondo" wrote:
I installed MyMedia on an access point running OpenWRT. It works just fine, except that it apparently crashes when trying to read my music collection.

Do you have 6,000 MP3s in one directory/folder? If so, that's not going to work. It's probably possible to rewrite the server code that reads a directory to split up a directory's content the way it does with folders (A-G, H-L, etc.), but I'm not sure it's worth the effort. I'd really suggest you organize your music by Artist and Album with a directory per artist and subdirectories for albums. I'll take a look at the code, but no guarantees.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
cptdondo
Visitor

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

"renojim" wrote:
"cptdondo" wrote:
I installed MyMedia on an access point running OpenWRT. It works just fine, except that it apparently crashes when trying to read my music collection.

Do you have 6,000 MP3s in one directory/folder? If so, that's not going to work. It's probably possible to rewrite the server code that reads a directory to split up a directory's content the way it does with folders (A-G, H-L, etc.), but I'm not sure it's worth the effort. I'd really suggest you organize your music by Artist and Album with a directory per artist and subdirectories for albums. I'll take a look at the code, but no guarantees.

-JT


Nope, they're by Artist/Album/Track. 475 artists. It would not be a big thing to split that up into A-D, E-H, etc if that would help.
0 Kudos
renojim
Community Streaming Expert

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

Hmm... now I'm a little confused. You shouldn't have to do any more organizing than you already have. There's a parameter in config.ini (in the server directory), max_folders_before_split, that controls the grouping of Artist (or top level) folders by initial letter. I believe 10 is the default value. I only have 68 artist folders, so maybe 475 top level folders is the problem, although I'm not sure why it would be. I'll look into it, but how about trying to play with the max_folders_before_split value and see if it makes a difference? Try making it 20. I think if you change anything in config.ini you have to restart the server.

Edit: I just created 520 top level directories and it wasn't a problem with the default max_folders_before_split, so the number of top level folders looks like a red herring. I'm kind of at a loss now. There have been problems with special/foreign characters in the past, but I thought all of those problems had been taken care of. You might want to try creating a new Music directory and copy a few of your Artist directories into it to see if that works. Unfortunately, the error is occurring in one of the packages that wasn't written by anyone here, so at a glance I couldn't figure out what the problem could be (I'm no Python expert). Another possibility, although remote, is that you're not using Python v2.6.

It shouldn't matter, but on what OS is your server running?

Thanks,
-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.