Database paths relative to source
#1
I wanted to switch from SMB to NFS on my sources but found that XBMC started to re-scrape everything. Looking in the database it seems that full paths are saved and not saved relative to source path Sad
I understand that a source can contain multiple paths, but perhaps a dev can suggest a work around or future solution?
Reply
#2
There's a few ways to do it, but one easy way (if you're using XBMC v11 Eden) is to just use path substitution (wiki).

XBMC should have asked if you wanted to update the library with the new path, though, without having to rescrape everything.
Reply
#3
Thanks Ned!

It should have asked about that? Cool, but does not seem to work then. Sad

From top of my mind...

Old source containing just one path:

smb://[email protected]/Video/Movies/Adults

was changed to:

nfs://xbmc:[email protected]/Volume2/Video/Movies/Adults


Something weird happened though as when I changed the source it was not shown in GUI and newly created didn't appear either. I had to exit and restart XBMC every time before changes were visible (CrystalBuntu RC2). Perhaps related to the missing question (as in a badly handled exception or something?)
Reply
#4
Just a headsup. There is no username/password authentiacion for nfs (auth works on a different approach in nfs - see the wiki if you are interested in details...). Though it doesn't seem to harm because i just ignore that xbmc:xbmc@ bit then ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
I don't think I actually had that auth part in the nfs path. I think it was added when I went back to smb to try to avoid losing my library. I had to delete rows from Paths and Movies tables in the database to get back to where I were.

Can you reproduce the problem going from smb to nfs on a source? Because it would be nice if it was possible to change between them without having to lose the database.
Reply
#6
thumbnails are hashed from the fullpath ... so changing from smb to nfs will invalidate the old thumbnails ... not sure if that is what you mean... but yep in general it will give problems when changing protocols with already existing db...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#7
If it's done by pathsubstitution it won't - the substitution is done before we hit the filesystem, not in the fileitems themselves.

If it's done by altering the paths in the db, then it will, yup.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
I would also like to see something like this, however for a completely different reason.
Every so often, I have to move folders to different drives.
This then means that I have to do an Update, which adds new entries in the Database, re-scrapes.
Then Clean which removes the missing entries. However this also deletes any associated data (ie Watched flag)

If paths were stored relative to a source path it would be possible to match up moved folders and only update the source path.
So that the files would not need to be scraped again, or any additional data (ie watched flags) would not be lost.

In addition if a missing flag was added as suggested here http://forum.xbmc.org/showthread.php?tid=122054
Auto-update could be used to handle moved files and simply update the path.
Reply
#9
I do this using symlinks (on Windows)

X:\Sources\Movies
X:\Sources\Music
X:\Sources\TV Shows
X:\Sources\Music Videos

Each of the above is a symlinked folder 'pointing/linking' to wherever the REAL source is, this way, I can move my content wherever I like without affecting XBMC. The only think that MUST remain constant is the 'X' drive (or whichever drive you elect), after that you can store your media anywhere - it will also work for network (\\mynetworkdrive) paths too.

XBMC is simply configured to use the above folder sources and remains blissfully ignorant of symlinking.

Reply

Logout Mark Read Team Forum Stats Members Help
Database paths relative to source0