-
Notifications
You must be signed in to change notification settings - Fork 10
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
Indexing mp3 gives 0 length #20
Comments
those are likely "VBR" and we don't guess the size neither we compute the size, we'd only do that for "CBR", where the computation is simple. Do you really need it? If so, do you consider using |
I need it because I have an (HTTP) API where clients expect that information in listings of albums, tracks, playlists, etc. so they can show the duration before they got all the files. I am doing it right now manually (only for mp3's which have 0 as the duration in the database) every time they send a request as a workaround. But that is obviously sub optimal because I need to touch the files on every request which slows everything down quite a lot, when this information could be stored in the database. What do you mean by |
Ah, I get what you mean. LMS has the goal to scan as fast as possible and computing VBR length would impact. Actually most software I see out there just skip VBR and calculate on demand, when file is accessed the first time. I recall even iTunes did it. What if you follow the same and cache the As for |
Yes that would work quite ok I think. How would I chose the Generic plugin instead of the native one, would it be during compile time or during runtime? I guess there is no documentation about this? At least I wasn't able to find it yet. Same with documentation about the classes for the |
Depends on how you use it. If you use LMS as a library, register plugins you want with If you use the daemon (from your description you may be here), then you can use Just be aware that if you use D-Bus activation it will execute the command as defined in Last but not least, the daemon will automatically use all available plugins. So if you disable As for documentation, only the daemon's help. It should be self-documented. As for categories (ie: BTW, it's nice to see more people are trying to use it. If you can share where you're using it and how did you find about LMS, I'd appreciate :-) I wrote this a long ago for Maemo (Nokia Internet Tablet OS), then it was used by some Asian people doing media boxes and more recently Tizen IVI folks (which originated the daemon request). |
Thanks for the explanation, actually it didn't occur to me that this was supposed to be used as a library because it works so nice selfcontained with the daemon. Ok cool then I think I get it how to use the We used it in some projects at work (mostly proof of concepts and prototypes), we're also in the IVI domain, we even have a fork of it on our Github https://github.com/Pelagicore/Media-Manager-lightmediascanner-patched sadly not really is a upstreamable state. But I'm writing an alternative Subsonic-server in Go because the original one is in Java and too heavy for my Raspberry Pi. I'm making the HTTP-API compatible so I can still use their clients. LMS seemed a nice fit for something which will run on a Raspberry Pi, that way I don't need to reinvent the wheel and can concentrate on just the API part. This is my project: https://github.com/jeena/sonicmonkey but I just started like a week ago and it's my first project in Go. |
Sorry about the delay to reply. LMS was a library in order to avoid complex interactions and overhead. For instance, if you have a single application using it, it's much more efficient to use it from a thread than to do via a DBus daemon and cope with the overhead to do simple things like get the progress. Then, I guess after you get it working it would be a nice addition to write bindings in Go for it. Keep the LMS in its own thread, communicate via |
When I scan mp3 files then the length column in the audios table is always 0. You can try it with for example: https://www.jamendo.com/album/154762/feather-and-stone
I cloned the latest version from github and compiled it with:
And then I ran it with:
Then I opened ~/.config/lightmediascannerd/db.sqlite3 with sqlite3 and run:
That is where I only get as many 0 as I have mp3 files.
The text was updated successfully, but these errors were encountered: