Commit 3dcdf6c4 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Revert "Album don't contain a release year anymore."

This reverts commit 0f8e231a.
Release year reintroduced in the media library in
8c2fe11ca4e9fc47d2af6b504c2ccc7473397a33.
parent d776fca8
......@@ -55,6 +55,7 @@ album_item_copy(const album_item* p_item)
if (p_item->psz_artwork != NULL)
p_new_item->psz_artwork = strdup(p_item->psz_artwork);
p_new_item->i_nb_tracks = p_item->i_nb_tracks;
p_new_item->i_release_date = p_item->i_release_date;
return p_new_item;
}
......
......@@ -39,6 +39,7 @@ typedef struct album_item {
unsigned int i_id;
char* psz_name;
char* psz_summary;
time_t i_release_date;
char* psz_artwork;
uint32_t i_nb_tracks;
} album_item;
......
......@@ -139,6 +139,7 @@ albumToAlbumItem( AlbumPtr album )
if (p_item == nullptr)
return nullptr;
p_item->i_id = album->id();
p_item->i_release_date = album->releaseYear();
p_item->i_nb_tracks = album->nbTracks();
p_item->psz_artwork = path_from_url(album->artworkUrl().c_str());
return p_item;
......
......@@ -108,6 +108,12 @@ genlist_text_get_cb(void *data, Evas_Object *obj, const char *part)
p_view_item->p_album_item->i_nb_tracks > 1 ? "s" : "" );
return buf;
}
else if (!strcmp(part, "elm.text.sub.left.bottom")) {
if (p_view_item->p_album_item->i_release_date) {
asprintf(&buf, "%d", p_view_item->p_album_item->i_release_date);
return buf;
}
}
}
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment