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

Windows GUI: Use file folder and name as export default for single file #847

Merged
merged 1 commit into from
May 29, 2024

Conversation

cjee21
Copy link
Collaborator

@cjee21 cjee21 commented May 28, 2024

When only a single file is open in MediaInfo, use that file's name and folder as the default when exporting instead of MediaInfo's AppData directory.

Not sure if can consider issue #741 as resolved since this PR is only for when there is a single file open.

@JeromeMartinez JeromeMartinez linked an issue May 28, 2024 that may be closed by this pull request
Copy link
Member

@JeromeMartinez JeromeMartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a risk to overwrite the original file (there is now a warning if the file exist, but default to an existing file is a source of problems as people use to click on every window box).
Please append ".MediaInfo.xml" (if XML output, else ".txt" etc).

@cjee21
Copy link
Collaborator Author

cjee21 commented May 29, 2024

Made the change. Now it will retain the file extension and add .mediainfo before the exported file extension. So even if user has files with same name but one is .mp4 and another .mkv for example, there is also no risk of overwrite.

If filename is my test file.mp4 and export as text,
Original patch: my test file.txt
Now: my test file.mp4.mediainfo.txt

@JeromeMartinez
Copy link
Member

Now: my test file.mp4.mediainfo.txt

Oops, I missed that the extension is already there.
Please "mediainfo" --> "MediaInfo" (I am a uppercase letters addict).

@JeromeMartinez JeromeMartinez merged commit fb46989 into MediaArea:master May 29, 2024
3 checks passed
@cjee21 cjee21 deleted the export branch May 29, 2024 11:41
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

Successfully merging this pull request may close these issues.

Save export with same filename and location as original.
2 participants