Normal
Inker many thanks for your info. You are absolutely right. I completely oversaw this issue.I was thinking what else is the most elegant solution and came up with the next solution.\Databases\Video\SqlLite\VideoDatabaseSqlLite.csLine 169:Just adding next piece of code on the same spot:strSQL = String.Format("update files set idpath={0} where strFileName='{1}'", lPathId, strFileName);results = m_db.Execute(strSQL);just before the already existing codestrSQL = String.Format("select * from files where idpath={0}", lPathId);results = m_db.Execute(strSQL);This fix the problem and has an extra positive side-effect (assuming that filename will always be unique for each video-file, which in my opinion is a valid assumption). This way the database will always be up to date, even when moving files to another directory. There is only one minor issue. The change will not be visible in case the new directory is not already part of the 'titles' table. However nothing to worry about, because with the very first update of the new directory to this table, the problem is again automatically solved.What do you think of this simple but elegant solution Inker?PS: Probaly it's even better to put the updating between a transaction.
Inker many thanks for your info. You are absolutely right. I completely oversaw this issue.
I was thinking what else is the most elegant solution and came up with the next solution.
\Databases\Video\SqlLite\VideoDatabaseSqlLite.cs
Line 169:
Just adding next piece of code on the same spot:
strSQL = String.Format("update files set idpath={0} where strFileName='{1}'", lPathId, strFileName);
results = m_db.Execute(strSQL);
just before the already existing code
strSQL = String.Format("select * from files where idpath={0}", lPathId);
This fix the problem and has an extra positive side-effect (assuming that filename will always be unique for each video-file, which in my opinion is a valid assumption). This way the database will always be up to date, even when moving files to another directory. There is only one minor issue. The change will not be visible in case the new directory is not already part of the 'titles' table. However nothing to worry about, because with the very first update of the new directory to this table, the problem is again automatically solved.
What do you think of this simple but elegant solution Inker?
PS: Probaly it's even better to put the updating between a transaction.