LinuxMCE Forums

General => Users => Topic started by: golgoj4 on June 05, 2010, 05:03:30 pm

Title: How do you feel about
Post by: golgoj4 on June 05, 2010, 05:03:30 pm
Changing the names of your files?

As i get a little better with c++, and a little more understanding of updateMedia, im considering extending updateMedia to work with theTVDB.com and imdb.com. The main issue i see however, is filenames. There would be a general format like for tv something along the lines of Show.season.episode.extension (ex SGU.S01.E19.avi) and movies like name.year.extenson (ex Top.Gun.1986.avi). I dont really know how people have their collections organized, how big the collections are on average or really anything else about people's libraries so please provide some feedback. Im more than likely going to try my damnedest to integrate this into updateMedia somehow, and i'd like to get an idea of how people store and categorize their libraries outside of the way i normally do it. For me, this would require a lot of file re-naming, but im up to it for metadata that will be automatically grabbed instead of needing to do it from the webadmin (although its a lot simpler now to do so).

thanks in advance
golgoj4.
Title: Re: How do you feel about
Post by: tschak909 on June 05, 2010, 06:16:47 pm
I have thought about this one a lot...

The issue is that nobody quite organizes files quite the same way, and coming up with ways to automatically sort the files will undoubtedly create huge piles of heuristics that may or may not work in most people's use cases,

To delve a little deeper:

Do we:

