LinuxMCE Forums

General => Users => Topic started by: jmcrtp on May 16, 2008, 09:28:58 am

Title: Another media browsing thread..
Post by: jmcrtp on May 16, 2008, 09:28:58 am
Before you ask, I have searched and read most if not all of the threads.  First of all, this is not an issue for a small few, it is something that needs to be addressed.  I am fine with using the filename suggestion that has come up numerous times although that does not work.  I have a few files in my /home/user_1/data/videos root dir, then I have made a subdirectory structure 2-deep to test this out.  There is one file in the root (videos) dir, and the rest are in subdir Myd (or subdirs of that).  When I browse I see the public media, then I enter my pin and see all the media if sorting by title.  If I sort by filename then I only see the file in the root dir of my private files.  I though I would see the directory names as well so I can navigate through the file structure?  What good is it if it is root dir or everything?  I saw a thread where someone mentioned to stop complaining and use filename, and if it isn't working its broken, fix it.  Well, it sounds like mine is broken and I would love to know how to fix it.  I have not found any info on here.  I am pretty proficient with unix/linux but new to MCE.

Second question - if I am logged in (I'm listed under user) should I be able to see my private media without entering the pin?  This is my desired behavior to not have to have everyone have access, but I was wondering if this is the way it is supposed to work.  The documentation page example about john and susan's music seems to indicate otherwise.

Title: Re: Another media browsing thread..
Post by: royw on May 16, 2008, 10:01:01 am
Howdy,

All of my data is under public and on other drives (2nd internal + 2 NFS shares).  I just checked my 0710RC1 system and using Video, by filename, I can navigate into sub directories 3 deep (I checked NFS Share 41/Action/Bond and only 007 films were visible).  Sorry, I don't have any user media.  You might want to check if you have different behavior between user and public media browsing.

HTH,
Roy
Title: Re: Another media browsing thread..
Post by: jmcrtp on May 16, 2008, 08:15:55 pm
Thanks Roy, great idea to check that.  File browsing works fine within the public folder.  I am not able to under my user_1 folder.  I tried changing permissions to 777 just to see if that was an issue and it still would not let me see any directories once I sort by filename.  It goes back to only seeing the files in the root dir and no subdirs.  Is this method of browsing into subdirectories supported in user directories? 
Title: Re: Another media browsing thread..
Post by: royw on May 16, 2008, 09:48:18 pm
You might want to check the ownership too.  For example:
Code: [Select]
dcerouter_72579:/home/user_1# ls -la
total 24
drwxrws---  4 pluto_roy pluto_roy 4096 2008-05-03 18:39 .
drwxr-xr-x 25 root      root      4096 2008-05-10 23:36 ..
-rwxrws---  1 pluto_roy pluto_roy 4465 2008-04-29 20:28 bookmarks.html
drwxrws---  3 pluto_roy pluto_roy 4096 2008-05-03 18:39 .config
drwxrws---  6 pluto_roy pluto_roy 4096 2008-05-03 18:35 data

To change ownership:
Code: [Select]
dcerouter_72579:/home/user_1# sudo chown -R pluto_roy.pluto_roy *

Naturally use the owner and group found on your system instead of "pluto_roy".  It should be "pluto_YOURNAMEINLOWERCASE".   :)

HTH,
Roy
Title: Re: Another media browsing thread..
Post by: jmcrtp on May 16, 2008, 11:42:02 pm
Thanks Roy.  I do have the ownership correct (pluto_jon) for both user and group of the subdirectories, and all files.  I still cannot browse into these folders or even see a folder name once I select sort by filename.  Again this works fine for public, just not for my private/user data.

I have tried a few workarounds but can't get them to work correctly either:

1) I put a folder in public/data/videos and changed permissions/ownership to 750, pluto_jon for user/group.  It was still accessible to public user. 

2) I put a symlink in public/data/videos to user_1/data/videos, a folder there, etc.  This did not work to be able to browse those folders.

Is it just not possible to browse the folders in the user files, only public?  Is there any other hack or workaround anyone can think of? 

Thanks for all the feedback so far.
Title: Re: Another media browsing thread..
Post by: colinjones on May 17, 2008, 01:40:40 am
Jon - I think I have the same problem (without even a pin assigned), but I haven't investigated it much yet, I'm waiting until I have upgraded to RC2/release.... then I'll post back and let you know if it fixed it,...
Title: Re: Another media browsing thread..
Post by: jmcrtp on May 17, 2008, 02:09:43 am
Good luck.  FYI I'm running 0710 RC2.  I don't know why it works fine to browse under public folders but does not work under private.  Can anyone with more knowledge on how this is all setup chime in?  I'm new to MCE as of a few days ago.
Title: Re: Another media browsing thread..
Post by: nosilla99 on May 17, 2008, 11:24:56 am
The required behaviour used to work in the early days of pluto when browsing by filename was the only option.  When they added browsing by title this broke browsing private user directory structures but some files in the root of each users private directory were visible to all users.

There were bug reports on pluto mantis regarding this but they were never resolved so I guess what should be an easy fix is obvioulsy a little more complicated than it sounds.

I will have a look through the orbiter code this week to see if I can solve this issue.

NOS

Title: Re: Another media browsing thread..
Post by: rdmustang on May 19, 2008, 01:39:35 am
When browsing by filename (my preference), I can go into subdirectories when browsing video but not for audio or pictures (all media is public).   Does this happen to anyone else?
Title: Re: Another media browsing thread..
Post by: colinjones on May 19, 2008, 08:13:30 am
When browsing by filename (my preference), I can go into subdirectories when browsing video but not for audio or pictures (all media is public).   Does this happen to anyone else?

No that's not normal. Can you even see the share name in the media grid, same as for video?
Title: Re: Another media browsing thread..
Post by: rdmustang on May 19, 2008, 05:36:40 pm
No that's not normal. Can you even see the share name in the media grid, same as for video?

In video everything works like I want.  I see the share and when I go into the share I see all the subdirectories and can navigate properly.

In audio and pictures I see the share name but when I go into it I only see the relevant files in the share itself (don't see any subdirectories but it's the subdirectories that contain 99% of the media I want to have available).

Is this how it's supposed to work?
Title: Re: Another media browsing thread..
Post by: colinjones on May 20, 2008, 12:27:10 am
That's strange! OK, everything you see in the media grid is a representation of what is in the database (ie, it doesn't directly reflect the actual folder/file structure), so it will only show folders and files if UpdateMedia has scanned them into the database. I don't know why it wouldn't have scanned them, but you can check this in the Admin web site, login then go to the Files & Media menu->Media Files Sync.

Use the left hand navigation tree and move down public->data->audio->share name->  folders that are in the database should be underlined links, and in the main right pane each object (files and folders) that are in the database should have a big tick icon. Objects that are not, will have a drive icon. Check that first - I suppose its possible that the UpdateMedia script is failing when it hits an object that causes it a problem, before it gets to the folders. Or perhaps it has failed altogether and so is no longer attempting to scan at all. When you are in a folder that has the drive icons indicating that it hasn't scanned them into the database, you can then hit the Resynchronise button at the top. This will open a log window and you can read exactly what UpdateMedia is doing when it attempts to sync them into the database. Permissions issues perhaps?
Title: Re: Another media browsing thread..
Post by: rdmustang on May 20, 2008, 12:49:33 am
I have to appologize.  My newb'ness is showing.  I set up the shares and waited 3 hours and my video files synch'd but audio and pictures didn't.  I check again today and now audio and pictures have synched.

Thanks for the suggestion colinjones!
Title: Re: Another media browsing thread..
Post by: colinjones on May 20, 2008, 12:59:35 am
Oh, didn't realise you had only just set it up. Yes, UpdateMedia when running in the background will take a long time to sync in. In fact if you use the manual button I outlined above, you will see it takes a while even in the foreground because of all the work it is doing trying to identify attributes, etc. So it was probably working on one of your subdirectories at the time...
Title: Re: Another media browsing thread..
Post by: nite_man on August 04, 2008, 05:34:51 pm
When browsing by filename (my preference), I can go into subdirectories when browsing video but not for audio or pictures (all media is public).   Does this happen to anyone else?

Could you tell me, please,  how to specify default sorting option for video files, please?
Title: Re: Another media browsing thread..
Post by: los93sol on August 04, 2008, 07:24:19 pm
This is more of a question/feature request I guess than anything.  What currently handles media?  Is it MythTV or is it some LMCE code that is handling it?  If it is LMCE code doing the work...or even MythTV for that matter, has the idea of using XBMC to handle media been tossed around?  It would seem like a very logical choice given how good their playback quality, support, skinnability, and reliability is.  Also, while on the topic of another application, has anyone worked directly with the dev teams of asterisk, mythtv, ha, etc. to see about creating a common trunk and bringing devs from all respective teams together?
Title: Re: Another media browsing thread..
Post by: colinjones on August 05, 2008, 06:33:26 am
Don't really understand your question, what do you mean by "handle" the media? Do you mean display/play it?

Don't know what Myth uses for live TV, but VDR and all other media (except HDDVD and BD which use MPlayer) in LMCE uses xine libraries wrapped up into a LMCE device that can send and receive DCERouter messages/events to/from any other DCE device. It needs to be a a DCE device to participate in LMCE properly. So it isn't as simple as substituting one player for another.... but there is nothing stopping someone writing a DCE device wrapper (and template) to convert another player into an option.
Title: Re: Another media browsing thread..
Post by: tschak909 on August 05, 2008, 03:25:28 pm
Basically, Media Players need to be able to understand DCE commands....

This is accomplished either by:

(1) wrapping a DCE layer around an existing media library, as in the case of libXine and the Xine_Player, or
(2) creating a thin DCE wrapper that sends commands to a running media player, as in the case of MythTV_Player and MPlayer_Player.

The second option is typically done with a patched version of the software that exposes some sort of network control socket that commands can be sent to, failing that, you can use my WindowUtils library which sends raw X events (using XSendEvent), to a matching window once it's been found (again, also in the lib, you just need a partial window name match.) This is how my MAME_Player works.

