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

Playlist not sorted properly #284

Closed
halleygen opened this Issue Nov 15, 2018 · 6 comments

Comments

4 participants
@halleygen
Copy link

halleygen commented Nov 15, 2018

  • Do you want to request a feature or report a bug?
    Report a bug

  • What is the current behavior?
    I have a playlist of files titled "Chapter 1", "Chapter 2", "Chapter 3", etc. When I try to sort them using the new sort feature added in v3.2.0 they are sorted as: "Chapter 1", "Chapter 10", "Chapter 11", "Chapter 2", instead of the correct order (like in Finder or Files.app)

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo / screenshot / screen recording of the problem.
    img_d4fec02a4d4b-1

  • What is the expected behavior?
    For the files to be ordered correctly, like in Finder or Files.app

  • What is the motivation / use case for changing the behavior?
    To be able to listen to audiobooks broken into multiple files in the correct order

  • Please tell us about your environment:

    • Version of BookPlayer: v3.2.0
    • Your Device and its OS version: iPhone 6s, iOS 12.1
  • Other information
    I think this can be solved by using the NSString.CompareOptions.numeric option to compare filenames when sorting the files

@ryantstone

This comment has been minimized.

Copy link
Collaborator

ryantstone commented Nov 15, 2018

Are you sorting on filename or on title?

@halleygen

This comment has been minimized.

Copy link

halleygen commented Nov 15, 2018

Filename, but I just tried and sorting by the title doesn’t work properly either.

@ryantstone

This comment has been minimized.

Copy link
Collaborator

ryantstone commented Nov 15, 2018

Ok. I’ll take a look. Thanks for pointing it out.

@pichfl pichfl added the bug label Nov 16, 2018

@pichfl pichfl added this to the v3.2.1 milestone Nov 24, 2018

@pichfl pichfl added this to 3.2.1 in Roadmap Nov 24, 2018

@GianniCarlo

This comment has been minimized.

Copy link
Collaborator

GianniCarlo commented Dec 11, 2018

I ran into this while I was refactoring some things, turns out we had to use .numeric as an option for the NSSortDescriptor. The fix is included in the batch edit PR #289

GianniCarlo added a commit that referenced this issue Dec 12, 2018

GianniCarlo added a commit that referenced this issue Dec 12, 2018

GianniCarlo added a commit that referenced this issue Dec 12, 2018

@GianniCarlo GianniCarlo referenced this issue Dec 12, 2018

Merged

Fix sorting #290

GianniCarlo added a commit that referenced this issue Dec 13, 2018

GianniCarlo added a commit that referenced this issue Dec 13, 2018

@GianniCarlo

This comment has been minimized.

Copy link
Collaborator

GianniCarlo commented Dec 14, 2018

closed by #290

@halleygen

This comment has been minimized.

Copy link

halleygen commented Dec 21, 2018

This works great in the new update. Thanks for you hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment