[-] Name update forked-daapd -> owntone throughout the code

This commit is contained in:
ejurgensen 2021-04-09 20:21:20 +02:00
parent f61665b81d
commit 5f1686695a
29 changed files with 50 additions and 50 deletions

View File

@ -214,7 +214,7 @@ expr returns [ pANTLR3_STRING result, int valid ]
goto STR_result_valid_0; /* ABORT */
}
/* No need to exclude empty artist and album, as forked-daapd makes sure there always exists an artist/album. */
/* No need to exclude empty artist and album, as the server makes sure there always exists an artist/album. */
if (neg_op && (op == ':' || op == '@')
&& (strcmp((char *)field, "daap.songalbumartist") == 0
|| strcmp((char *)field, "daap.songartist") == 0
@ -255,7 +255,7 @@ expr returns [ pANTLR3_STRING result, int valid ]
*end = '\0'; /* Cut out potential garbage - we're being kind */
/* forked-daapd only has media_kind = 1 for music - so remove media_kind = 32 to imporve select query performance. */
/* The server only has media_kind = 1 for music - so remove media_kind = 32 to imporve select query performance. */
if (llval == 32
&& (strcmp((char *)field, "com.apple.itunes.mediakind") == 0
|| strcmp((char *)field, "com.apple.itunes.extended-media-kind") == 0))

View File

@ -7,7 +7,7 @@
#include <confuse.h>
#define CONFFILE CONFDIR "/forked-daapd.conf"
#define CONFFILE CONFDIR "/owntone.conf"
// Some shorthand macros for poor man's
#define CFG_NAME_UNKNOWN_TITLE (cfg_getstr(cfg_getsec(cfg, "library"), "name_unknown_title"))

View File

@ -2700,7 +2700,7 @@ db_file_inc_playcount_byfilter(const char *filter)
#define Q_TMPL "UPDATE files SET play_count = play_count + 1, time_played = %" PRIi64 ", seek = 0 WHERE %s;"
/*
* Rating calculation is taken from from the beets plugin "mpdstats" (see https://beets.readthedocs.io/en/latest/plugins/mpdstats.html)
* and adapted to the forked-daapd rating rage (0 to 100).
* and adapted to this servers rating rage (0 to 100).
*
* Rating consist of the stable rating and a rolling rating.
* The stable rating is calculated based on the number was played and skipped:
@ -6807,7 +6807,7 @@ db_open(void)
}
errmsg = NULL;
ret = sqlite3_load_extension(hdl, PKGLIBDIR "/forked-daapd-sqlext.so", NULL, &errmsg);
ret = sqlite3_load_extension(hdl, PKGLIBDIR "/" PACKAGE_NAME "-sqlext.so", NULL, &errmsg);
if (ret != SQLITE_OK)
{
if (errmsg)

View File

@ -21,10 +21,10 @@
#include <sqlite3.h>
/* Rule of thumb: Will the current version of forked-daapd work with the new
/* Rule of thumb: Will the current version of the server work with the new
* version of the database? If yes, then it is a minor upgrade, if no, then it
* is a major upgrade. In other words minor version upgrades permit downgrading
* forked-daapd after the database was upgraded. */
* the server after the database was upgraded. */
#define SCHEMA_VERSION_MAJOR 21
#define SCHEMA_VERSION_MINOR 06

View File

@ -753,7 +753,7 @@ evrtsp_request_dispatch(struct evrtsp_connection* evcon)
/* Create the header from the store arguments */
evrtsp_make_header(evcon, req);
/* forked-daapd customisation for encryption */
/* owntone customisation for encryption */
if (!evcon->ciphercb)
evbuffer_add_buffer(evcon->output_raw, evcon->output_buffer);
else

View File

@ -1775,7 +1775,7 @@ httpd_init(const char *webroot)
ret = net_evhttp_bind(evhttpd, httpd_port, "httpd");
if (ret < 0)
{
DPRINTF(E_FATAL, L_HTTPD, "Could not bind to port %d (forked-daapd already running?)\n", httpd_port);
DPRINTF(E_FATAL, L_HTTPD, "Could not bind to port %d (server already running?)\n", httpd_port);
goto bind_fail;
}

View File

@ -2301,7 +2301,7 @@ daap_request(struct evhttp_request *req, struct httpd_uri_parsed *uri_parsed)
// Set reply headers
headers = evhttp_request_get_output_headers(req);
evhttp_add_header(headers, "Accept-Ranges", "bytes");
evhttp_add_header(headers, "DAAP-Server", "forked-daapd/" VERSION);
evhttp_add_header(headers, "DAAP-Server", PACKAGE_NAME "/" VERSION);
// Content-Type for all replies, even the actual audio streaming. Note that
// video streaming will override this Content-Type with a more appropriate
// video/<type> Content-Type as expected by clients like Front Row.

View File

@ -2868,7 +2868,7 @@ dacp_request(struct evhttp_request *req, struct httpd_uri_parsed *uri_parsed)
}
headers = evhttp_request_get_output_headers(req);
evhttp_add_header(headers, "DAAP-Server", "forked-daapd/" VERSION);
evhttp_add_header(headers, "DAAP-Server", PACKAGE_NAME "/" VERSION);
/* Content-Type for all DACP replies; can be overriden as needed */
evhttp_add_header(headers, "Content-Type", "application/x-dmap-tagged");

View File

@ -769,7 +769,7 @@ jsonapi_reply_config(struct httpd_request *hreq)
#endif
json_object_object_add(jreply, "websocket_port", json_object_new_int(websocket_port));
// forked-daapd version
// server version
json_object_object_add(jreply, "version", json_object_new_string(VERSION));
// enabled build options
@ -1212,7 +1212,7 @@ jsonapi_reply_spotify(struct httpd_request *hreq)
json_object_object_add(jreply, "enabled", json_object_new_boolean(true));
httpd_port = cfg_getint(cfg_getsec(cfg, "library"), "port");
snprintf(redirect_uri, sizeof(redirect_uri), "http://forked-daapd.local:%d/oauth/spotify", httpd_port);
snprintf(redirect_uri, sizeof(redirect_uri), "http://owntone.local:%d/oauth/spotify", httpd_port);
oauth_uri = spotifywebapi_oauth_uri_get(redirect_uri);
if (!oauth_uri)
@ -2189,7 +2189,7 @@ queue_item_to_json(struct db_queue_item *queue_item, char shuffle)
|| strncmp(queue_item->artwork_url, "https://", strlen("https://")) == 0))
{
// The queue item contains a valid http url for an artwork image, there is no need
// for the client to request the image through the forked-daapd artwork handler.
// for the client to request the image through the server artwork handler.
// Directly pass the artwork url to the client.
safe_json_add_string(item, "artwork_url", queue_item->artwork_url);
}

