-
Notifications
You must be signed in to change notification settings - Fork 243
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
File view fixes #379
File view fixes #379
Conversation
…ence. It also makes the code clearer by avoiding string acrobatics
Thanks for this. I have some comments on it tough, so i would appreciate if you could review them. |
@@ -323,7 +324,7 @@ private void browseDirectory(final FileLocation dir) { | |||
|
|||
Files.GetDirectory action = new Files.GetDirectory(dir.file, | |||
mediaType, | |||
new ListType.Sort(ListType.Sort.SORT_METHOD_LABEL, true, true), | |||
new ListType.Sort(ListType.Sort.SORT_METHOD_PATH, true, true), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -511,16 +512,15 @@ public boolean onMenuItemClick(MenuItem item) { | |||
case R.id.action_play_from_this_item: | |||
mediaQueueFileLocation.clear(); | |||
FileLocation fl; | |||
// start playing the selected one, then queue the rest | |||
mediaQueueFileLocation.add(loc); | |||
playMediaFile(loc.file); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -717,9 +717,17 @@ public static FileLocation newInstanceFromItemFile(Context context, ListType.Ite | |||
artUrl = itemFile.thumbnail; | |||
break; | |||
case ListType.ItemBase.TYPE_ALBUM: | |||
title = itemFile.displayartist + " | " + itemFile.album; | |||
details = new File(itemFile.file).getName(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
case ListType.ItemBase.TYPE_SONG: | ||
title = itemFile.label; | ||
details = itemFile.displayartist + " | " + itemFile.album; | ||
details = new File(itemFile.file).getName(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Thank you very much for reviewing my PR, I'll rework some of the things according to your comments in the coming days. |
instead add method getFilenameFromPath
I only use Linux, so I can't check if getFilenameFromPath() works with Windows paths, but I copied most of it from getParentDirectory(), so this should work. |
Will this fix problem with sorting episodes by episode number and not by episode title (inside addons) ? Is there a way to pick sort option like in webview ? Related with this: bigretromike/nakamori#209 |
All I can say is that addons will be affected, since the addon section uses MediaFileListFragment. How exactly will depend on the virtual file tree of your addon. You can find details on how Kore handles addons here: #239 |
Sort file lists by path and show filename in details
These patches fix #119 and #65
Screenshots: #65 (comment)
It also contains a fix for http://forum.kodi.tv/showthread.php?tid=278792