core/tags/album: Remove album::year() function
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
abe12bac64
commit
a7746cf901
|
@ -94,8 +94,8 @@ static inline int track_compare(Track *lhs, Track *rhs, sort_t field)
|
|||
case SORT_TRACK:
|
||||
return lhs->track() - rhs->track();
|
||||
case SORT_YEAR:
|
||||
if (lhs->album()->year() - rhs->album()->year() != 0)
|
||||
return lhs->album()->year() - rhs->album()->year();
|
||||
if (lhs->album()->al_year - rhs->album()->al_year != 0)
|
||||
return lhs->album()->al_year - rhs->album()->al_year;
|
||||
case SORT_ALBUM:
|
||||
return lhs->album()->compare(rhs->album());
|
||||
}
|
||||
|
|
|
@ -57,11 +57,6 @@ void album :: write(file &file)
|
|||
GenericTag :: write(file);
|
||||
}
|
||||
|
||||
unsigned int album :: year()
|
||||
{
|
||||
return al_year;
|
||||
}
|
||||
|
||||
|
||||
void album_db_init()
|
||||
{
|
||||
|
|
|
@ -121,7 +121,7 @@ void QueueModel::get_value_vfunc(const Gtk::TreeIter &iter, int column,
|
|||
case 4:
|
||||
return set_val(track->album()->name(), value);
|
||||
case 5:
|
||||
return set_val(track->album()->year(), value);
|
||||
return set_val(track->album()->al_year, value);
|
||||
case 6:
|
||||
return set_val(track->genre()->name(), value);
|
||||
case 7:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* ... << year3 << GenericTag::write()
|
||||
*/
|
||||
struct album : public GenericTag {
|
||||
unsigned int al_year; /* Ths album's year. */
|
||||
unsigned int al_year; /* This album's year. */
|
||||
|
||||
album(); /**< Album tag constructor */
|
||||
|
||||
|
@ -53,13 +53,6 @@ struct album : public GenericTag {
|
|||
* @param file The file to write to.
|
||||
*/
|
||||
void write(file &);
|
||||
|
||||
/**
|
||||
* Called to access the year associated with this album.
|
||||
*
|
||||
* @return Album::_year.
|
||||
*/
|
||||
unsigned int year();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ static void test_verify_empty(struct album *album)
|
|||
{
|
||||
test_equal(album->name(), "");
|
||||
test_equal(album->lowercase(), "");
|
||||
test_equal(album->year(), 0);
|
||||
test_equal(album->al_year, 0);
|
||||
test_equal(album->primary_key(), "0/");
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ static void test_verify_hyrule(struct album *album)
|
|||
{
|
||||
test_equal(album->name(), "Hyrule Symphony");
|
||||
test_equal(album->lowercase(), "hyrule symphony");
|
||||
test_equal(album->year(), 1998);
|
||||
test_equal(album->al_year, 1998);
|
||||
test_equal(album->primary_key(), "1998/Hyrule Symphony");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue