tubesync icon indicating copy to clipboard operation
tubesync copied to clipboard

NFO/jpg not saving to same folder as content/metadata.

Open NeuralMiner opened this issue 3 years ago • 3 comments

Hello. Odd issue. When I set the media format to nest the files inside of a folder (I use the year), it doesn't place the extra nfo and jpg files in the same folder as the video and metadata files; it places them in the root folder. The media format I'm using: Season {yyyy}/{title} {mm}{dd} [{key}].{ext}

Screenshot of directories: image

image

NeuralMiner avatar Dec 14 '22 04:12 NeuralMiner

Saving media itself into subdirectories was never fully tested really so this isn't too surprising a bug. Thanks for reporting it, should be reasonably easy to fix.

meeb avatar Dec 14 '22 05:12 meeb

https://github.com/meeb/tubesync/blob/e871983707ae202bbd6c1eb4b96f0b91da5923f1/tubesync/sync/models.py#L1094

seems like if we always preferred the else it would work no?

mogorman avatar Feb 15 '23 15:02 mogorman

No, when the media item is not downloaded the filename is effectively the "future filename" created from parameters set in the source (such as desired resolution etc.). This changes if the source is updated. Always using self.filename would cause the reference to the filename that's actually downloaded (and therefore a fixed name of a file on disk once downloaded) to break.

meeb avatar Feb 15 '23 16:02 meeb