[GH-ISSUE #151] Media Path not working #104

Closed
opened 2026-02-26 02:32:08 +03:00 by kerem · 18 comments
Owner

Originally created by @OmgImAlexis on GitHub (Dec 28, 2015).
Original GitHub issue: https://github.com/koel/koel/issues/151

When I try to add music using the settings page I enter /Users/xo/Desktop/Music, click scan and then get Error: The media path field is required..

Originally created by @OmgImAlexis on GitHub (Dec 28, 2015). Original GitHub issue: https://github.com/koel/koel/issues/151 When I try to add music using the settings page I enter `/Users/xo/Desktop/Music`, click scan and then get `Error: The media path field is required.`.
kerem 2026-02-26 02:32:08 +03:00
Author
Owner

@YugalXD commented on GitHub (Dec 28, 2015):

Use full absolute path starting the root /home/username/Desktop/Music/

<!-- gh-comment-id:167492808 --> @YugalXD commented on GitHub (Dec 28, 2015): Use full absolute path starting the root /home/username/Desktop/Music/
Author
Owner

@OmgImAlexis commented on GitHub (Dec 28, 2015):

That is absolute, I'm on OSX. /Users/xo/Desktop/Music/ is the full path.

<!-- gh-comment-id:167493270 --> @OmgImAlexis commented on GitHub (Dec 28, 2015): That is absolute, I'm on OSX. `/Users/xo/Desktop/Music/` is the full path.
Author
Owner

@YugalXD commented on GitHub (Dec 28, 2015):

try by removing the last forward-slash.

<!-- gh-comment-id:167493430 --> @YugalXD commented on GitHub (Dec 28, 2015): try by removing the last forward-slash.
Author
Owner

@OmgImAlexis commented on GitHub (Dec 28, 2015):

Tried that too, I've tried relative, absolute, smb, ftp. No file paths seem to be working at all. I'm assuming this is OS X specific considering no one else seems to have had this issue.

<!-- gh-comment-id:167493571 --> @OmgImAlexis commented on GitHub (Dec 28, 2015): Tried that too, I've tried relative, absolute, smb, ftp. No file paths seem to be working at all. I'm assuming this is OS X specific considering no one else seems to have had this issue.
Author
Owner

@YugalXD commented on GitHub (Dec 28, 2015):

try by using a cmd sync function php artisan koel:sync

<!-- gh-comment-id:167493713 --> @YugalXD commented on GitHub (Dec 28, 2015): try by using a cmd sync function <code>php artisan koel:sync</code>
Author
Owner

@OmgImAlexis commented on GitHub (Dec 28, 2015):

➜  koel git:(master) ✗ php artisan koel:sync
Media path hasn't been configured. Exiting.
<!-- gh-comment-id:167494059 --> @OmgImAlexis commented on GitHub (Dec 28, 2015): ``` ➜ koel git:(master) ✗ php artisan koel:sync Media path hasn't been configured. Exiting. ```
Author
Owner

@YugalXD commented on GitHub (Dec 28, 2015):

have the media path in setting and restart the koel, and please check the permission for the folder maybe its not accessible by koel.

<!-- gh-comment-id:167494853 --> @YugalXD commented on GitHub (Dec 28, 2015): have the media path in setting and restart the koel, and please check the permission for the folder maybe its not accessible by koel.
Author
Owner

@OmgImAlexis commented on GitHub (Dec 28, 2015):

Tried that too, it's running as my user xo and the paths that I've tried include on the desktop of the user I'm running koel as.

<!-- gh-comment-id:167508985 --> @OmgImAlexis commented on GitHub (Dec 28, 2015): Tried that too, it's running as my user `xo` and the paths that I've tried include on the desktop of the user I'm running koel as.
Author
Owner

@sup commented on GitHub (Dec 28, 2015):

I'm having the same issue on OSX

<!-- gh-comment-id:167544417 --> @sup commented on GitHub (Dec 28, 2015): I'm having the same issue on OSX
Author
Owner

@Erreur32 commented on GitHub (Dec 28, 2015):

The same for me , on Debian with full path:
"error: The media path is required"

Permissions and Path was ok !
Can we set PAth in config file ? to try with this command : php artisan koel:sync

<!-- gh-comment-id:167562556 --> @Erreur32 commented on GitHub (Dec 28, 2015): The same for me , on Debian with full path: "error: The media path is required" Permissions and Path was ok ! Can we set PAth in config file ? to try with this command : php artisan koel:sync
Author
Owner

@YugalXD commented on GitHub (Dec 28, 2015):

you can set it in your database table settings and edit the key 'media_path' and edit it to your path value like this: s:17:"/home/yugal/Music";

<!-- gh-comment-id:167563747 --> @YugalXD commented on GitHub (Dec 28, 2015): you can set it in your database table settings and edit the key 'media_path' and edit it to your path value like this: s:17:"/home/yugal/Music";
Author
Owner

@tomcodes commented on GitHub (Dec 28, 2015):

Of course since this is serialized data you need to adapt the 17 to whatever string length you put as a path.

<!-- gh-comment-id:167567483 --> @tomcodes commented on GitHub (Dec 28, 2015): Of course since this is serialized data you need to adapt the 17 to whatever string length you put as a path.
Author
Owner

@Erreur32 commented on GitHub (Dec 28, 2015):

after database modification it's working well on Debian !

Koel syncing started. All we need now is just a little patience…
Completed! 9800 new or updated songs(s), 0 unchanged song(s), and 133 invalid file(s).```
<!-- gh-comment-id:167575077 --> @Erreur32 commented on GitHub (Dec 28, 2015): after database modification it's working well on Debian ! `````` bash Koel syncing started. All we need now is just a little patience… Completed! 9800 new or updated songs(s), 0 unchanged song(s), and 133 invalid file(s).``` ``````
Author
Owner

@Beanow commented on GitHub (Dec 28, 2015):

Confirming here as well the sync button in the UI is not working as expected.
The issue seems to be the request body which is not formatted as the advertised JSON.

POST /api/settings HTTP/1.1
...
Content-Length: 10
...
Content-Type: application/json;charset=UTF-8
Accept: application/json, text/plain, */*
X-Requested-With: XMLHttpRequest
...

Request body:
/var/music
<!-- gh-comment-id:167598882 --> @Beanow commented on GitHub (Dec 28, 2015): Confirming here as well the sync button in the UI is not working as expected. The issue seems to be the request body which is not formatted as the advertised JSON. ``` POST /api/settings HTTP/1.1 ... Content-Length: 10 ... Content-Type: application/json;charset=UTF-8 Accept: application/json, text/plain, */* X-Requested-With: XMLHttpRequest ... Request body: /var/music ```
Author
Owner

@phanan commented on GitHub (Dec 29, 2015):

Hmm. Let me take a look.

<!-- gh-comment-id:167689661 --> @phanan commented on GitHub (Dec 29, 2015): Hmm. Let me take a look.
Author
Owner

@phanan commented on GitHub (Dec 29, 2015):

Fixed. Laravel 5.2 changed Eloquent's lists() behavior, and I missed this in my tests. Sorry guys.

<!-- gh-comment-id:167690277 --> @phanan commented on GitHub (Dec 29, 2015): Fixed. Laravel 5.2 changed Eloquent's `lists()` behavior, and I missed this in my tests. Sorry guys.
Author
Owner

@sup commented on GitHub (Dec 29, 2015):

👍 Thanks for the fix!

<!-- gh-comment-id:167692146 --> @sup commented on GitHub (Dec 29, 2015): :+1: Thanks for the fix!
Author
Owner

@phanan commented on GitHub (Dec 29, 2015):

Just do a git fetch --all && git checkout v1.1.1 and you should be set. Updated the docs as well.

<!-- gh-comment-id:167692526 --> @phanan commented on GitHub (Dec 29, 2015): Just do a `git fetch --all && git checkout v1.1.1` and you should be set. Updated the docs as well.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#104
No description provided.