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

Fixed autosaving of playlist not working on linux #357

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

nolyn
Copy link
Contributor

@nolyn nolyn commented Apr 21, 2021

I actually never used the autosave feature so far. but now that i'm looking into #353 I realized it doesn't work for me at all in the current version. The reason is that on Linux absolute paths are saved as "file:///xxx" for path "/xxx". QUrl does this. When reading QString was used and no conversion to the latter (required) representation occurred. Fixed by letting QUrl do the conversion. Strangely it only affects the autosave feature. Playlists stored to files worked before. It was still able to find the files using the relative paths.
Why do we actually need QUrl for storing paths in the first place? I guess YUView can also load web links?
The change needs to be tested again on Windows and Mac, which I can't do. I suspect the bug was also present on Mac before.

@ChristianFeldmann
Copy link
Member

Nice thank you for catching this. I will:

  • Check why are we using QUrl (I think it was to get the relative path?!? )
  • Test the fix on Windows / Ubuntu

@ChristianFeldmann
Copy link
Member

Aah I think now I understand the issue. I also debugged the code a bit on Windows and the QUrl code you added does not work on windows.

@ChristianFeldmann
Copy link
Member

@nolyn I removed all the QUrl stuff and am just using the QDir::absolut and relative path functions. Can you double check if this works for the bug that you discovered? For me YUView is now able to get the aboslute file path for all files on windows and mac.

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.

2 participants