mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-24 19:46:19 -05:00
[db] Change type of "disabled" to int64
Before the value in the db was not read straight into mfi->disabled and pli->disabled, instead it was evaluated as != 0, so the ->disabled field would just be true or false. This was also necessary when INOTIFY_FAKE_COOKIE (1 << 32) was written to the DB, because it could not fit in the uint32 of mfi->disabled/pli->disabled. I consider this juggling poor practice, so with this change it is read straight in and out, always as a int64.
This commit is contained in:
6
src/db.h
6
src/db.h
@@ -197,7 +197,7 @@ struct media_file_info {
|
||||
uint32_t time_played;
|
||||
uint32_t time_skipped;
|
||||
|
||||
uint32_t disabled;
|
||||
int64_t disabled; // Long because it stores up to INOTIFY_FAKE_COOKIE
|
||||
|
||||
uint64_t sample_count; //TODO [unused] sample count is never set and therefor always 0
|
||||
char *codectype; /* song.codectype, 4 chars max (32 bits) */
|
||||
@@ -247,7 +247,7 @@ struct playlist_info {
|
||||
enum pl_type type; /* see PL_ types */
|
||||
char *query; /* where clause if type 1 (MSPS) */
|
||||
uint32_t db_timestamp; /* time last updated */
|
||||
uint32_t disabled;
|
||||
int64_t disabled; /* long because it stores up to INOTIFY_FAKE_COOKIE */
|
||||
char *path; /* path of underlying playlist */
|
||||
uint32_t index; /* index of playlist for paths with multiple playlists */
|
||||
uint32_t special_id; /* iTunes identifies certain 'special' playlists with special meaning */
|
||||
@@ -439,7 +439,7 @@ struct directory_info {
|
||||
char *virtual_path;
|
||||
char *path;
|
||||
uint32_t db_timestamp;
|
||||
uint32_t disabled;
|
||||
int64_t disabled;
|
||||
uint32_t parent_id;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user