Remotely adding sources to XBMC
#1
Is there a way to remotely add sources to the library of XBMC running on the Raspberry Pi via ssh? It is a simple matter to do from the main GUI, but since RaspBMC doesn't offer an option to VNC into it, my remote interaction is limited to ssh.
Reply
#2
You could manually edit the sources.xml (wiki) file in the userdata (wiki) folder. Or even create the sources.xml file on a PC and then transfer the file over.
Reply
#3
Awesome, thanks - this worked.
Reply
#4
Hello,
I address exactly the same issue: raspbmc installed, but no screen to connect, unless yatse on my phone.

I created sources.xml (http://pastebin.com/6TWnnm6i ) pointing on a local folder, but no music shown on my android phone.


Logging turned to level=2 thanks to advancedsettings.xml (http://pastebin.com/0cdNtMJA ) but no obvious message to tell the failure.



I tried to reboot the system, but things remain.

Could this be a yatse issue ?


Reply
#5
The Movies, TV Shows and Music lists on YATSE use the Library of your XBMC installation, which is probably empty.

I'm assuming that you get a message saying "No media. Please use the refresh button to synchronize your library or refine your search." At least, that's what I get! However, if I do synchronize, that message goes away, because I've scanned all my media, I just haven't synchronized YATSE. In your case, that won't work, because the Library itself is empty.

However, if you go to the "Files / Playlists" option on YATSE, you should then have a selection of "Video Files", "Video Playlists", "Audio Files", and "Audio Playlists". In the case of the two files options, you should have a "Database" Folder, an "Addons" folder, and then one folder for each source you've got defined.

But it's not really very useful. You really want to get that stuff scanned into the Library, and I don't think it's possible to do that from YATSE, other than by using its ability to control the selected item in the XBMC user interface, and making XBMC do the scanning. But if you can't *see* the user interface, that's not really viable.

Oh! Wait! I've just had a thought! It's possible to configure the music library to update on startup. In your userdata directory, you should have a guisettings file, which is an XML file containing a section:
Code:
<musiclibrary>
        <albumsscraper>metadata.album.universal</albumsscraper>
        <artistsscraper>metadata.artists.universal</artistsscraper>
        <backgroundupdate>false</backgroundupdate>
        <cleanup></cleanup>
        <downloadinfo>false</downloadinfo>
        <enabled>true</enabled>
        <export></export>
        <import></import>
        <showcompilationartists>true</showcompilationartists>
        <updateonstartup>false</updateonstartup>
    </musiclibrary>
Change the updateonstartup value from false to true, save the file and then reboot. It should, if everything goes right, then load up your library. Of course, the only way to tell whether it's doing so will be to keep resynchronsing your YATSE, and it's not a fast process, so you might have to wait a minute before you see anything at all (and if you've got a large library, it can take hours to complete).


ETA: In YATSE, hit the plus symbol in the top right corner of the screen, and then select "Scan Audio Library" (or Video, as you need).


I'd recommend checking the YATSE Files / Playlists option first, just to check whether you've got your sources configured correctly. And, seriously, it's going to be much, much easier if you can plug it into a display, just to get the whole setup operational. You can unplug it again later, if necessary.
Reply
#6
Hello,

and thank your for the help.

the first trick (updateonstartup) allowed me to find the nas music files through the Yatse interface.
but I can play only one file at a time, and no way to use artists or albums sort method.

Unfortunately the second trick doesnt appear to work: the '+' followed by "scan music library" doesnt help:
I get a huge number of identical debug messages, repeating the 3 following lines

Code:
17:03:54 T:2936804416   DEBUG: JSONRPC: Incoming request: [{"id":0,"jsonrpc":"2.0","method":"Player.GetActivePlayers"},{"id":1,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}]
17:03:54 T:2936804416   DEBUG: JSONRPC: Calling player.getactiveplayers
17:03:54 T:2936804416   DEBUG: JSONRPC: Calling application.getproperties

mut no better indexing in xmbc databases.

I know I should use external display, but I dont have any hdmi compatible device at home.

thus, I think of 3 different ways to fix this:
  • look for the right command to refresh xmbc database
  • install another raspberrypi flavor that would allow me to log graphically (xbian ?)
  • run an xmbc into my desktop virtualbox, configure properly, export configuration and databases to the raspmbc


I tell your when it's fixed.


bye.
Reply
#7
(2013-01-09, 21:28)RichardHitier Wrote: the first trick (updateonstartup) allowed me to find the nas music files through the Yatse interface.
but I can play only one file at a time, and no way to use artists or albums sort method.

Of the top of my head, I've no concrete idea. We'd need the log of the scan to figure it out. And now the files are in the library, re-scanning will just skip over them (unless the modification time on the files is changed). However, my guess would be that the scraper has been unable to to extract the artist or album information from the tags in the file. (The music scraper uses the file tags, unlike the video scraper, which uses file and directory names). I've had this with some of mine, which I thought were fine, but show up different data depending on whether I use a tag reader for mp3 v1 tags or v2.

It's not great, but you should have "Party Mode (Music)" on the '+' menu, which would give you multiple tracks (at least it'd demonstrate it works). Note that it can take some time to build the playlist, so you may not hear anything for a while after invoking it.

If you "Long Press" on an individual track, you get a pop up menu, which should include "Play", "Queue Next", and "Queue" icons, which ought to allow you to (tediously) set up multiple tracks.

Quote:Unfortunately the second trick doesnt appear to work: the '+' followed by "scan music library" doesnt help:
I get a huge number of identical debug messages, repeating the 3 following lines

Code:
17:03:54 T:2936804416   DEBUG: JSONRPC: Incoming request: [{"id":0,"jsonrpc":"2.0","method":"Player.GetActivePlayers"},{"id":1,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}]
17:03:54 T:2936804416   DEBUG: JSONRPC: Calling player.getactiveplayers
17:03:54 T:2936804416   DEBUG: JSONRPC: Calling application.getproperties

mut no better indexing in xmbc databases.
The three lines you've spotted at YATSE continually polling XBMC to find out what's going on. They're perfectly normal, but inconvenient, because you can't see more important information. The Scan Audio Library option won't produce any different results than the scan on startup option: it does exactly the same thing, but does it on demand. The guisetting option runs the scan on every startup (even if you know that nothing's changed), and *only* on the startup (so you'll have to find some convenient time to reload). The reason I put a strikeout through the guisettings instructions was to avoid manual alteration of the file, which *ought* to be done through the system menu instead. However, you've obviously achieved the edit safely Wink

Quote:I know I should use external display, but I dont have any hdmi compatible device at home.

Do you have anything which will accept composite video? In which case you can run a phono-to-phono lead from the Pi.

Quote:thus, I think of 3 different ways to fix this:
  • look for the right command to refresh xmbc database
  • install another raspberrypi flavor that would allow me to log graphically (xbian ?)
  • run an xmbc into my desktop virtualbox, configure properly, export configuration and databases to the raspmbc
  • I'm increasing sure you've got the right command, but there's some sort ot problem with your files.
  • RaspMC doesn't support VNC. I suspect you'd have to go for a full-blown Raspbian install to get some kind of remote visual display.
  • If you've got other machines around, you could install XBMC onto them (you probably don't need the virtual machine, just install it directly onto your windows or linux machine), configure it, and then transfer the entire userdata directory across (which will include the sources, and resulting databases). Be careful to ensure that your paths in the sources will work on both machines (the path itself is stored in the database, so if your desktop machine and Pi need to use different paths, that'll be a problem).
I'd go for the third option. At the very least, it'll get you familiarity with what ought to be going on, and you can figure out the scanning problem on an responsive machine.
Reply
#8
Hello, and thank you very much for your help, and very detailled answer.

- I know run xbian on the pi, but gave up running a distant gui login.
- I installed an xbmc instance on my desktop computer (ubuntu) and began to play with the gui interface, and ended with properly scanning the files (200Go of music) and library is ok on this machine.
- I guess I'll have to scan this tree with a third party tool to get better music recognition (like albums thumbs an all ).
- however, I copied the desktop/userdata dir to the xbian one (file pathes are ok). Directory (file) browsing is ok on the xbian@pi, but still, I dont get the library to work through Yatse. No matter, I'll go on looking for a convenient way to synchronise the two instances.

However, I know can listen to my music stored on a nas outputting it to my hifi.

A big thank to xmbc teams, and also to pi conceptors.
Reply
#9
How to make my Amazon fire tv remote with xbmc - I cannot add file sources - the cursor box and I can't get to the keyboard to enter the http address.

Thank you
Reply
#10
(2012-12-03, 21:54)Ned Scott Wrote: You could manually edit the sources.xml (wiki) file in the userdata (wiki) folder. Or even create the sources.xml file on a PC and then transfer the file over.

But even though editing works, you have to reenter credentials to access.. and it resets on reboot.
How to persist these sources.xml changes?
Reply
#11
(2019-08-03, 19:18)brunis Wrote: How to persist these sources.xml changes? 
Edit the file while kodi is stopped.
Reply

Logout Mark Read Team Forum Stats Members Help
Remotely adding sources to XBMC0