xaizek / pms (License: GPLv3+) (since 2018-12-07)
Older version of Practical Music Search written in C++.
Commit b3f4a9725531b5efca3dd33ac377a19462f71df5

A little cleanup.
Author: Kim Tore Jensen
Author date (UTC): 2014-09-27 19:50
Committer name: Kim Tore Jensen
Committer date (UTC): 2014-09-27 19:50
Parent(s): 51833fece026c759a947a5aa96f9ea00dfe4be0e
Signing key:
Tree: f73498653b738c33d447f414fd6c9f81c335d3f9
File Lines added Lines deleted
src/pms.c 6 5
File src/pms.c changed (mode: 100644) (index 5a2841d..cfe0d4b)
... ... static void pms_handle_mpd_idle_update(struct mpd_connection * connection, enum
129 129 console("Database update has started or finished."); console("Database update has started or finished.");
130 130 } }
131 131
132 pms_get_mpd_state(connection);
132 if (flags & (MPD_IDLE_QUEUE | MPD_IDLE_PLAYER | MPD_IDLE_MIXER | MPD_IDLE_OPTIONS)) {
133 pms_get_mpd_state(connection);
134 }
133 135
134 136 topbar_draw(); topbar_draw();
135 137
 
... ... int get_input(struct mpd_connection * connection) {
175 177 // FIXME // FIXME
176 178 } else if (retval > 0) { } else if (retval > 0) {
177 179 if (FD_ISSET(mpd_fd, &fds)) { if (FD_ISSET(mpd_fd, &fds)) {
178 console("Got something from MPD");
179 180 flags |= PMS_HAS_INPUT_MPD; flags |= PMS_HAS_INPUT_MPD;
180 181 } }
181 182 if (FD_ISSET(STDIN_FILENO, &fds)) { if (FD_ISSET(STDIN_FILENO, &fds)) {
182 console("Console key input");
183 183 flags |= PMS_HAS_INPUT_STDIN; flags |= PMS_HAS_INPUT_STDIN;
184 184 } }
185 185 } }
 
... ... int main(int argc, char** argv) {
207 207 while(pms_state->running) { while(pms_state->running) {
208 208
209 209 if (!connection) { if (!connection) {
210 connection = pms_mpd_connect();
210 if (connection = pms_mpd_connect()) {
211 pms_handle_mpd_idle_update(connection, -1);
212 }
211 213 } }
212 214
213 215 if (connection && !is_idle) { if (connection && !is_idle) {
 
... ... int main(int argc, char** argv) {
221 223 flags = mpd_recv_idle(connection, true); flags = mpd_recv_idle(connection, true);
222 224 is_idle = false; is_idle = false;
223 225 pms_handle_mpd_idle_update(connection, flags); pms_handle_mpd_idle_update(connection, flags);
224 topbar_draw();
225 226 } }
226 227
227 228 if (input_flags & PMS_HAS_INPUT_STDIN) { if (input_flags & PMS_HAS_INPUT_STDIN) {
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/pms

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/pms

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master