ukdtom / SRT2UTF-8.bundle

Plex Agent, that'll convert sidecar subtitle files into UTF-8, if not
126 stars 14 forks source link

permission problem #54

Closed Petterooe closed 3 years ago

Petterooe commented 3 years ago

Hi! I came across a hard to find problem when copy videos on Ubunty 18.04 . Normally I go to the folder by a symlink but this time I went by the real path, then the top folder had another owner and I got permission drwxr-sr-x instead of normally drwxrwsr-x. I noticed difference when I deleted files they not went to the trash bin but a message about permanent delete came up instead. But I could copy the videos so I not think so much about it. This led to more than 50 subtitles were deleted by the plugin. It was not consistent sometimes the plugin manage to create to the backup file, but mostly the subfile was gone not one time the plugin could create the utf-8 file. It should be about permission plex runs as user plex and normally have group write permission in this folder. This time the group did not have write permission, why the plugin got half way permission so it could sometimes create backup file but not the utf-8 file and delete original file I not understand. Maybe there could be a test in the plugin for full permission before handle the file?

ukdtom commented 3 years ago

Since plugin's are going away, I stopped developing anymore for them And already doesn't work with the new Primary agents from Plex (Native, and isolated from the python framework)

Petterooe commented 3 years ago

OK! that's sad news. I now use your code as a module in an encoding script, I hope you transform your script to a module later. I just want to confirm that it was not your script causing .srt files to vanish, it was poorly written thunar explorer in ubuntu. Thunar can't handle concurrent calls. When Plex or a plugin reads .srt files the same time as I rename,copy,paste,delete srt files Thunar breaks with no warnings. The recommendation from me is to always shut down plex when editing files on linux.