Win MySQL Backend & moving media location
#1
I'll try and keep this as short and poignant as possible.

I have XBMC v11, running with a MySQL back-end. I believe when I rebuilt the main system, due to the advancedsettings file pointing to the SQL back-end, it knew exactly what was there re: moves, music and TV & I didn't have to actually "add a source" for this material - it was just available.

The issue I'm having now, is that I'm upgrading my storage, and will be shifting the location of it all, and am unable to "remove" the source of this material via XBMC, because there's no sources listed for music, movies or TV. Is there a way to do this, without actually deleting the SQL database in the back-end, adding the new source location, and re-scraping all the information - which I now realise will also lose all the watched and resume status of my media.

I have a bad feeling it'll require some SQL queries in the back-end.

Cheers,

Mungo.
Reply
#2
Step by step guide here. Yes, it will definitely require SQL queries.

As a side note, to add more content you will need 1 box set up with sources and doing regular scans for new content.
Reply
#3
Awesome, thanks. Will check it out.
Reply
#4
(2012-11-30, 09:16)j114 Wrote: As a side note, to add more content you will need 1 box set up with sources and doing regular scans for new content.

Not entirely sure what you mean by this?...once the primary path and the path of all current media has been updated, shouldn't any new media I add to the new locations be found by XBMC via a library update like usual? Huh Maybe I'm missing something.
Reply
#5
Quote: am unable to "remove" the source of this material via XBMC, because there's no sources listed for music, movies or TV.

That statement led me to believe you do not have sources configured on any of your XBMC machines any longer. If that is the case, XBMC will not find new content because it does not know where to look. On 1 machine, you need to set your sources. You can actually do it on all of your machines, but the redundancy is not necessary if you're using a shared library.

Perhaps I misunderstood what you were saying there...
Reply
#6
You're correct - I have 2 XBMC machines, with a SQL back-end structure. Currently my main system has a sources.xml file, however there's no path's defined in it. The 2nd machine doesn't have a sources.xml file at all. However - when I add new media to my fileserver at the moment, it's found by XBMC during a library update on both systems - so somehow it knows where to look.
Reply
#7
That doesn't make any sense at all. XBMC does not just randomly search for content in undefined sources. If it's adding new content, there must be sources defined somewhere. Somehow, somewhere, the sources must be defined if it's still pulling new content.

The only alternative I can think of, and I don't know if it's possible to work this way or not, is if you had some other program such as sickbeard or couchpotato sending the updates to one of your machines. I know each of those will try to update just the one show/movie first, so I guess maybe that's possible? Never considered it before, so I don't know.
Reply
#8
Yeah, I've only started to really think about how it all integrates and works etc. now that I'm upgrading storage, but all along I've assumed those sources would be still in the client - apparently not.

I can confirm currently the main XBMC install has a sources.xml, but it has no actual sources listed, just this:

<sources>
<programs>
<default pathversion="1"></default>
</programs>
<video>
<default pathversion="1"></default>
</video>
<music>
<default pathversion="1"></default>
</music>
<pictures>
<default pathversion="1"></default>
</pictures>
<files>
<default pathversion="1"></default>
</files>
</sources>


2nd machine has no sources.xml file at all.

I process everything before it hits XBMC, so there's no other computers or programs that XBMC "reads" from - it just checks the sources originally defined when I built the database and loads any new media it finds....don't ask me how it works, but the clients don't have any sources currently defined. They did originally obviously, but currently do not, and yet continue to check those originally defined sources, so they must be defined in the database somewhere.

I'll have a play around updating the database links tomororw, and then throw some new media in and see if it continues to pull in.
Reply
#9
The library DB stores sources when you've "set content" on them, so after that the sources.xml file isn't technically needed. It might make it harder to manage the sources, (if you want to remove a source from the GUI, etc), but everything should still update fine.
Reply
#10
(2012-12-01, 10:36)Mungo Wrote: I'll have a play around updating the database links tomororw, and then throw some new media in and see if it continues to pull in.

Well, I can confirm the sources file is not required for this to work after initially setting it up.

● I shifted my entire TV series location.
● Updated the database to point to the new location.
● Renamed the old folder where my TV series use to read from, so I KNEW if it tried finding it from there, it couldn't.
● Shifted a new episode of a show into the new location, so I KNEW if XBMC found it - it would be from this new location.
● Fired up XBMC, all my shows showed up correctly, with watched status etc. in tact as well as thumbnails for that matter.
● Performed a Library Update
● New episode was found and loaded Big Grin

All I updated in the database was the strPath field for my TV series location in the Path table. Don't ask me how it knows to keep looking in this location for more stuff, but it does. Confused

(2012-12-02, 06:36)Ned Scott Wrote: The library DB stores sources when you've "set content" on them, so after that the sources.xml file isn't technically needed. It might make it harder to manage the sources, (if you want to remove a source from the GUI, etc), but everything should still update fine.

Thanks Ned - ya got in while I was writing a reply :-). Glad to know once defined they stick - helps make sense of it all. Once the path is changed in SQL, it must take that sources, set content type with it.
Reply
#11
(2012-12-02, 06:36)Ned Scott Wrote: The library DB stores sources when you've "set content" on them, so after that the sources.xml file isn't technically needed. It might make it harder to manage the sources, (if you want to remove a source from the GUI, etc), but everything should still update fine.

I had always assumed if I removed the sources from all of my machines it would stop all scanning for new content. So the only effective way to stop future scanning would be to remove the sources and remove the content from those sources as well? I have never tried it so I hadn't realized it would still scan, but it's good to know for future reference; Thanks Ned.
Reply
#12
Keep the sources so you can manage them in the GUI, but check off "exclude from updates" when you set content. If you re-add the sources with the same file path then it should allow you to use the GUI again to set this.
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL Backend & moving media location0