Is it possible to scan for music from the command line? It's a bit of a pain to always have to go specifically and scan for music in the UI, which takes a long time.
Is it possible to scan for music from the command line? It's a bit of a pain to always have to go specifically and scan for music in the UI, which takes a long time.
that is a question I'm trying to find out myself and its strange that you don't see more requests for it...
I haven't found a way to do it by command line yet - not sure if it's possible in the latest version. I did find in the latest version that there is now a "key" option - i.e. in the "Edit Keys" section there's a scan music option, which I've set to Ctrl-S - now anywhere in mythtv if I hit Ctrl-S it will scan. doesn't solve your problem, but makes it easier to scan than it used to be..
Thanks - this could be the solution.
If a key can be mapped then there should be a way to send a key command to mythfrontend, say using the telnet socket:
Telnet socket - MythTV
(but I don't think you can send the Ctrl key)
I think this could probably be automated into a script. I'll try to figure it out later today.
Then you could run the script every day at 4am, or similar. Or at least be able to run it remotely through ssh.
A crude script, seems to work:
And the result:Code:bernie@shinym:~$ cat ./MusicScan #!/bin/bash # # Script to send signal to mythfrontend to scan music files # Change 'f6' to whatever key you've mapped # ( sleep 2 echo key f6 sleep 2 echo quit ) | telnet localhost 6546
Code:bernie@shinym:~$ ./MusicScan Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. MythFrontend Network Control Type 'help' for usage information --------------------------------- # OK # Connection closed by foreign host.
There are currently 1 users browsing this thread. (0 members and 1 guests)