libsaria: Call a dummy index function for each TrackTag
This function takes an inode and word list. Soon it will add each substring to an index.
This commit is contained in:
parent
fc50ceb34f
commit
7fc4e22795
|
@ -49,6 +49,10 @@ class TrackTag
|
|||
string get_album();
|
||||
string get_filepath();
|
||||
unsigned int get_year();
|
||||
|
||||
list<string> *get_title_words();
|
||||
list<string> *get_artist_words();
|
||||
list<string> *get_album_words();
|
||||
};
|
||||
|
||||
#endif /* LIBSARIA_TAGS_H */
|
||||
|
|
|
@ -9,9 +9,21 @@ void IndexTask::index_track(TrackTag *tag)
|
|||
track_list.push_back(tag);
|
||||
}
|
||||
|
||||
void IndexTask::index_list(ino_t &inode, list<string> *word_list)
|
||||
{
|
||||
}
|
||||
|
||||
void IndexTask::run_task()
|
||||
{
|
||||
println("Indexing!");
|
||||
list<TrackTag *>::iterator it;
|
||||
ino_t inode;
|
||||
|
||||
for (it = track_list.begin(); it != track_list.end(); it++) {
|
||||
inode = (*it)->get_inode();
|
||||
index_list(inode, (*it)->get_title_words());
|
||||
index_list(inode, (*it)->get_artist_words());
|
||||
index_list(inode, (*it)->get_album_words());
|
||||
}
|
||||
}
|
||||
|
||||
static void reindex_path(list<TrackTag> *tag_list)
|
||||
|
|
|
@ -49,6 +49,8 @@ class IndexTask : public IdleTask
|
|||
{
|
||||
private:
|
||||
list<TrackTag *> track_list;
|
||||
void index_list(ino_t &, list<string> *);
|
||||
|
||||
public:
|
||||
IndexTask();
|
||||
~IndexTask();
|
||||
|
|
|
@ -216,3 +216,18 @@ string TrackTag::get_filepath()
|
|||
{
|
||||
return filepath;
|
||||
}
|
||||
|
||||
list<string> *TrackTag::get_title_words()
|
||||
{
|
||||
return &title_words;
|
||||
}
|
||||
|
||||
list<string> *TrackTag::get_artist_words()
|
||||
{
|
||||
return &artist_words;
|
||||
}
|
||||
|
||||
list<string> *TrackTag::get_album_words()
|
||||
{
|
||||
return &album_words;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue