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

Library: Sort by recently played #459

Closed
pichfl opened this issue May 6, 2020 · 14 comments
Closed

Library: Sort by recently played #459

pichfl opened this issue May 6, 2020 · 14 comments

Comments

@pichfl
Copy link
Collaborator

pichfl commented May 6, 2020

Extracted from #456 - #456 (comment)

I think this is something much more doable: Currently I'm only seeing sort by Title or Original File name, so it would be great if there was a way to sort audio files played by most Recent (recently played).

@iamLoi
Copy link

iamLoi commented May 6, 2020

I may be able to take a stab at this. Could you give me some direction - for instance, which class does the library gets loaded and where are the sorting options that I need to change? My hunch would be the PlayListSortOrder within BookSortService class, is this correct and is that the only place that changes need to be made?

@GianniCarlo
Copy link
Collaborator

GianniCarlo commented May 6, 2020

Hi @iamLoi !, that would be great, since the Watch app was introduced (or maybe CarPlay 🤔 not sure right now), the LibraryItem abstract class has had the lastPlayDate property. That could be used to sort the books by recently played (actually for CarPlay we use getItemsOrderedByDate in the Library class)

But well, yes you're on the right track, within BookSortService in the enum PlayListSortOrder there should be a new case with the raw value being lastPlayDate, and you should add the new option in the action sheet as well (inside the file ItemListAlerts.swift)

For localization, use the content of the carplay_recent_title key, mmmm or maybe we could rename it from carplay_recent_title to just recent_title and use that everywhere

@GianniCarlo
Copy link
Collaborator

Let me know if you got any other question 👍

@iamLoi
Copy link

iamLoi commented May 6, 2020

Any commands or anything I need to run to get all the dependencies ready to build/run the project? This project uses Carthage so I ran carthage update --platform macOS but it's showing Carthage as deprecated (?) and runs still fail due to different modules not available (SwiftReorder in particular). I haven't done much Swift or Xcode programming so this is new for me.

@iamLoi
Copy link

iamLoi commented May 6, 2020

I made another branch and pushed my changes. Please verify and let me know if there's anything missing, otherwise feel free to merge it.

@pichfl
Copy link
Collaborator Author

pichfl commented May 6, 2020

@iamLoi ❤ thanks for joining the effort. To allow us to merge or review your work, you need to create a fork and create a pull request.

@GianniCarlo
Copy link
Collaborator

@iamLoi I'll leave my comments on the PR 👍

@mmurali88
Copy link
Contributor

@GianniCarlo If is this still pending, can i take a stab at it ?

@GianniCarlo
Copy link
Collaborator

sure!, there's a PR opened #460 but after some feedback about project building, there hasn't been any updates to it. So you're welcome to do it 👌

@mmurali88
Copy link
Contributor

@GianniCarlo Thanks a lot. That PR was confusing for me and had many unwanted changes. I have implemented here in this PR

#475

@mmurali88
Copy link
Contributor

@GianniCarlo can you close this issue ? The PR is merged

@GianniCarlo
Copy link
Collaborator

wops I forgot 😅, closing it now 👍

@pichfl
Copy link
Collaborator Author

pichfl commented Jul 7, 2020

@mmurali88 if you add Closes #number to the description of the PR, the reference and closing will happen automatically when the PR is merged 👍

@mmurali88
Copy link
Contributor

@mmurali88 if you add Closes #number to the description of the PR, the reference and closing will happen automatically when the PR is merged 👍

Thanks @pichfl . Will do that going forward

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

No branches or pull requests

4 participants