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

Overview of different file types #1136

Closed
djtulan opened this issue Mar 15, 2024 · 5 comments
Closed

Overview of different file types #1136

djtulan opened this issue Mar 15, 2024 · 5 comments

Comments

@djtulan
Copy link

djtulan commented Mar 15, 2024

I have a questions.
Would it be difficult to show some kind of files statistics of file types of files scanned?

I found out, that the REST API apps/music/api/scanstate shows the number of scanned files
Would it be possible to add a count of different files types. (e.g. mp3, flac, wav, aiff, ...)
"mp3_count": 123, "flac_count": 123 and so on, depending on the file types found?

I made myself a script to count all music files stored in my library.
It gives me the following output:

Total Music Files: 43170
Flac Files: 42629
MP3 Files: 308
AIFF Files: 217
WAV Files: 16

The music app REST API show me that information:
{"unscannedFiles":[],"scannedCount":42967}

So some of the files my script found are not listet in the music app.
I would be very helpful to find you what file types are not scanned.

Also it would be nice to show the content of the scanned files somewhere in the app.
Maybe a good place would be in settings, where also the "Reset Collection" command is located.

@paulijar
Copy link
Collaborator

IMHO, feature like this wouldn't be useful so often and for so many users that it would justify spending the development time and effort needed. Every new feature has the opportunity cost, as there are plenty of alternative features where the same time could be used instead, and the time is a scarce resource.

However, I'm currently working on adding an "Advanced search" view which could be used to dig out also this data by running a few queries on the scanned songs: it will be possible to search e.g. with a rule like "search all songs with filename ending with '.flac'", among the countless other alternatives.

As of today in Music v1.10.0, the similar advanced search feature is already available in the Ampache API. To my knowledge, Ample is the only client which enables you to use this part of the API.

Your other alternative would be to query this directly from the database. Something like this should work:

select mimetype, count(id) from oc_music_tracks where user_id='your_username' group by mimetype;

@djtulan
Copy link
Author

djtulan commented Mar 19, 2024

Do you have any experience to run Ample on a separate server?
I always get CORS errors, because the ample js trys to load code from my nextcloud server.
Any solution how to allow my webserver to access my nextclound music app?

@paulijar
Copy link
Collaborator

No, I haven't tried that. I believe I have read from the Ample page that its developer has intended the Ample sw to be installed on the same server with the Ampache back-end. And if someone wants to use it some other way, then it will be up to the user to solve any CORS issues caused by this. But what would this require, I don't know.

@paulijar
Copy link
Collaborator

Music v1.11.0 now has the Advanced search view which, among other things, allows finding tracks based on the file extension. As that more or less fills the original need described in the OP, I'm closing this issue.

@paulijar paulijar closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2024
@djtulan
Copy link
Author

djtulan commented Apr 22, 2024

The Advanced search view works fine for my needs!

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

No branches or pull requests

2 participants