* Take folder names into account? If files are named similarly within a folder, are they indeed grouped together?,
* is it reliable to create a parser which breaks apart file names, and assigns weighted probabilities to them? (This is an episode #, this is a season #, this is the name of the episode, this is the movie?)
* What if some of these are missing?
* What if the different properties are named and numbered differently?

Every solution i've seen for this, has been some hacker's solution JUST FOR THEM and it doesn't work for other people.

so we have to sit back and seriously think of what the overall objective is:

TO ORGANIZE THESE PILES OF MEDIA FILES INTO MORE MEANINGFUL STACKS OF MEDIA.

I've come to my own conclusion that the way to solve this is to provide a better UI for naming and grouping things,

Perhaps start with a pile of unorganized stuff, and lasso and drag them together into groups, and the ability to create bins for TV shows, and Movies.. In the TV Show bin, provide ways of grouping them via direct manipulation into their respective seasons etc.

Keeping in mind as well, that each attribute has a place for its own picture. We can leverage this, to quickly assign pictures, etc.. to TV show art, then once the improved orbiter file view has been written, we can take advantage of it.

-Thom
Title: Re: How do you feel about
Post by: valent on June 05, 2010, 11:30:00 pm
XBMC team has solved this issue, and when you use their naming convention and XBMC as media center player everything "JustWorks"(tm)
All shows automatically appear in correct categories and also by season, all info from internet is available.

Check it out, maybe it helps: http://wiki.xbmc.org/index.php?title=TV_Shows#TV_Show_files_naming_conventions
Title: Re: How do you feel about
Post by: pw44 on June 06, 2010, 12:01:30 am
I did organize that way:

-- USA Series
        |
        ------> House MD
                        |
                        --------> Season 1
                                           |
                                           ---------- episode files for season 1
                        |
                        --------> Season 2
                                           |
                                           ----------- episode files for season 2
 
and so on...  It makes (at least for me) the browsing and search much easier....
Title: Re: How do you feel about
Post by: tschak909 on June 06, 2010, 12:14:37 am
Are you guys just not listening to me at all?

We eschew hierarchy. We will continue to do so.

We can suggest groupings based on how they are stored, but we can not expect everyone to store things this way!

-Thom
Title: Re: How do you feel about
Post by: pw44 on June 06, 2010, 12:20:13 am
Hi Thom,
I was talking about the physical directory structure.
But all are tagged as TV Shows (SD, HD), Movies (SD, HD), Music Videos, and so on, with the filenames normalized (Season # Episode # and  episode title).
Which kind of physical structure are you suggesting?
Title: Re: How do you feel about
Post by: tschak909 on June 06, 2010, 12:22:13 am
You didn't read my suggestion at all.

I am saying the entire UI needs to change, to allow things to be grouped by the user much easier. I will not repeat what i've already said.

-Thom
Title: Re: How do you feel about
Post by: pw44 on June 06, 2010, 12:23:31 am
Ok, the UI needs to change to make it easier, but does it have to do with the way the files are stored?
Title: Re: How do you feel about
Post by: tschak909 on June 06, 2010, 12:24:30 am
No, and that is exactly my point. File storage and their presentation SHOULD NEVER BE COUPLED.

-Thom
Title: Re: How do you feel about
Post by: pw44 on June 06, 2010, 12:25:55 am
Ok, no problem. I got it...
Title: Re: How do you feel about
Post by: skeptic on June 06, 2010, 04:17:05 am
It might be worth while to check out jamu (Just Another Metadata Utility) as well.  The method of plugging data into the lmce would need to change, but the code for collection of that data may be useful.  It's written in python if that makes a difference.
Title: Re: How do you feel about
Post by: tschak909 on June 06, 2010, 05:21:17 am
Has anyone investigated it?

-Thom
Title: Re: How do you feel about
Post by: golgoj4 on June 06, 2010, 07:26:40 am
XBMC team has solved this issue, and when you use their naming convention and XBMC as media center player everything "JustWorks"(tm)
All shows automatically appear in correct categories and also by season, all info from internet is available.

Check it out, maybe it helps: http://wiki.xbmc.org/index.php?title=TV_Shows#TV_Show_files_naming_conventions

dude...thats the point of the discussion. to go this route or come up with something more advanced if possible...if you mention xbmc one more time...
Title: Re: How do you feel about
Post by: golgoj4 on June 06, 2010, 07:30:20 am
quickly looking over jamu...it looks promising but I would need to investigate how updateMedia deals with changing names of files and whatnot. do we want to rename people's files?
Title: Re: How do you feel about
Post by: apagg on June 06, 2010, 01:15:23 pm
do we want to rename people's files?
I would say no, atleast not whitout user confirmation. People may have many reasons for nameing files the way hey do.

I peronaly like the way MediaMonkey can tag files from filename.
Title: Re: How do you feel about
Post by: skeptic on June 06, 2010, 06:35:30 pm
quickly looking over jamu...it looks promising but I would need to investigate how updateMedia deals with changing names of files and whatnot. do we want to rename people's files?

I'm not sure I follow.  You are talking about the name within metadata right, not actually changing the actual filename on disk, right?  I would think you would want to set the name the first time the id3 files is created, but probably not after that. 
Title: Re: How do you feel about
Post by: jthodges on June 10, 2010, 11:45:09 pm
I think the auto-tagging feature that I wrote a while back might fit into this discussion.  It's a framework that allows you to attach rules to a directory level.  A simple example would be tagging all media under your "movies" folder as a movie, and all that contained "720p" in the filename as 720P HD.  The matching rules support regular expressions, and custom rule types can be added by adding a class that implements the rule interface.  (I mention that because it is one way golgoj4's more sophisticated rules mentioned in the OP could be added, and only applied to a certain level of your hierarchy if desired - e.g., under 'tv shows')

There are a couple screenshots of the webadmin interface here: http://forum.linuxmce.org/index.php?topic=7116.msg50212#msg50212.  The patch is in trac, but was created against an early version of 0810 alpha, so it might require some tweaking to apply at this point.  I just thought I'd bring it up in case it applied to what you guys were thinking about here. 
Title: Re: How do you feel about
Post by: chrisbirkinshaw on June 11, 2010, 02:21:59 am
Maybe there is a way to have some kind of configuration string which allows the user to set their naming scheme?

Like:

<show>/<season>/<episodeNumber>.<episodeTitle>_<part>
Title: Re: How do you feel about
Post by: golgoj4 on June 11, 2010, 08:17:08 am
I think the auto-tagging feature that I wrote a while back might fit into this discussion.  It's a framework that allows you to attach rules to a directory level.  A simple example would be tagging all media under your "movies" folder as a movie, and all that contained "720p" in the filename as 720P HD.  The matching rules support regular expressions, and custom rule types can be added by adding a class that implements the rule interface.  (I mention that because it is one way golgoj4's more sophisticated rules mentioned in the OP could be added, and only applied to a certain level of your hierarchy if desired - e.g., under 'tv shows')

There are a couple screenshots of the webadmin interface here: http://forum.linuxmce.org/index.php?topic=7116.msg50212#msg50212.  The patch is in trac, but was created against an early version of 0810 alpha, so it might require some tweaking to apply at this point.  I just thought I'd bring it up in case it applied to what you guys were thinking about here. 

very cool!

i do remember reading about this and will have to take a look at it. Right now im kinda forced to do everything offline away from my core until the end of the month, but ill take the time to dl, investigate and post back some feedback or maybe even working code :) Tschak had a very good point in that because of the architecture of linuxMCE, we can always count on a neat file structure to help a user organize media. All I can come up with is some sort of drag and drop methodology so that people can add a base classification (tv shows, movies, etc) quickly and let the autotagger do the rest.

