calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.45k stars 235 forks source link

Library queues don't preserve raw file title #935

Open Xaekai opened 2 years ago

Xaekai commented 2 years ago

When queuing an item from a channels saved videos, and that item is a raw file that was given a custom title, that title is not used when queuing from the search interface.

calzoneman commented 2 years ago

This is because search queues secretly just re-fetch the metadata instead of reusing the saved result (the saved info is only used to display those search results). Commit: https://github.com/calzoneman/sync/commit/c152a19624893beee0b0aa77b8676f0498027b44

I guess losing custom titles is an unfortunate side-effect of this. It'd be a little subtle to make this work as expected: if the file actually has the proper title tags embedded in it, then I think the expected behavior would be to take the title from those tags, not the one from the saved library (including if they are different), the only reason to use the one from the library would be if the one in the library was overridden during queueing and the re-processing of the video yields no title.

I'm not really sure if it is worth it to fix this edge case when there are preferable alternatives to ensuring the title is represented correctly:

  1. Using ffmpeg -metadata title="A Cool Video" when encoding, in which case CyTube will detect the title correctly for raw files
  2. Using custom manifests, which ensure that any overrides/customizations to the metadata are explicitly modeled in a resource accessible via a single identifying URL.