Open aminnausin opened 3 months ago
i did this but its still folder/video name I remember making a comment somewhere how this was bad but its lost now. I need to use like video size and date with the name or something instead of folder
Ok so what should happen?
For folders, moving between categories should not be supported. This is due to there being no real unique data on a folder. I could do it based on date but thats not the point.
The point with folders is that if category/folder1 is deleted and then later on it is recreated, it should use the same metadata. You should not be able to move folders end of story.
With videos, similarly, if deleted and recreated, they should use the same metadata. If the video is moved to another folder or the folder is renamed, it should still use the same metadata. The composite id should come from the category/folder/video name but in order to support moving, I need to use a uuid somewhere on the video file itself. This can probably be left out for now but perhaps I can add a uuid on the video through ffmpeg and check it during ffprobe
With that, the current implementation is actually correct.
The only purpose served by the composite id is to reuse the same metadata if a folder or video is deleted and recreated.
the anti deletion system works good
If I embed a uuid in addition to the composite id on each video row, It will support deletion and movement because if i delete a video with a uuid embedded and replace it, the embedded data is obviously gone
i have to embed uuid during indexing and that might time it out
Now You can rename folders and keep all the metadata. It works well. Indexing is async now since it uses ffprobe its like 5 seconds for a 25 minute video on a 13600k
I can also delete videos and replace them and keep the folder / video name in my history record. previously the name would get lost or if the name was saved the folder would be 'deleted'. It also supports id so if you move the video and it gets a new id, the history record will point to the new id and you can still use it as a link to the video
its done but like it remakes every file since u cant edit the metadata of a file directly. so like im happy with it but im not confident letting it have access to my 17000 videos 💀 also idk if nixos will allow it since its read write and delete / copy permissions on the nas folder now which is owned by root and not nginx
also if there are uuids but the db doesnt know, it will replace the video anyway. Maybe it shouldnt but the benefit is that i could do the processing on another pc but it doesnt really make sense
Please save metadata separately from file data so that view counts names and descriptions are not deleted when a folder is moved or renamed. It should re-scan and re-connect :(