The Media Plugin, has a handler, which when it recieves a MH Play Media command, finds an appropriate router Plugin on the core. The router plugin on the core is responsible for creating 'streams', which are really just handles to what's actually playing throughout the house. Once the 'stream' has been created, the media handler keeps track of it... and then it asks the Plugin to find the appropriate Player for an entertainment area. Typically, this has to be handled by the plugin itself, but the end result is, once the appropriate players are found, a Start_Media command is sent to them, with the appropriate information required by the media player (typically a filename or a URL required by the media player, and a time stamp). In addition, each media player has associated device data containing a window class and name tuple. This is the same nomenclature used when identifying windows to X.

There is an interesting catch to this. Currently, Media Plugins are registered for a given media type, and if you need to redirect to another media player for a given media type, this currently has to be hacked into the Plugin itself (look for bRedirectToMPlayer in the Xine_Plugin source), and basically you have to change the plugin's internal states for the window to latch onto, and changing the destination device to be the new player.

So, that's..basically in a nutshell, how media playing works under LMCE. :)

-Thom
Title: Re: Another media browsing thread..
Post by: los93sol on August 06, 2008, 04:41:17 pm
I spoke with JMarshall (xbmc skinning engine developer) and he'd be willing to at the very least consult with some of the developers from LMCE to see about how to implement and use XBMC's skinning engine and possibly other parts of XBMC in LMCE.  I've seen the HADesigner screencasts and they are nice, and I will agree that the current system is powerful, but the learning curve is incredibly steep.  I'm a major advocate of the XBMC skinning engine because it is capable of "flash-like effects", yet simple, easy to use, well documented, no special environment required, already built to handle multiple displays, etc.  It really is pretty much a perfect fit, would any developer for LMCE at the very least be interested in speaking to JM and discussing possible implemenetations, issues, etc.
Title: Re: Another media browsing thread..
Post by: tschak909 on August 06, 2008, 04:44:35 pm
There is a reason for the complexity...

While YOU might not have all the devices we support? some of us do, and have customers who do.

XBMC's skinning system, while simpler to implement,  can't handle dealing with all these disparate devices.

This is an open source project, so anyone can do the work if they wish, but I do not see the merit in working on this angle.

-Thom
Title: Re: Another media browsing thread..
Post by: los93sol on August 06, 2008, 05:16:27 pm
That doesn't make sense, I'm not an expert on the intricate workings of XBMC's skinning engine or the skinning system used in LMCE, but I've used XBMC's for huge projects so have a good idea what happens behind the scenes.  Their is an event handler that passes things to the skinning engine as a common event.  That means basically when x happens do this, their are several ways to expose conditionals to the skinning engine as well.  So my understanding is that since the engine probably doesn't understand the DCE commands out of the box, an event handler should take care of the interaction there.  I really don't understand why you are so keen to the HADesigner, the guy who wrote it even said it was a hack never intended to be used more than a few months and that the original issues with it have remained untouched and have not been corrected.  That said, obviously the current solution is broken so shouldn't people start looking for and seeking out alternative solutions?
Title: Re: Another media browsing thread..
Post by: tschak909 on August 06, 2008, 05:20:05 pm
I'm not keen on HADesigner. I'm keen on making sure that the concept of inherited UI development is kept. This is critical to making sure that we can develop a button once, and be able to deploy it across multiple devices, and keep the necessary semantics for each device, while taking into account a second dimension of skin compatibility.

The HADesigner tool is very buggy, but the CONCEPTS it espouses are precisely what this system needs, which is not what other UI layout systems I have used try to do. One Size Fits All _WILL NOT WORK HERE._

Again, the system goes beyond the TV.

-Thom
Title: Re: Another media browsing thread..
Post by: los93sol on August 06, 2008, 05:39:20 pm
XBMC's skinning engine is capable of doing just that.  It was not designed to work that way, but could be adapted without a major re-write.  They handle multiple resolutions through an inheritance system in a tree folder structure like:

4x3
|---all skin xml files here
16x9
|---modified xml files that don't display properly on 4x3 here
720p
|---modified xml files for 720p here

I realize exactly what you are saying about multiple devices like creating the skin once and re-using it for your devices like webpads, orbiters, and whatnot and this system was designed for TV.  However, the inheritance concept is in fact employed here, you have your base skin files in your 4x3 folder, and those will be scaled by the skinning engine appropriately for the other resolutions.  Some things will not scale properly so for those times you can load only those specific xml files that are special case, the rest of the skin will load from the 4x3 folder.  This concept could probably be expanded without a major rewrite by adding a conditional to detect the device type and resolution then load the inheritance files for that device.

JM is very good at special application techniques and has done an excellent job streamlining things so that you don't have to do redundant work to make a nice UI.  I honestly think it would be worthwhile for someone who really understands the intricate working of LMCE's engine to talk to him and see what ideas he has to help LMCE.
Title: Re: Another media browsing thread..
Post by: tschak909 on August 06, 2008, 05:41:08 pm
Okay. If he wishes to talk, he can talk either on the forums, or on the chat channel. I am available on both.

-Thom