Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to tell LC to auto-clean ALL *.log files at exit? and cache content? #2058

Closed
4 tasks done
tobwz opened this issue Jun 28, 2024 · 3 comments
Closed
4 tasks done

Comments

@tobwz
Copy link

tobwz commented Jun 28, 2024

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Description

As I found out LC writes a lot of stuff to *.log files (especially in "shared_proto_db" subfolder).
I hate leaving tracks on the hard disk.

How can I tell LC to automatically clean all such *.log files (and cache content) at LC exit?

if this is currently NOT possible:
Can this feature be added in the next release?

Thank you

@mifi
Copy link
Owner

mifi commented Aug 5, 2024

I have no idea what is shared_proto_db. I don't even know which OS you are on. losslesscut should only write files into its appData folder.

see https://github.com/mifi/lossless-cut/blob/master/issues.md#faq (Where is application data, settings and temp files stored?)

so you should be able to delete that folder and the log will be gone too. If you have evidence that losslesscut writes files outside of that directory, then please elaborate.

note that losslesscut is not a portable app so it has to write temporary files and config to the appData folder in order to function properly, see also #645
I'm probably not going to change that, because most users would want their settings and app state to be remembered and not deleted every time the app closes.

If you want this behaviour you could write a wrapper script. something like this (assuming MacOS):

losslesscut-wrapper.sh

#!/bin/bash
/path/to/LosslessCut
rm -rf ~/'Library/Application Support/LosslessCut'

then chmod +x losslesscut-wrapper.sh and run this wrapper instead of LosslessCut directly

@mifi mifi closed this as completed Aug 5, 2024
@tobwz
Copy link
Author

tobwz commented Aug 6, 2024

I have no idea what is shared_proto_db. I don't even know which OS you are on. losslesscut should only write files into its appData folder.

shared_proto_db is a sub folder of LosslessCut Portable Apps.
I am using LC on Windows 10

so you should be able to delete that folder and the log will be gone too.

Yes, I can delete such files manually. The problem is that I have to do it manually.
LC should remove them automatically at exit to avoid leaving tracks.

note that losslesscut is not a portable app

What would you call:
https://portableapps.com/apps/music_video/lossless-cut-portable

so it has to write temporary files and config to the appData folder in order to function properly, see also #645 I'm probably not going to change that, because most users would want their settings and app state to be remembered and not deleted every time the app closes.

Yes, no problem. During running and processing LC can create as much files as it needs.
I am asking for AUTOMATIC removal of unnecessary files at exit. And cache files are unnecessary beyond exit.
Keeping settings is welcomed. But not cache and log files.
An option to enable or disable auto-cleanup should be added.

If you want this behaviour you could write a wrapper script. something like this (assuming MacOS):

losslesscut-wrapper.sh

#!/bin/bash
/path/to/LosslessCut
rm -rf ~/'Library/Application Support/LosslessCut'

then chmod +x losslesscut-wrapper.sh and run this wrapper instead of LosslessCut directly

Yes, I can do that manually. But this feature should be a built-in part of LC.
It shouldn't be difficult to implement.

@mifi
Copy link
Owner

mifi commented Aug 13, 2024

What would you call: https://portableapps.com/apps/music_video/lossless-cut-portable

This is an unofficial version, not maintained by me. You will have to ask portableapps.com or their maintainer of the losslesscut portable version about it. the original LosslessCut is not a portable app.

Cache files are needed for performance. Log files may be needed for debugging or other purposes. So I would have to implement an option in order to disable/enable auto deletion of these files. However considering that losslescut is not a portable app, I'm not sure I want the added code and maintenance that comes with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants