mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-24 11:37:50 -05:00
Enable resuming playback from saved position for certain media kinds (eg audiobooks)
This commit is contained in:
@@ -335,14 +335,14 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
|
||||
#if LIBAVFORMAT_VERSION_MAJOR >= 54 || (LIBAVFORMAT_VERSION_MAJOR == 53 && LIBAVFORMAT_VERSION_MINOR >= 3)
|
||||
# ifndef HAVE_FFMPEG
|
||||
// Without this, libav is slow to probe some internet streams
|
||||
if (mfi->data_kind == DATA_KIND_URL)
|
||||
if (mfi->data_kind == DATA_KIND_HTTP)
|
||||
{
|
||||
ctx = avformat_alloc_context();
|
||||
ctx->probesize = 64000;
|
||||
}
|
||||
# endif
|
||||
|
||||
if (mfi->data_kind == DATA_KIND_URL)
|
||||
if (mfi->data_kind == DATA_KIND_HTTP)
|
||||
{
|
||||
free(path);
|
||||
ret = http_stream_setup(&path, file);
|
||||
@@ -481,8 +481,8 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
|
||||
|
||||
DPRINTF(E_DBG, L_SCAN, "Duration %d ms, bitrate %d kbps\n", mfi->song_length, mfi->bitrate);
|
||||
|
||||
/* Try to extract ICY metadata if url/stream */
|
||||
if (mfi->data_kind == DATA_KIND_URL)
|
||||
/* Try to extract ICY metadata if http stream */
|
||||
if (mfi->data_kind == DATA_KIND_HTTP)
|
||||
{
|
||||
icy_metadata = http_icy_metadata_get(ctx, 0);
|
||||
if (icy_metadata && icy_metadata->name)
|
||||
|
||||
Reference in New Issue
Block a user