--- DecentralizedMedia/MediaFile.cpp 2005/07/02 06:56:04 540 +++ DecentralizedMedia/MediaFile.cpp 2005/07/05 04:28:02 549 @@ -6,13 +6,13 @@ #include -#include +#include #include "MediaFile.hpp" -MediaFile::MediaFile(_P& connection, const api::Path& path) : connection(connection), path(path) +MediaFile::MediaFile(const _R& connection, const api::Path& path) : connection(connection), path(path) { - _P info(connection->Parse(_B("SELECT artist, title, album, genre FROM files WHERE path = ?"))->Execute(path.GetPath())); + _R info(connection->Parse(_B("SELECT artist, title, album, genre FROM files WHERE path = ?"))->Execute(path.GetPath())); if (info->MoveNext()) { @@ -21,13 +21,11 @@ MediaFile::MediaFile(_P album = info->GetString(_B("album")); genre = info->GetString(_B("genre")); } - else - throw; } -MediaFile::MediaFile(_P& connection, const api::Path& path, const cse::String& artist, const cse::String& title, const cse::String& album, const cse::String& genre, const api::Path& root) : connection(connection), path(path), artist(artist), title(title), album(album), genre(genre) +MediaFile::MediaFile(const _R& connection, const api::Path& path, const cse::String& artist, const cse::String& title, const cse::String& album, const cse::String& genre, const api::Path& root) : connection(connection), path(path), artist(artist), title(title), album(album), genre(genre) { - _P path_(connection->Parse(_B("SELECT path FROM files WHERE path = ?"))->Execute(path.GetPath())); + _R path_(connection->Parse(_B("SELECT path FROM files WHERE path = ?"))->Execute(path.GetPath())); if (path_->MoveNext()) {