mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 07:53:23 -05:00
[inputs] enable seek on non-live http streams
This commit is contained in:
parent
c36df4fb8e
commit
37ce8dd607
@ -120,6 +120,15 @@ seek(struct input_source *source, int seek_ms)
|
||||
return transcode_seek(source->input_ctx, seek_ms);
|
||||
}
|
||||
|
||||
static int
|
||||
seek_http(struct input_source *source, int seek_ms)
|
||||
{
|
||||
// stream is live/unknown length so obvs can't seek
|
||||
if (source->len_ms == 0)
|
||||
return -1;
|
||||
return transcode_seek(source->input_ctx, seek_ms);
|
||||
}
|
||||
|
||||
static int
|
||||
metadata_get_http(struct input_metadata *metadata, struct input_source *source)
|
||||
{
|
||||
@ -168,4 +177,5 @@ struct input_definition input_http =
|
||||
.play = play,
|
||||
.stop = stop,
|
||||
.metadata_get = metadata_get_http,
|
||||
.seek = seek_http
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user