mpv-player / mpv-player/mpv

Error parsing watch later files

Open
#13,016 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Important Information

Provide following Information:

Reproduction steps
  1. use this script
mp.msg = require("mp.msg")
mp.utils = require("mp.utils")
mp.add_hook("on_preloaded", 50, function()
	local stream_opts = mp.get_property_native("file-local-options/stream-lavf-o")
	mp.msg.warn(mp.utils.to_string(stream_opts))
	stream_opts["cookies"] = "test1=123; path=/; domain=.example.com;\r\ntest2=aaa; path=/; domain=.example.com;\r\n"
	mp.set_property_native("file-local-options/stream-lavf-o", stream_opts)
end)
  1. mpv --save-position-on-quit --watch-later-options-append=stream-lavf-o <FILE>
  2. quit mpv
  3. reopen file on Step 2
Expected behavior

no errors

Actual behavior
watch_later/<MD5>:3: fixed-length quoting expected - put "quotes" around the option value if you did not intend to use this, but your option value starts with '%'
Error parsing option test2 (option not found)
watch_later/<MD5>:4: setting option test2='aaa; path=/; domain=.example.com;' failed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the supplied Lua script and the mpv command, then inspect the generated watch_later/ file and the reported option-parsing errors. Trace the watch-later loading path from that file. Done means reopening the file produces no parsing or option-setting errors for the saved stream-lavf-o cookies.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.