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

File view fixes #379

Merged
merged 5 commits into from
May 3, 2017
Merged

File view fixes #379

merged 5 commits into from
May 3, 2017

Conversation

sebastian-de
Copy link
Contributor

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

@SyncedSynapse
Copy link
Member

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.

@@ -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.

@@ -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.

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.

@sebastian-de
Copy link
Contributor Author

Thank you very much for reviewing my PR, I'll rework some of the things according to your comments in the coming days.

Sebastian F added 2 commits May 1, 2017 14:37
@sebastian-de
Copy link
Contributor Author

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.

@SyncedSynapse SyncedSynapse merged commit b42f6f8 into xbmc:master May 3, 2017
@bigretromike
Copy link

bigretromike commented May 17, 2017

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

@sebastian-de
Copy link
Contributor Author

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
It'll be best if you try current Kore master and see if your issue is fixed.
With my changes you'll see the filename of each item in its second row (in this case the virtual filename returned by your addon).

@sebastian-de sebastian-de deleted the FileViewFixes branch May 19, 2017 15:50
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.

Sorting: Files: List ist not sorted by filename
3 participants