Git Product home page Git Product logo

Comments (6)

DanhKE6D avatar DanhKE6D commented on August 17, 2024

I am working on fixing this too. Currently when browsing files, json rpc reports the file types as "unknown" because I don't believe it reads the media metadata during browsing. Should I assume the media type based on file extension(s) then?

from kore.

SyncedSynapse avatar SyncedSynapse commented on August 17, 2024

No, don't use the file extensions. Files.GetDirectory also receives a parameter "Media" which should filter the type of files it returns. Have you tried it?

from kore.

SyncedSynapse avatar SyncedSynapse commented on August 17, 2024

@DanhKE6D
I've played a little bit with Files.GetDirectory, and it really should be invoked with the parameters media and properties.
media filters the output: if you set it to video it only returns videos, etc.
properties makes it return much more info, including metadata. Take a look at the jsonrpc to check what can be in there.

Check a request like this:
{"jsonrpc":"2.0","id":1, "method":"Files.GetDirectory", "params":{"directory":"/home/amsilva/Public/Music Videos/","media":"video","properties":["file","mimetype","title","size","thumbnail","fanart","album","artist","track","showtitle","season","episode","year","duration"]}}

If the files are on your library it returns all of the metadata, and even if it isn't, it at least returns the thumbnail, which can be used to set the picture on each row.
Nice.

I'll have some time tomorrow, and i can start this. Have you changed anything yet?

from kore.

DanhKE6D avatar DanhKE6D commented on August 17, 2024

@SyncedSynapse
I was quite busy the last couple days. I started to fix the back key so that it would traverse one directory up. I still need to store and restore the current directory after rotation is completed. If you have time, please start it. I will do a PR for #48 after you are done. Thank you.

from kore.

DanhKE6D avatar DanhKE6D commented on August 17, 2024

@SyncedSynapse
I played with the properties that you suggested using the new Files.GetDirectory method that you just extended. Only file, mimetype, and size return relevant values. For example, in video file browsing mode, with the mimetype property selected, only video files are returned even though the directory has a mix of music, video and picture files.
I was hoping to get a thumbnail, but that was not the case.
I will create another PR for this fix.

from kore.

SyncedSynapse avatar SyncedSynapse commented on August 17, 2024

Fixed on a8f9c3e

from kore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.