core/tags/track: Reduce the size of the track tag
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
d222c306e0
commit
e82beb719f
|
@ -126,10 +126,10 @@ static struct db_entry *track_read(struct file *file)
|
||||||
unsigned int library_id, artist_id, album_id, genre_id;
|
unsigned int library_id, artist_id, album_id, genre_id;
|
||||||
struct track *track = __track_alloc();
|
struct track *track = __track_alloc();
|
||||||
|
|
||||||
file_readf(file, "%u %u %u %u %u", &library_id, &artist_id, &album_id,
|
file_readf(file, "%u %u %u %u %hu", &library_id, &artist_id, &album_id,
|
||||||
&genre_id, &track->tr_track);
|
&genre_id, &track->tr_track);
|
||||||
date_read(file, &track->tr_date);
|
date_read(file, &track->tr_date);
|
||||||
file_readf(file, "%u %u", &track->tr_count, &track->tr_length);
|
file_readf(file, "%hu %hu", &track->tr_count, &track->tr_length);
|
||||||
|
|
||||||
play_count += track->tr_count;
|
play_count += track->tr_count;
|
||||||
if (track->tr_count == 0)
|
if (track->tr_count == 0)
|
||||||
|
@ -163,10 +163,10 @@ static void track_write(struct file *file, struct db_entry *dbe)
|
||||||
track->tr_genre->ge_dbe.dbe_index,
|
track->tr_genre->ge_dbe.dbe_index,
|
||||||
track->tr_track);
|
track->tr_track);
|
||||||
date_write(file, &track->tr_date);
|
date_write(file, &track->tr_date);
|
||||||
file_writef(file, " %u %u %s\n%s\n", track->tr_count,
|
file_writef(file, " %hu %hu %s\n%s\n", track->tr_count,
|
||||||
track->tr_length,
|
track->tr_length,
|
||||||
track->tr_title,
|
track->tr_title,
|
||||||
path);
|
path);
|
||||||
|
|
||||||
g_free(path);
|
g_free(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,9 +47,9 @@ struct track {
|
||||||
struct genre *tr_genre; /* This track's associated genre. */
|
struct genre *tr_genre; /* This track's associated genre. */
|
||||||
struct library *tr_library; /* This track's associated library. */
|
struct library *tr_library; /* This track's associated library. */
|
||||||
|
|
||||||
unsigned int tr_count; /* This track's play count. */
|
unsigned short int tr_count; /* This track's play count. */
|
||||||
unsigned int tr_length; /* This track's length, in seconds. */
|
unsigned short int tr_length; /* This track's length, in seconds. */
|
||||||
unsigned int tr_track; /* This track's track number. */
|
unsigned short int tr_track; /* This track's track number. */
|
||||||
|
|
||||||
struct date tr_date; /* This track's last-played date. */
|
struct date tr_date; /* This track's last-played date. */
|
||||||
gchar *tr_path; /* This track's path, relative to the library. */
|
gchar *tr_path; /* This track's path, relative to the library. */
|
||||||
|
|
Loading…
Reference in New Issue