Page 1 of 1

Command line version for media scan

PostPosted: Sun Oct 07, 2012 2:43 pm
by sunayanaa
Currently "Scan media folders" can be done using UI.

Is there a command line way to do media scan ??

I would like to do the scan on demand using command line in Unix.

Thanks

Re: Command line version for media scan

PostPosted: Sun Oct 07, 2012 3:08 pm
by hakko
curl?

Re: Command line version for media scan

PostPosted: Tue Oct 09, 2012 6:11 am
by sunayanaa
The following 2 commands executed together worked for me:

wget --cookies=on --keep-session-cookies --save-cookies=/tmp/cookie.txt --user-agent=Mozilla 'http://my-domain/login.view?user=admin_user&password=admin_password'

wget --referer='http://my-domain' --cookies=on --load-cookies=/tmp/cookie.txt --keep-session-cookies --save-cookies=/tmp/cookie.txt 'http://my-domain/musicFolderSettings.view?scanNow'

Re: Command line version for media scan

PostPosted: Tue Oct 09, 2012 6:15 am
by hakko
Nice! Thanks for sharing.