Open Media Library Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

OML - The open source media library

Author Topic: What TitleTypes to use for a parent title (just a box/container) ?  (Read 716 times)

yodine

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Now i try to manage boxes in boxes, i wonder if the TitleTypes should be different for a title and the titles it contains.

Another question about TitleTypes : when you buy a TV show on DVD (several DVD with on each several episodes), what TitleTypes do you give, compare to a movie on DVD ?

All this to make my importer set correct data for OML to work even better  ;)
Logged

mikem2te

  • OML Developer
  • ******
  • Posts: 622
    • View Profile
Re: What TitleTypes to use for a parent title (just a box/container) ?
« Reply #1 on: June 12, 2009, 08:25:15 AM »
Yodine, there is no enforced logic to the titletype field but as it stands the convention is-

Collection, TVShow, Season : These are folders/boxes and will not contain disks.

Unknown, Movie, Episode : These are the actual movies/episodes. These will contain disks.


'Collection' : For a container/folder/box containing many 'Movie' titles

TVShow : For a TV show eg 'Red Dwarf', 'Dexter' or 'Friends'. This will either contain 'Episode' titles or one or more 'Season' titles

'Season' : Eg Series/Season 1. This will contain 'Episode' titles.


Code: [Select]
    public enum TitleTypes : int
    {
        Root = 0x0001,

        // Folders / containers
        Collection = 0x0002,
        TVShow = 0x0004,
        Season = 0x0008,
        AllFolders = 0x00FE,

        // Media
        Unknown = 0x0100,
        Movie = 0x0200,
        Episode = 0x0400,
        AllMedia = 0xFF00,

        Everything = 0xFFFF
    }


Special case is the Root bit. This should be set for root level titles. So if we have the following in dbeditor

'All Media'
   |-- Friends (TVShow | Root)
   |  |-- Season 1 (Season)
   |     |-- Episode 1 (Episode)
   |-- Star Wars (Collection | Root)
     |-- Phantom Menace (Movie)
Logged

Cisco here we come!!

yodine

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: What TitleTypes to use for a parent title (just a box/container) ?
« Reply #2 on: June 12, 2009, 10:12:03 AM »
Thanks, but i am a little confused  :-[

With reading the first part of your answer, i understand i sould use it like this :
  • All the boxes get the 'Collection' type
  • All the titles, either inside a box or alone get the 'Movie' type

(my movies just handles 'DVD' titles and not TV shows with episodes)

(actualy i put 'Everything' type for the box to recognize them, as in my head it could conatin anything, i'll change that)

But i get confused with the 'root'. Because with what i understand, all the boxes and the alone titles will get 'root' type, while only the titles inside a box will get 'Movie' type.
This means we won't be able to distinguish a box from a title alone by looking at its type  (unless you 'bit or' it with 'collection' type). I am mistaking something ?

Also, for me the 'root' is unneeded, because a root is just a title without a parent, so you can deduce this value automaticaly, no ?
Logged

mikem2te

  • OML Developer
  • ******
  • Posts: 622
    • View Profile
Re: What TitleTypes to use for a parent title (just a box/container) ?
« Reply #3 on: June 13, 2009, 06:47:33 PM »
Thanks, but i am a little confused  :-[

With reading the first part of your answer, i understand i sould use it like this :
  • All the boxes get the 'Collection' type
  • All the titles, either inside a box or alone get the 'Movie' type

(my movies just handles 'DVD' titles and not TV shows with episodes)

(actualy i put 'Everything' type for the box to recognize them, as in my head it could conatin anything, i'll change that)

But i get confused with the 'root'. Because with what i understand, all the boxes and the alone titles will get 'root' type, while only the titles inside a box will get 'Movie' type.
This means we won't be able to distinguish a box from a title alone by looking at its type  (unless you 'bit or' it with 'collection' type). I am mistaking something ?

Also, for me the 'root' is unneeded, because a root is just a title without a parent, so you can deduce this value automaticaly, no ?

The field is designed to be a bit or'd field so yes, a title can be both a 'Movie' and a 'root' item (or a 'Collection' and a 'root' item for that matter).

'AllFolders', 'AllMedia' & 'Everything' should not be put in the titletype field. These are used when querying the table dataset, for example to get all folder items use GetAllTitles(TitleTypes.AllFolders) etc.

I understand about what you are saying about a root title has no parent title id. Yes there are two methods of finding a root title and it may turn out only one is required but I want to leave both in and valid for the moment.
Logged

Cisco here we come!!

yodine

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: What TitleTypes to use for a parent title (just a box/container) ?
« Reply #4 on: June 14, 2009, 01:23:56 PM »
Thanks for the answer

I'll change my code to use only 'Collection', 'Movie' with 'Root' when needed
Logged