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

add support to sort by ctime #41

Merged
merged 3 commits into from
Mar 16, 2021
Merged

add support to sort by ctime #41

merged 3 commits into from
Mar 16, 2021

Conversation

issadarkthing
Copy link
Owner

No description provided.

@tramhao
Copy link
Contributor

tramhao commented Mar 15, 2021

It's working, but I have 2 issues,

  1. Open app for the 1st time, it's ok, but 2nd time is't not working, 3rd time is working, just repeat like this. To reproduce it: play a song, and during playing, quite the app. Then open it again, it's ok, but quit and open it'll not sort like the 1st reopen.
  2. Probably the getTagLength in utils.go could change ctime. Or probably it's the verysync service I'm running on my music folder. This service is a p2p synchronize service which keep the music folder the same on my different devices, like resillosync.

Haven't looking into the code so probably not so accurate. Thanks.

@tramhao
Copy link
Contributor

tramhao commented Mar 15, 2021

probably because in my local copy, the getTaglength is modified like in my PR.

@issadarkthing
Copy link
Owner Author

I think it should sort by mtime as mtime is the time at which the file’s contents were last written to disk. This makes more sense since renaming an audio file should not be sorted first.

@issadarkthing issadarkthing merged commit 4875871 into master Mar 16, 2021
@issadarkthing issadarkthing deleted the sort-playlist branch March 16, 2021 13:36
@issadarkthing
Copy link
Owner Author

mtime changes if tag is changed but does not change if renamed
ctime changes if audio file is renamed but does not change if tag is changed

There is no exact way to inspect the file creation time except for particular filesystem like ext4.

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