*not thread related*
Also, so like i apparently suck and have no been able to determine where the orbiter gets the array to decide the sort options. I have been reading the orbiter code and going through as many database entries as possible, but so far to no avail. So, if anyone has some time, feel free to take some time and look as well. Or if you already know  ;D Why am i so concerned? Well because i would like to add a 'program' sort option which would work like

Program
      -Datagrid of programs - Select one and you get:
      -Datagrid of seasons - select one and you get :
      -Datagrid of episodes in that season

Also have added a 'character' attribute in my own db. Why? because it annoys me that this data goes by and its not used. May not even be usefull to most. But maybe i want to easily choose which james bond i want to see. Or how much crossover there was between 'homicide: life on the streets' and 'law and order'.

Granted this is all stuff that im looking to do, so im not looking for anyone to code, but tips on where to dig are always appreciated as well as genuine efforts to collaborate on this stuff.

Let me know what ya think!
-golgoj4
Title: Re: How do you feel about
Post by: jimbodude on June 11, 2010, 05:07:52 pm
Also, so like i apparently suck and have no been able to determine where the orbiter gets the array to decide the sort options. I have been reading the orbiter code and going through as many database entries as possible, but so far to no avail. So, if anyone has some time, feel free to take some time and look as well. Or if you already know  ;D Why am i so concerned? Well because i would like to add a 'program' sort option which would work like

Program
      -Datagrid of programs - Select one and you get:
      -Datagrid of seasons - select one and you get :
      -Datagrid of episodes in that season

Have you tried looking at the commands that go through DCERouter when you change sorting?  That might point you in the right direction.

Also have added a 'character' attribute in my own db. Why? because it annoys me that this data goes by and its not used. May not even be usefull to most. But maybe i want to easily choose which james bond i want to see. Or how much crossover there was between 'homicide: life on the streets' and 'law and order'.

This is a neat idea.  You should consider expanding it and talk to the devs about integrating it so that everyone can use it.
Title: Re: How do you feel about
Post by: golgoj4 on June 11, 2010, 05:42:05 pm
Also, so like i apparently suck and have no been able to determine where the orbiter gets the array to decide the sort options. I have been reading the orbiter code and going through as many database entries as possible, but so far to no avail. So, if anyone has some time, feel free to take some time and look as well. Or if you already know  ;D Why am i so concerned? Well because i would like to add a 'program' sort option which would work like

Program
      -Datagrid of programs - Select one and you get:
      -Datagrid of seasons - select one and you get :
      -Datagrid of episodes in that season

Have you tried looking at the commands that go through DCERouter when you change sorting?  That might point you in the right direction.

Also have added a 'character' attribute in my own db. Why? because it annoys me that this data goes by and its not used. May not even be usefull to most. But maybe i want to easily choose which james bond i want to see. Or how much crossover there was between 'homicide: life on the streets' and 'law and order'.

This is a neat idea.  You should consider expanding it and talk to the devs about integrating it so that everyone can use it.

What ive learned so far about the whole datagrid thing:
In HADesigner, it only references the text as 'sortArray' or something like that. So i scoured the db as well as the actual orbiter code, but I have yet to find the array. Currently, I can send a properly formatted message to request the datagrid for programs (from webadmin) and by tailing the log, i can see its being prepared. However when I use the command to attempt to get it on screen (i want to say 'request datagrid contents'), it crashes my orbiter. So im basically on the hunt for the bit of code that sets this array as well the some logic for handling the screens as they are clicked through.

As far as the character bit, i've mentioned it to the dev's but I dont really want to push for it to be added until I come up with something useful. Just sort of experimenting right now.

Oh and as for the configuration strings: Anyone have any ideas on a sexy way to do this on-screen? Or do you think that on-screen management of that level is bad? Im imagining icons people click to set the order or something like that to make it seem as non-techie as possible.

-golgoj4
Title: Re: How do you feel about
Post by: tschak909 on June 11, 2010, 05:44:30 pm
you might want to look at Media_Plugin_Grids.* in src/Media_PlugIn
and ScreenHandler.cpp in src/Orbiter

-Thom
Title: Re: How do you feel about
Post by: golgoj4 on June 14, 2010, 09:14:04 am
you might want to look at Media_Plugin_Grids.* in src/Media_PlugIn
and ScreenHandler.cpp in src/Orbiter

-Thom

indeed! Found what im looking for it seems. now time to make a backup of my system for when i almost certainly crash it :) Its nice to go from not being able to read anything inside /src to being able to read half. hehe.

-golgoj4
Title: Re: How do you feel about
Post by: Marie.O on June 14, 2010, 09:20:35 am
Its nice to go from not being able to read anything inside /src to being able to read half. hehe.

Reading has never been my problem. After a few years, I am finally able to understand 1/10th of it ;)