2010-09-28, 20:12
I'm working on implementing support for DVD stub files (files with zero size and .dvd extension) to allow DVD cataloging, etc.. Got a question about something related to this ...
I'm trying to check if the file in question is such a dvd stub file while in the CThumbExtractor:: DoWork class (since if this is a stub file, there's obviously no thumb to extract, plus this is also where functions get called to set the stream details like the codec, etc.). The first problem I'm having is that the path that's part of the m_item variable (type CFileItem) points to a database path (for example: "videodb://1/2/1").
What would be the best way to handle this? Personally I would assume the correct method would be to get the actual file name based on that videodb path and then check if the filename has the .dvd extension. If that is the correct approach, can any dev help out and give me pointers on how to do that? EDIT: figured out how to get the actual filename, but still would like to know if this is the correct approach.
Or should such a situation be handled differently? Should I maybe be expanding the CFileItem class to handle dvd stub files and have some sort of bool flag to signal if it's a stub file. If that's the case then during which part of the whole process of scanning a file into the videodb should this flag be set?
Any help that any devs can offer is much appreciated.
Thanks,
Harry
I'm trying to check if the file in question is such a dvd stub file while in the CThumbExtractor:: DoWork class (since if this is a stub file, there's obviously no thumb to extract, plus this is also where functions get called to set the stream details like the codec, etc.). The first problem I'm having is that the path that's part of the m_item variable (type CFileItem) points to a database path (for example: "videodb://1/2/1").
What would be the best way to handle this? Personally I would assume the correct method would be to get the actual file name based on that videodb path and then check if the filename has the .dvd extension. If that is the correct approach, can any dev help out and give me pointers on how to do that? EDIT: figured out how to get the actual filename, but still would like to know if this is the correct approach.
Or should such a situation be handled differently? Should I maybe be expanding the CFileItem class to handle dvd stub files and have some sort of bool flag to signal if it's a stub file. If that's the case then during which part of the whole process of scanning a file into the videodb should this flag be set?
Any help that any devs can offer is much appreciated.
Thanks,
Harry