10 |
|
|
11 |
|
#include "MediaFile.hpp" |
12 |
|
|
13 |
< |
MediaFile::MediaFile(_H<dbi::Connection>& connection, const api::Path& path) : connection(connection), path(path) |
13 |
> |
MediaFile::MediaFile(_P<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())); |
15 |
> |
_P<dbi::ResultSet> info(connection->Parse(_B("SELECT artist, title, album, genre FROM files WHERE path = ?"))->Execute(path.GetPath())); |
16 |
|
|
17 |
|
if (info->MoveNext()) |
18 |
|
{ |
25 |
|
throw; |
26 |
|
} |
27 |
|
|
28 |
< |
MediaFile::MediaFile(_H<dbi::Connection>& 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) |
28 |
> |
MediaFile::MediaFile(_P<dbi::Connection>& 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) |
29 |
|
{ |
30 |
< |
_H<dbi::ResultSet> path_(connection->Parse(_B("SELECT path FROM files WHERE path = ?"))->Execute(path.GetPath())); |
30 |
> |
_P<dbi::ResultSet> path_(connection->Parse(_B("SELECT path FROM files WHERE path = ?"))->Execute(path.GetPath())); |
31 |
|
|
32 |
|
if (path_->MoveNext()) |
33 |
|
{ |