summaryrefslogtreecommitdiff
path: root/src/ui.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-29ui: Replace deprecated libcurl function.Lars-Dominik Braun1-4/+4
Bumps required curl version up to 7.32.0.
2024-03-24ui: Send upcoming songs to eventcmd.Lars-Dominik Braun1-16/+60
2022-02-12ui: Declare more HTTP errors as “temporary”Lars-Dominik Braun1-1/+22
This should improve the situation with unreliable HTTP proxies. See #725.
2020-08-09Allow choosing time formatLars-Dominik Braun1-1/+1
Introduce new format string for playback time, supporting formats like -remaining/total, elapsed/total, … Fixes #699.
2020-08-09Add optional debugging codeLars-Dominik Braun1-0/+3
Compile *without* -DNDEBUG. The environment variable PIANOBAR_DEBUG accepts a bitfield which enables (1) network (2) audio (4) UI debug messages.
2018-10-15Increase max_retries default valueLars-Dominik Braun1-1/+1
Back to default value before ff4f15214100d209f39e4ed85f47e572c8fe9289. It is used by the player as well and since 403’s are considered an “error” it must be larger than the number of files per playlist (4). See issue #672.
2018-04-07Add network timeouts and retriesLars-Dominik Braun1-1/+16
All network operations can time out now. API requests are retried up to three times (default). Replaces setting max_player_errors with max_retries, which is used for player and API. Adds timeout setting. Partially reverts 436a1d4012553a2f33d0e3a5180b3b5ae0378bdd and fixes (at least) issue #657. Thanks to @exarkun for testing.
2018-03-15Properly protect player struct with mutexLars-Dominik Braun1-4/+9
The volatile keyword neither guarantees atomic access nor memory visibility[1]. Although this is usually not a problem on x86, it is incorrect to rely on this. Use mutex locks to protect all shared player variables and enforce memory visibility. [1] https://wiki.sei.cmu.edu/confluence/display/c/CON02-C.+Do+not+use+volatile+as+a+synchronization+primitive
2017-10-07Fix logic for marking station (deleted)Lars-Dominik Braun1-8/+7
For songs with no station associated (NULL) “(deleted)” was shown unconditionally. Hide it. Fixes commit 4dfca5b56b441faf4938b6c8e97585f68e468039.
2017-10-02Show station in song listsLars-Dominik Braun1-8/+25
Iff song’s station is not the current station. This is only the case for the song history right now. Closes #638
2017-09-30Add tired rating to songLars-Dominik Braun1-3/+19
Now we can show a tired icon in the history. Closes #637.
2017-09-30Add (optional) song duration to song list format stringLars-Dominik Braun1-4/+11
Closes #636.
2016-10-15Support binding to a specific network interfaceblmpl1-0/+9
Closes #597.
2016-04-14Fix songfinish event when changing stationsLars-Dominik Braun1-1/+2
The event did not contain any song data (title, artist, …), because the playlist was destroyed by the ui command. Now the actual station switch is deferred by introducing nextStation and letting the main loop handle it. Fixes issue #584.
2016-02-11Add default value for rpcTlsPortLars-Dominik Braun1-0/+4
Passing NULL to printf and the result to curl may or may not work. YMMV. Fixes #574.
2015-10-23Interruptible requestsLars-Dominik Braun1-53/+64
^C now works as expected: It interrupts API requests, input prompts and audio streaming. Timeouts have been removed.
2015-08-10Move feature test macros to config.hLars-Dominik Braun1-5/+1
I removed most of the *BSD-related stuff, because I can’t test these. If this breaks your build, send me a patch please.
2015-06-15Replace setting tls_fingerprint with ca_bundleLars-Dominik Braun1-0/+3
2015-04-06Switch back to libcurlLars-Dominik Braun1-27/+95
Drops libwaitress. Adds the new dependency libcurl and drops gnutls. I wouldn’t say writing my own HTTP library was a mistake – it was not and the experience gained was worth it. Instead I have to acknowledge that libcurl is just better than my own implementation. Sure, it does a lot more than HTTP – one could call that bloat. Yet if you just want to get the job done™ reusing code is the way to go. See #512 and #513.
2014-07-21Refactor audio player, add retry timeoutLars-Dominik Braun1-1/+1
Fixes #442.
2014-03-31Fix compiler warningLars-Dominik Braun1-2/+2
2014-03-31Use libav/ffmpeg for audio decodingLars-Dominik Braun1-2/+2
libav 9.12 and ffmpeg 2.2 have been tested. Here’s why: My mp4 “parser” *cough* never was a mp4 parser in the sense that it actually understood the file format. Instead it grepped the input stream for “magic” strings (section identifiers). That alone should be sufficient to throw away the code and rewrite it. Additionally libfaad2 has not been updated for ages. I guess it was abandoned in favor of libav/ffmpeg. With libav/ffmpeg, which we support both as long as the API’s don’t diverge too much, pianobar gains fast and reliable AAC and MP3 decoding without bothering too much about the details. Most users will have it installed already. On my own machine libav consumes about 2/3 CPU time compared to the previous solution when playing AAC. Unfortunately memory usage doubled and my attempts to disable unused protocols/formats/codec failed due to libav’s API limitations. While cleaning up a small detail regarding the eventcmd API has changed too: Song duration and position are measured in seconds instead of milliseconds now. Since libav/ffmpeg keeps track of accurate timing the precision pianobar keeps track of can be reduced, while still being sufficient for most users.
2014-03-13fix warnings now noted due to format string checkingCody P Schafer1-5/+5
2013-08-07piano: Generic linked listsLars-Dominik Braun1-47/+26
Introduces generic linked list structure and functions (like append, delete, …). Removes a lot of copy&pasted code and improves code readability/reusability. Heads up: This change breaks libpiano’s ABI.
2013-07-29Fix display of song lists with more than 999 itemsLars-Dominik Braun1-1/+1
Increased buffer size.
2013-03-27Add missing events to genre station selectionLars-Dominik Braun1-70/+0
Two new events: stationfetchgenre, stationaddgenre
2012-09-17Fix history memory leakLars-Dominik Braun1-0/+2
With `history = 0` playlist items are discarded, but not freed.
2012-07-06Add feature: Create new station from selected songLars-Dominik Braun1-1/+4
New keybinding ‘v’, new setting act_createstationfromsong.
2012-06-14piano: Remove unused structLars-Dominik Braun1-4/+1
2012-05-04Revert "Add force_tls setting"Lars-Dominik Braun1-4/+3
This reverts commit 35763dea799c96361e288a10eab0fbd16c36e880. It does not work with the JSON API.
2012-05-02Really delete seed suggestionsLars-Dominik Braun1-28/+11
There does not seem to be an API call for that.
2012-05-01piano: Move to JSON API (v5)Lars-Dominik Braun1-2/+2
In random order: Thanks to Chris Eby for his work on pithos, to an anonymous coward for sending me his Android client, to Alex Howard for sending me the webOS client, to ZigZagJoe for providing a temporary fix and thanks to everyone who sent Pandora a message. Although there are a few rough edges here and there this fixes #236.
2012-04-14Add force_tls settingLars-Dominik Braun1-3/+4
Use TLS for all actions when requested. Closes #234
2012-03-17Auto-select last remaining item of filtered listLars-Dominik Braun1-15/+26
See #231.
2012-02-24Don’t use custom format output as format stringLars-Dominik Braun1-3/+3
It may contain %’s and crashes. Closes #225.
2012-01-10getFragment does not support TLS any moreLars-Dominik Braun1-0/+1
You can’t handle the load? Closes #202
2011-12-23Fix warnings found by -Wcast-qualLars-Dominik Braun1-4/+4
2011-12-23Fix warnings found by -WshadowLars-Dominik Braun1-3/+0
2011-12-23Fix warnings found by -Wmissing-declarationsLars-Dominik Braun1-1/+1
2011-12-18Fix genre selection segfaultLars-Dominik Braun1-19/+26
Closes #193 and #194
2011-11-08Back to snprintfLars-Dominik Braun1-16/+2
Fixes #169.
2011-10-22Support seed stationsLars-Dominik Braun1-4/+4
Fixes #165
2011-09-22piano: Protocol version bump (v32)Lars-Dominik Braun1-4/+8
Keys stay the same. Quickmix and seed suggestion API calls changed. Listener id is not part of the url any more. Bookmark API calls seem to be deprecated.
2011-09-02Use fprintf instead of snprintfLars-Dominik Braun1-14/+11
- Output size not limited by buffer size - No local buffer needed
2011-08-29Customizeable list format (songs)Lars-Dominik Braun1-5/+26
Fixes #151
2011-07-27Configureable %@ format stringLars-Dominik Braun1-1/+1
2011-07-25Added toggle to quickmix menuLars-Dominik Braun1-1/+9
Closes #141
2011-07-23Fix commentsLars-Dominik Braun1-7/+7
2011-07-14Defined _DARWIN_C_SOURCELars-Dominik Braun1-0/+1
Required to expose non-standard functions. Closes #138
2011-07-11Disable feature test macros on FreeBSDEitan Adler1-0/+2
Closes #136