View File

@ -50,7 +50,7 @@ oauth_reply_spotify(struct httpd_request *hreq)
httpd_port = cfg_getint(cfg_getsec(cfg, "library"), "port");
snprintf(redirect_uri, sizeof(redirect_uri), "http://forked-daapd.local:%d/oauth/spotify", httpd_port);
snprintf(redirect_uri, sizeof(redirect_uri), "http://owntone.local:%d/oauth/spotify", httpd_port);
ret = spotifywebapi_oauth_callback(hreq->query, redirect_uri, &errmsg);
if (ret < 0)
{
@ -68,9 +68,9 @@ oauth_reply_spotify(struct httpd_request *hreq)
static int
oauth_reply_spotify(struct httpd_request *hreq)
{
DPRINTF(E_LOG, L_WEB, "This version of forked-daapd was built without support for Spotify\n");
DPRINTF(E_LOG, L_WEB, "This version was built without support for Spotify\n");
httpd_send_error(hreq->req, HTTP_NOTFOUND, "This version of forked-daapd was built without support for Spotify");
httpd_send_error(hreq->req, HTTP_NOTFOUND, "This version was built without support for Spotify");
return -1;
}

View File

@ -568,7 +568,7 @@ streaming_request(struct evhttp_request *req, struct httpd_uri_parsed *uri_parse
output_headers = evhttp_request_get_output_headers(req);
evhttp_add_header(output_headers, "Content-Type", "audio/mpeg");
evhttp_add_header(output_headers, "Server", "forked-daapd/" VERSION);
evhttp_add_header(output_headers, "Server", PACKAGE_NAME "/" VERSION);
evhttp_add_header(output_headers, "Cache-Control", "no-cache");
evhttp_add_header(output_headers, "Pragma", "no-cache");
evhttp_add_header(output_headers, "Expires", "Mon, 31 Aug 2015 06:00:00 GMT");

View File

@ -76,7 +76,7 @@
// Ignore pictures with larger size than this
#define PIPE_PICTURE_SIZE_MAX 1048576
// Where we store pictures for the artwork module to read
#define PIPE_TMPFILE_TEMPLATE "/tmp/forked-daapd.XXXXXX.ext"
#define PIPE_TMPFILE_TEMPLATE "/tmp/" PACKAGE_NAME ".XXXXXX.ext"
#define PIPE_TMPFILE_TEMPLATE_EXTLEN 4
enum pipetype

View File

@ -49,8 +49,8 @@
static bool lastfm_disabled = false;
/**
* The API key and secret (not so secret being open source) is specific to
* forked-daapd, and is used to identify forked-daapd and to sign requests
* The API key and secret (not so secret being open source) is specific to us,
* and is used to identify client and to sign requests.
*/
static const char *lastfm_api_key = "579593f2ed3f49673c7364fd1c9c829b";
static const char *lastfm_secret = "ce45a1d275c10b3edf0ecfa27791cb2b";

View File

@ -816,7 +816,7 @@ library(void *arg)
#ifdef __linux__
struct sched_param param;
/* Lower the priority of the thread so forked-daapd may still respond
/* Lower the priority of the thread so the server may still respond
* during library scan on low power devices. Param must be 0 for the SCHED_BATCH
* policy.
*/

View File

@ -224,7 +224,7 @@ static const struct metadata_map md_map_vorbis[] =
* Update 20180131: Removed tags supported by ffmpeg 2.5.4 (around 3 years old)
* + added some tags used for grouping
* Update 20200114: Removed TDA, TDAT, TYE, TYER, TDR since the they are
* well supported by ffmpeg, and forked-daapd was parsing TDA/TDAT incorrectly
* well supported by ffmpeg, and the server was parsing TDA/TDAT incorrectly
*
*/
static const struct metadata_map md_map_id3[] =

View File

@ -49,7 +49,7 @@ mdns_register(char *name, char *type, int port, char **txt);
* Register a CNAME record, it will be an alias for hostname
* Call only from the main thread!
*
* @in name The CNAME alias, e.g. "forked-daapd.local"
* @in name The CNAME alias, e.g. "myserver.local"
* @return 0 on success, -1 on error
*/
int

View File

@ -897,7 +897,7 @@ create_group_entry(struct mdns_group_entry *ge, int commit)
return -1;
}
// Convert to dns string: .forked-daapd.local -> \12forked-daapd\6local
// Convert to dns string: .myserver.local -> \12myserver\6local
count = 0;
for (i = ret - 1; i >= 0; i--)
{

View File

@ -516,7 +516,7 @@ mdns_cname(char *name)
return -1;
}
// Convert to dns string: .forked-daapd.local -> \12forked-daapd\6local
// Convert to dns string: .myserver.local -> \12myserver\6local
count = 0;
for (i = ret - 1; i >= 0; i--)
{

View File

@ -352,7 +352,7 @@ net_evhttp_bind(struct evhttp *evhttp, short unsigned port, const char *log_serv
{
if (!v6enabled)
{
DPRINTF(E_FATAL, L_HTTPD, "Could not bind to port %d (forked-daapd already running?)\n", httpd_port);
DPRINTF(E_FATAL, L_HTTPD, "Could not bind to port %d (server already running?)\n", httpd_port);
goto bind_fail;
}

View File

@ -117,7 +117,7 @@ enum command_list_type
* This lists for ffmpeg suffixes and mime types are taken from the ffmpeg decoder plugin from mpd
* (FfmpegDecoderPlugin.cxx, git revision 9fb351a139a56fc7b1ece549894f8fc31fa887cd).
*
* forked-daapd does not support different decoders and always uses ffmpeg or libav for decoding.
* The server does not support different decoders and always uses ffmpeg or libav for decoding.
* Some clients rely on a response for the decoder commands (e.g. ncmpccp) therefor return something
* valid for this command.
*/
@ -704,7 +704,7 @@ parse_filter_window_params(int argc, char **argv, bool exact_match, struct query
if (!tagtype)
{
DPRINTF(E_WARN, L_MPD, "Parameter '%s' is not supported by forked-daapd and will be ignored\n", argv[i]);
DPRINTF(E_WARN, L_MPD, "Parameter '%s' is not supported and will be ignored\n", argv[i]);
continue;
}
@ -1210,8 +1210,8 @@ mpd_command_setvol(struct evbuffer *evbuf, int argc, char **argv, char **errmsg,
/*
* Command handler function for 'single'
* Sets the repeat mode, expects argument argv[1] to be an integer.
* forked-daapd only allows single-mode in combination with repeat, therefor the command
* single translates (depending on the current repeat mode) into:
* The server only allows single-mode in combination with repeat, therefore
* the command single translates (depending on the current repeat mode) into:
* a) if repeat off:
* 0 = repeat off
* 1 = repeat song
@ -1250,7 +1250,7 @@ mpd_command_single(struct evbuffer *evbuf, int argc, char **argv, char **errmsg,
/*
* Command handler function for 'replay_gain_status'
* forked-daapd does not support replay gain, therefor this function returns always
* The server does not support replay gain, therefor this function returns always
* "replay_gain_mode: off".
*/
static int
@ -1441,7 +1441,7 @@ mpd_command_playid(struct evbuffer *evbuf, int argc, char **argv, char **errmsg,
id = 0;
if (argc > 1)
{
//TODO [mpd] mpd allows passing "-1" as argument and simply ignores it, forked-daapd fails to convert "-1" to an unsigned int
//TODO [mpd] mpd allows passing "-1" as argument and simply ignores it, the server fails to convert "-1" to an unsigned int
ret = safe_atou32(argv[1], &id);
if (ret < 0)
{
@ -3932,7 +3932,7 @@ mpd_command_sendmessage(struct evbuffer *evbuf, int argc, char **argv, char **er
}
/*
* Dummy function to handle commands that are not supported by forked-daapd and should
* Dummy function to handle commands that are not supported and should
* not raise an error.
*/
static int
@ -4000,7 +4000,7 @@ mpd_command_urlhandlers(struct evbuffer *evbuf, int argc, char **argv, char **er
* Command handler function for 'decoders'
* MPD returns the decoder plugins with their supported suffix and mime types.
*
* forked-daapd only uses libav/ffmepg for decoding and does not support decoder plugins,
* The server only uses libav/ffmepg for decoding and does not support decoder plugins,
* therefor the function reports only ffmpeg as available.
*/
static int
@ -4166,7 +4166,7 @@ static struct mpd_command mpd_handlers[] =
{ "readmessages", mpd_command_ignore, -1 },
{ "sendmessage", mpd_command_sendmessage, -1 },
// Forked-daapd commands (not supported by mpd)
// Custom commands (not supported by mpd)
{ "outputvolume", mpd_command_outputvolume, 3 },
// NULL command to terminate loop
@ -4637,7 +4637,7 @@ mpd_listener_cb(short event_mask)
*
* Artwork is found by taking the uri and removing everything after the last '/'. The first
* item in the library with a virtual path that matches *path/to* is used to read the artwork
* file through the default forked-daapd artwork logic.
* file through the default artwork logic.
*/
static void
artwork_cb(struct evhttp_request *req, void *arg)

View File

@ -237,7 +237,7 @@ struct output_definition
// Request a change of quality from the device
int (*device_quality_set)(struct output_device *device, struct media_quality *quality, int callback_id);
// Authorize forked-daapd to use the device
// Authorize the server to use the device
int (*device_authorize)(struct output_device *device, const char *pin, int callback_id);
// Change the call back associated with a device

View File

@ -264,7 +264,7 @@ struct airplay_session
unsigned short data_port;
unsigned short control_port;
unsigned short events_port;
unsigned short timing_port; // ATV4 has this set to 0, but it is not used by forked-daapd anyway
unsigned short timing_port; // ATV4 has this set to 0, but it is not used by us anyway
/* Pairing, see pair.h */
enum pair_type pair_type;

View File

@ -351,7 +351,7 @@ struct cast_msg_basic cast_msg[] =
.type = CONNECT,
.namespace = NS_CONNECTION,
.payload = "{'type':'CONNECT'}",
// msg.payload_utf8 = "{\"origin\":{},\"userAgent\":\"forked-daapd\",\"type\":\"CONNECT\",\"senderInfo\":{\"browserVersion\":\"44.0.2403.30\",\"version\":\"15.605.1.3\",\"connectionType\":1,\"platform\":4,\"sdkType\":2,\"systemVersion\":\"Macintosh; Intel Mac OS X10_10_3\"}}";
// msg.payload_utf8 = "{\"origin\":{},\"userAgent\":\"owntone\",\"type\":\"CONNECT\",\"senderInfo\":{\"browserVersion\":\"44.0.2403.30\",\"version\":\"15.605.1.3\",\"connectionType\":1,\"platform\":4,\"sdkType\":2,\"systemVersion\":\"Macintosh; Intel Mac OS X10_10_3\"}}";
},
{
.type = CLOSE,
@ -439,7 +439,7 @@ struct cast_msg_basic cast_msg[] =
{
.type = PRESENTATION,
.namespace = NS_WEBRTC,
.payload = "{'type':'PRESENTATION','sessionId':'%s','seqNum':%u,'title':'forked-daapd','icons':[{'url':'http://www.gyfgafguf.dk/images/fugl.jpg'}] }",
.payload = "{'type':'PRESENTATION','sessionId':'%s','seqNum':%u,'title':'" PACKAGE_NAME "','icons':[{'url':'http://www.gyfgafguf.dk/images/fugl.jpg'}] }",
.flags = USE_TRANSPORT_ID | USE_REQUEST_ID,
},
{

View File

@ -18,7 +18,7 @@
/* This file includes much of the boilerplate code required for making an
* audio output for forked-daapd.
* audio output.
*/
#ifdef HAVE_CONFIG_H

View File

@ -595,7 +595,7 @@ stream_open(struct pulse_session *ps, struct media_quality *quality, pa_stream_n
pa_threaded_mainloop_lock(pulse.mainloop);
if (!(ps->stream = pa_stream_new(pulse.context, "forked-daapd audio", &ss, NULL)))
if (!(ps->stream = pa_stream_new(pulse.context, PACKAGE_NAME " audio", &ss, NULL)))
goto unlock_and_fail;
pa_stream_set_state_callback(ps->stream, cb, ps);
@ -932,7 +932,7 @@ pulse_init(void)
pa_threaded_mainloop_set_name(pulse.mainloop, "pulseaudio");
#endif
if (!(pulse.context = pa_context_new(pa_threaded_mainloop_get_api(pulse.mainloop), "forked-daapd")))
if (!(pulse.context = pa_context_new(pa_threaded_mainloop_get_api(pulse.mainloop), PACKAGE_NAME)))
goto fail;
pa_context_set_state_callback(pulse.context, context_state_cb, NULL);

View File

@ -211,7 +211,7 @@ struct raop_session
/* AirTunes v2 */
unsigned short server_port;
unsigned short control_port;
unsigned short timing_port; // ATV4 has this set to 0, but it is not used by forked-daapd anyway
unsigned short timing_port; // ATV4 has this set to 0, but it is not used by us anyway
/* Device verification, see pair.h */
struct pair_verify_context *pair_verify_ctx;

View File

@ -28,7 +28,7 @@
* - maintain the playback queue
*
* The player thread should never be making operations that may block, since
* that could block callers requesting status (effectively making forked-daapd
* that could block callers requesting status (effectively making the server
* unresponsive) and it could also starve the outputs. In practice this rule is
* not always obeyed, for instance some outputs do their setup in ways that
* could block.

View File

@ -76,7 +76,7 @@ struct player_history
/* Count of song ids in the buffer */
unsigned int count;
/* Circular buffer of song ids previously played by forked-daapd */
/* Circular buffer of song ids previously played */
uint32_t id[MAX_HISTORY_COUNT];
uint32_t item_id[MAX_HISTORY_COUNT];
};

View File

@ -1790,8 +1790,8 @@ initscan()
if (ret < 0)
{
DPRINTF(E_LOG, L_SPOTIFY, "Spotify webapi token refresh failed. "
"In order to use the web api, authorize forked-daapd to access "
"your saved tracks by visiting http://forked-daapd.local:3689\n");
"In order to use the web api, authorize the server to access "
"your saved tracks by visiting http://owntone.local:3689\n");
db_spotify_purge();
@ -1808,7 +1808,7 @@ initscan()
if (ret < 0)
{
DPRINTF(E_LOG, L_SPOTIFY, "libspotify-login failed. In order to use Spotify, "
"provide valid credentials for libspotify by visiting http://forked-daapd.local:3689\n");
"provide valid credentials for libspotify by visiting http://owntone.local:3689\n");
db_spotify_purge();