ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/DecentralizedMedia/MediaFile.cpp
(Generate patch)

Comparing DecentralizedMedia/MediaFile.cpp (file contents):
Revision 500 by douglas, 2005-06-17T23:23:46-07:00 vs.
Revision 516 by douglas, 2005-06-20T20:34:13-07:00

# Line 4 | Line 4
4   //
5   // $Id$
6  
7 < #include "MediaFile.hpp"
7 > #include <menes/standard.hh>
8  
9   #include <menes-dbi/resultset.hpp>
10  
11 + #include "MediaFile.hpp"
12 +
13   MediaFile::MediaFile(_H<dbi::Connection>& connection, const api::Path& path) : connection(connection), path(path)
14   {
15          _H<dbi::ResultSet> info(connection->Parse(_B("SELECT artist, title, album, genre FROM files WHERE path = ?"))->Execute(path.GetPath()));
# Line 29 | Line 31 | MediaFile::MediaFile(_H<dbi::Connection>
31  
32          if (path_->MoveNext())
33          {
34 +                connection->Parse(_B("UPDATE files SET live = TRUE WHERE path = ?"))->Execute(path.GetPath());
35 +
36                  if (!artist.IsEmpty())
37                          connection->Parse(_B("UPDATE files SET artist = ? WHERE path = ?"))->Execute(artist, path.GetPath());
38  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines