14#include "dist/sds/sds.h"
General rax cache handling.
Central myMPD configuration definitions.
pfd_type
Definition event.h:21
jukebox_modes
Definition jukebox.h:21
Linked list implementation.
void partition_state_default(struct t_partition_state *partition_state, const char *name, struct t_mpd_state *mpd_state, struct t_config *config)
Definition mympd_state.c:317
void mympd_mpd_state_free(struct t_mpd_state *mpd_state)
Definition mympd_state.c:299
void mympd_mpd_state_features_copy(struct t_mpd_features *src, struct t_mpd_features *dst)
Definition mympd_state.c:291
void jukebox_state_free(struct t_jukebox_state *jukebox_state)
Definition mympd_state.c:437
void jukebox_state_copy(struct t_jukebox_state *src, struct t_jukebox_state *dst)
Definition mympd_state.c:450
void mympd_mpd_state_copy(struct t_mpd_state *src, struct t_mpd_state *dst)
Definition mympd_state.c:238
void jukebox_state_default(struct t_jukebox_state *jukebox_state)
Definition mympd_state.c:415
void partition_state_free(struct t_partition_state *partition_state)
Definition mympd_state.c:385
void mympd_mpd_state_features_default(struct t_mpd_features *feat)
Definition mympd_state.c:265
void mympd_mpd_state_default(struct t_mpd_state *mpd_state, struct t_config *config)
Definition mympd_state.c:210
void stickerdb_state_default(struct t_stickerdb_state *stickerdb, struct t_config *config)
Definition mympd_state.c:473
void stickerdb_state_free(struct t_stickerdb_state *stickerdb)
Definition mympd_state.c:485
void mympd_state_free(struct t_mympd_state *mympd_state)
Definition mympd_state.c:142
mpd_conn_states
Definition mympd_state.h:28
@ MPD_CONNECTED
mpd is connected
Definition mympd_state.h:29
@ MPD_FAILURE
mpd is in unrecoverable failure state
Definition mympd_state.h:31
@ MPD_DISCONNECTED
mpd is disconnected
Definition mympd_state.h:30
void mympd_state_save(struct t_mympd_state *mympd_state, bool free_data)
Definition mympd_state.c:34
void mympd_state_default(struct t_mympd_state *mympd_state, struct t_config *config)
Definition mympd_state.c:62
Definition cache_rax.h:22
Definition config_def.h:22
Definition mympd_state.h:94
struct t_list * queue
the jukebox queue itself
Definition mympd_state.h:100
sds playlist
playlist from which the jukebox queue is generated
Definition mympd_state.h:96
bool ignore_hated
ignores hated songs for the jukebox mode
Definition mympd_state.h:101
sds last_error
last jukebox error message
Definition mympd_state.h:107
sds filter_exclude
mpd search filter to exclude songs / albums
Definition mympd_state.h:103
unsigned queue_length
how many songs should the mpd queue have
Definition mympd_state.h:97
bool autostart
Run jukebox after MPD connection is established.
Definition mympd_state.h:108
struct t_mympd_mpd_tags uniq_tag
single tag for the jukebox uniq constraint
Definition mympd_state.h:99
unsigned min_song_duration
minimum song duration
Definition mympd_state.h:104
sds filter_include
mpd search filter to include songs / albums
Definition mympd_state.h:102
enum jukebox_modes mode
the jukebox mode
Definition mympd_state.h:95
unsigned last_played
only add songs with last_played state older than seconds from now
Definition mympd_state.h:98
unsigned max_song_duration
maximum song duration
Definition mympd_state.h:105
bool filling
indication flag for filling jukebox thread
Definition mympd_state.h:106
Definition mympd_state.h:205
sds sylt_ext
file extension for synced lyrics
Definition mympd_state.h:207
sds vorbis_uslt
vorbis comment for unsynced lyrics
Definition mympd_state.h:208
sds vorbis_sylt
vorbis comment for synced lyrics
Definition mympd_state.h:209
sds uslt_ext
file extension for unsynced lyrics
Definition mympd_state.h:206
Definition mympd_state.h:37
bool whence
mpd supports the whence feature (relative position in queue) (MPD 0.23.5)
Definition mympd_state.h:58
bool db_added
mpd supports added attribute for songs (MPD 0.24)
Definition mympd_state.h:51
bool stickers
mpd supports stickers
Definition mympd_state.h:43
bool fingerprint
mpd supports the fingerprint command
Definition mympd_state.h:38
bool pcre
mpd supports pcre for filter expressions
Definition mympd_state.h:41
bool neighbor
mpd supports neighbors command
Definition mympd_state.h:40
bool playlist_dir_auto
mpd supports autodetection of playlist directory (MPD 0.24)
Definition mympd_state.h:55
bool mount
mpd supports mounts
Definition mympd_state.h:39
bool mpd_0_24_0
MPD protocol version is ge 0.24.0.
Definition mympd_state.h:49
bool playlists
mpd supports playlists
Definition mympd_state.h:42
bool advsticker
mpd supports new sticker commands from MPD 0.24
Definition mympd_state.h:50
bool consume_oneshot
mpd supports consume oneshot mode (MPD 0.24)
Definition mympd_state.h:53
bool playlist_rm_range
mpd supports the playlist rm range command (MPD 0.23.3)
Definition mympd_state.h:59
bool listplaylist_range
mpd supports the listplaylist with range parameter (MPD 0.24)
Definition mympd_state.h:54
bool advqueue
mpd supports the prio filter / sort for queue and the save modes (MPD 0.24)
Definition mympd_state.h:52
bool starts_with
mpd supports starts_with filter expression (MPD 0.24)
Definition mympd_state.h:56
bool mpd_0_25_0
MPD protocol version is ge 0.25.0.
Definition mympd_state.h:47
bool tags
mpd tags are enabled
Definition mympd_state.h:44
bool library
myMPD has access to the mpd music directory
Definition mympd_state.h:45
Definition mympd_state.h:65
const unsigned * protocol
mpd protocol version
Definition mympd_state.h:86
sds mpd_pass
mpd password
Definition mympd_state.h:70
unsigned mpd_port
mpd port configuration
Definition mympd_state.h:69
sds music_directory_value
real music directory set by feature detection
Definition mympd_state.h:75
struct t_config * config
pointer to static config
Definition mympd_state.h:66
sds tag_list
comma separated string of mpd tags to enable
Definition mympd_state.h:78
struct t_mympd_mpd_tags tags_search
tags enabled for search
Definition mympd_state.h:81
struct t_mympd_mpd_tags tags_mpd
all available mpd tags
Definition mympd_state.h:80
sds playlist_directory_value
real playlist directory set by feature detection
Definition mympd_state.h:76
struct t_mympd_mpd_tags tags_album
tags enabled for albums
Definition mympd_state.h:83
struct t_mpd_features feat
feature flags
Definition mympd_state.h:87
struct t_mympd_mpd_tags tags_mympd
tags enabled by myMPD and mpd
Definition mympd_state.h:79
unsigned mpd_timeout
mpd connection timeout
Definition mympd_state.h:72
bool mpd_stringnormalization
mpd stringnormalization
Definition mympd_state.h:74
enum mpd_tag_type tag_albumartist
tag to use for AlbumArtist
Definition mympd_state.h:84
bool mpd_keepalive
mpd tcp keepalive flag
Definition mympd_state.h:73
struct t_list sticker_types
mpd sticker types
Definition mympd_state.h:88
sds mpd_host
mpd host configuration
Definition mympd_state.h:68
struct t_mympd_mpd_tags tags_browse
tags enabled for browse
Definition mympd_state.h:82
unsigned mpd_binarylimit
mpd binary limit to set
Definition mympd_state.h:71
Definition mympd_state.h:215
struct t_stickerdb_state * stickerdb
states for stickerdb connection
Definition mympd_state.h:219
struct t_list trigger_list
list of triggers
Definition mympd_state.h:223
sds view_browse_playlist_detail
view settings for the listing of playlist contents
Definition mympd_state.h:239
sds view_browse_database_album_list
view settings for the album list view
Definition mympd_state.h:236
unsigned volume_max
maximum mpd volume
Definition mympd_state.h:254
struct t_config * config
pointer to static config
Definition mympd_state.h:216
struct t_mympd_mpd_tags smartpls_generate_tag_types
generate smart playlists for each value for this tag
Definition mympd_state.h:230
struct t_webradios * webradiodb
WebradioDB.
Definition mympd_state.h:263
struct t_cache album_cache
the album cache created by the mympd_worker thread
Definition mympd_state.h:261
sds view_queue_current
view settings for the queue view
Definition mympd_state.h:232
sds image_names_lg
comma separated string of large coverimage names
Definition mympd_state.h:252
sds view_browse_database_tag_list
view settings for the album list view
Definition mympd_state.h:237
sds view_queue_jukebox_song
view settings for the jukebox queue view for songs
Definition mympd_state.h:243
bool tag_disc_empty_is_first
handle empty disc tag as disc one for albums
Definition mympd_state.h:258
sds image_names_sm
comma separated string of small coverimage names
Definition mympd_state.h:250
sds navbar_icons
json string of navigation bar icons
Definition mympd_state.h:249
struct t_timer_list timer_list
list of timers
Definition mympd_state.h:221
sds info_txt_name
name of album info files
Definition mympd_state.h:260
sds view_browse_radio_webradiodb
view settings for the webradiodb view
Definition mympd_state.h:245
sds booklet_name
name of the booklet files
Definition mympd_state.h:259
sds view_browse_database_album_detail_info
view settings for the album detail view
Definition mympd_state.h:234
struct t_lyrics lyrics
lyrics settings
Definition mympd_state.h:256
sds view_browse_radio_favorites
view settings for the radio favorites view
Definition mympd_state.h:246
struct t_webradios * webradio_favorites
webradio favorites
Definition mympd_state.h:264
unsigned volume_step
volume step for +/- buttons
Definition mympd_state.h:255
sds smartpls_sort
sort smart playlists by this tag
Definition mympd_state.h:227
sds view_playback
view settings for playback view
Definition mympd_state.h:241
sds music_directory
mpd music directory setting (real value is in mpd_state)
Definition mympd_state.h:247
struct mympd_pfds pfds
fds to poll in the event loop
Definition mympd_state.h:220
bool smartpls
enable smart playlists
Definition mympd_state.h:226
sds smartpls_prefix
name prefix for smart playlists
Definition mympd_state.h:228
sds smartpls_generate_tag_list
generate smart playlists for each value for this tag (string representation)
Definition mympd_state.h:231
sds playlist_directory
mpd playlist directory (real value is in mpd_state)
Definition mympd_state.h:248
unsigned last_played_count
number of songs to keep in the last played list (disk + memory)
Definition mympd_state.h:262
sds view_browse_playlist_list
view settings for the listing of playlists
Definition mympd_state.h:238
sds view_queue_last_played
view settings for last played view
Definition mympd_state.h:242
struct t_partition_state * partition_state
list of partition states
Definition mympd_state.h:218
struct t_mpd_state * mpd_state
mpd state shared across partitions
Definition mympd_state.h:217
sds view_queue_jukebox_album
view settings for the jukebox queue view for albums
Definition mympd_state.h:244
struct t_list home_list
list of home icons
Definition mympd_state.h:222
sds view_browse_filesystem
view settings for filesystem listing
Definition mympd_state.h:240
sds view_browse_database_album_detail
view settings for the album detail title list
Definition mympd_state.h:235
sds webui_settings
settings only relevant for webui, saved as string containing json
Definition mympd_state.h:257
sds image_names_md
comma separated string of medium coverimage names
Definition mympd_state.h:251
unsigned volume_min
minimum mpd volume
Definition mympd_state.h:253
int smartpls_interval
interval to refresh smart playlists in seconds
Definition mympd_state.h:229
sds view_search
view settings for the search view
Definition mympd_state.h:233
sds tag_list_search
comma separated string of tags for search
Definition mympd_state.h:224
sds tag_list_browse
comma separated string of tags for browse
Definition mympd_state.h:225
Definition mympd_state.h:114
int last_song_id
previous song id from queue
Definition mympd_state.h:124
int song_pos
current song pos in queue
Definition mympd_state.h:125
sds state_dir
partition state folder
Definition mympd_state.h:144
bool is_default
flag for the mpd default partition
Definition mympd_state.h:146
struct t_partition_state * next
pointer to next partition;
Definition mympd_state.h:145
struct t_jukebox_state jukebox
jukebox
Definition mympd_state.h:139
time_t song_end_time
timestamp at which current song should end (starttime + duration)
Definition mympd_state.h:132
struct t_list last_played
last_played list
Definition mympd_state.h:153
int song_id
current song id from queue
Definition mympd_state.h:122
sds stream_uri
custom url for local playback
Definition mympd_state.h:151
bool player_error
signals mpd player error condition
Definition mympd_state.h:138
struct t_config * config
pointer to static config
Definition mympd_state.h:115
enum mpd_idle idle_mask
mpd idle mask
Definition mympd_state.h:147
unsigned mpd_stream_port
mpd http stream port setting
Definition mympd_state.h:150
int last_skipped_id
last skipped event was fired for this song id
Definition mympd_state.h:131
struct mpd_song * song
current song
Definition mympd_state.h:127
bool set_conn_options
true if mpd connection options should be changed
Definition mympd_state.h:148
unsigned queue_length
length of the queue
Definition mympd_state.h:130
sds name
partition name
Definition mympd_state.h:141
time_t last_song_end_time
timestamp at which previous song should end (starttime + duration)
Definition mympd_state.h:133
time_t song_start_time
timestamp at which current song has started
Definition mympd_state.h:134
int timer_fd_scrobble
Timerfd for scrobble event.
Definition mympd_state.h:157
int timer_fd_jukebox
Timerfd for jukebox runs.
Definition mympd_state.h:156
unsigned queue_version
queue version number (increments on queue change)
Definition mympd_state.h:129
enum mpd_state play_state
mpd player state
Definition mympd_state.h:121
struct mpd_song * last_song
previous song
Definition mympd_state.h:128
struct t_list preset_list
Playback presets.
Definition mympd_state.h:154
enum mpd_conn_states conn_state
mpd connection state
Definition mympd_state.h:119
int next_song_id
next song id from queue
Definition mympd_state.h:123
time_t song_duration
current song length
Definition mympd_state.h:126
time_t crossfade
used for determine when to add next song from jukebox queue
Definition mympd_state.h:136
int timer_fd_mpd_connect
Timerfd for mpd reconnection.
Definition mympd_state.h:158
struct t_mpd_state * mpd_state
pointer to shared mpd state
Definition mympd_state.h:116
struct mpd_connection * conn
mpd connection object from libmpdclient
Definition mympd_state.h:118
sds highlight_color
highlight color
Definition mympd_state.h:142
sds highlight_color_contrast
highlight contrast color
Definition mympd_state.h:143
enum pfd_type waiting_events
Bitmask for events.
Definition mympd_state.h:160
bool auto_play
start play if queue changes
Definition mympd_state.h:137
time_t last_song_start_time
timestamp at which previous song has started
Definition mympd_state.h:135
Definition mympd_state.h:166
struct t_config * config
pointer to static config
Definition mympd_state.h:167
sds name
name for logging
Definition mympd_state.h:172
enum mpd_conn_states conn_state
mpd connection state
Definition mympd_state.h:171
struct t_mpd_state * mpd_state
pointer to shared mpd state
Definition mympd_state.h:168
struct mpd_connection * conn
mpd connection object from libmpdclient
Definition mympd_state.h:170
Definition mympd_state.h:178
bool weekdays[7]
array of weekdays for timer execution
Definition mympd_state.h:189
struct t_list arguments
argumentlist for script timers
Definition mympd_state.h:190
sds playlist
playlist to load for play timer
Definition mympd_state.h:187
int start_minute
start minute
Definition mympd_state.h:183
unsigned volume
volume to set
Definition mympd_state.h:186
sds action
timer action, e.g. script, play
Definition mympd_state.h:184
sds name
name of the timer
Definition mympd_state.h:179
bool enabled
enabled flag
Definition mympd_state.h:181
sds partition
mpd partition
Definition mympd_state.h:180
sds subaction
timer subaction, e.g. script to execute
Definition mympd_state.h:185
int start_hour
start hour
Definition mympd_state.h:182
sds preset
preset to load for play timer
Definition mympd_state.h:188
Definition mympd_state.h:196
unsigned last_id
highest timer id in the list
Definition mympd_state.h:197
int active
number of enabled timers
Definition mympd_state.h:198
struct t_list list
timer definition
Definition mympd_state.h:199