Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issue on scan adding music #763

Closed
Vijou01 opened this issue May 26, 2020 · 6 comments
Closed

Issue on scan adding music #763

Vijou01 opened this issue May 26, 2020 · 6 comments
Labels

Comments

@Vijou01
Copy link

Vijou01 commented May 26, 2020

Hello,
Sorry about my english...

I'm trying to use the Music add-on but I have somme issues:

  • My music is uploaded on my nextcloud server in a specific directory.
  • Works perfectly with the default audioplayer. The titles are scanned, are showing and can be played.
  • in the music app, i specified my music directory in the settings
  • in the main windows a message says "new content detected, click here to scan"
  • When i beggin to scan, the number appearing ( x/14 files) fits ne number of files in my directory
  • At the end of the scan, nothing change, my files doesn't appears, and i'm back to the "click here to scan" part.

I tried multiple things: differents tracks, different file formats(.mp3 .wav,etc). Uninstall the music add on and the audio player add on before reinstall the music add on.

But nothing seems to work.

Is there someone here to help me ?

Thanks !

Vijay

@paulijar
Copy link
Collaborator

Thanks for the report. That is not something which I would have seen or heard of before.

Which version of ownCloud or Nextcloud are you using? Which version of the Music app? Which database management system and which PHP version?

After the failed scan, can you find any more info from owncloud.log or nextcloud.log (depending on which one you use)?

@paulijar paulijar added the Bug label May 26, 2020
@Vijou01
Copy link
Author

Vijou01 commented May 27, 2020

Hi, and thanks for your answer.
Some information:
Nextcloud V15, updated to 16, the issue stays though
Music app V0.14.1 installed via the nextcloud app menu
Database: MySQL 5.7
PHP 7.3

The nextcloud.log gave me the answer, the fopen function was disabled. Which is strange because i'm pretty sure I enable it when i installed nextcloud. Was it disabled during a PHP version update ? Anyway all settled, and works like a charm.

Sorry for wasting your time and thanks for your help !

@paulijar
Copy link
Collaborator

paulijar commented May 27, 2020

Okay, glad you could work it out. When you say that fopen was disabled, do you mean that the PHP option allow_url_fopen was off? Or is there some other way to disable fopen?

@Vijou01
Copy link
Author

Vijou01 commented May 28, 2020

Yes exactly, the option allow-url-fopen was off. Can't tell you why...
As said I'm pretty sure i switched it on before installing nexcloud last year.

@paulijar
Copy link
Collaborator

Okay, it might be good idea for me to try to make the app fail more gracefully in case allow_url_fopen = false. You are probably not the only user who will run into this, so it would be nice if the app could tell directly what is wrong.

paulijar added a commit that referenced this issue May 9, 2021
Eight years ago, there may have been some reason to disable scanning if the
php.ini file didn't have the option `allow_url_fopen` enabled. However,
nowadays there doesn't seem to be any reason for that; the scanning works
just fine without it. Also, it's pointless to try to enable it within the php
code because that will never work because of the security reasons.

Where the `allow_url_fopen` is actually needed, is to fetch the data from
Last.fm in case the integration is enabled. But even there, there's no reason
to check the status of the setting separately because fetching the data will
just fail and emit an understandable error message to the log which will guide
the admin to the root cause.

refs #763
@paulijar
Copy link
Collaborator

After finally spending some time to investigate this, I couldn't find any valid reason to require allow_url_fopen for scanning. It probably has been necessary at some point in the past but the reason has vanished a long since as the logic has been modified. Hence, I now removed any checks for this php.ini flag and the scanning should work just fine regardless of its value. This change is included in the brand new Music v1.2.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants