How do I automate library export?
#1
I'm working on building an idiot-proof XBMC install for a friend's mum, and I have most of it how I want including an automated full-restore ghost on a separate bootable partition. I also have it set to scan and update the library every time it starts, and the machine is scheduled to reboot itself once every 24 hours at 5am.

Has anyone written a batch-script or something that can trigger a library export to single files? I want all of the scraped material kept with the actual media files (which are on separate drives), in case a full-restore is called for?

(I'm actually suprised that this isn't a standard feature!)
Reply
#2
I wouldn't do a library export, just copy the %appdata%\xbmc folder somewhere safe. Preferably keep a few copies in case there's library corruption that you don't spot for a few days.

JR
Reply
#3
For my current needs, this is unacceptable -- I see it as an essential feature to make XBMC more idiot-proof, and more appealing to those who want something they can plug in and have working with a minimum of futzing. It would also standardise things with external media managers & scrapers, and if the internal library does screw up, it's a simple (albeit time consuming) task to re-absorb the metadata.
Reply
#4
You can create a batch to backup your cache and database I did something similar in XP using windows xcopy so it only updates the new/changed files so its pretty quick

I know its not what you asked for but it is a solution and as far as exporting for use with external media managers IMHO it's a waste of time using a media manager after the movies are already in your library unless you like refreshing loads of movies not to mention exported artwork is lower quality than artwork scraped by external media managers as its cached at a lower resolution, apart from XWMM media managers are best used before you add the content to your library
Current HTPC Lian-Li PC-C37 • Gigabyte GA-E7AUM-DS2H • Intel C2D E8400 E0 Stepping • OCZ Vertex SSD • 4GB Corsair TwinX XMS2 DDR2 • Corsair HX650W Modular PSU (Free Upgrade) • LG CH08LS10 Blu-Ray Drive • Scythe Big Shuriken • Acousti DustPROOF 70mm Fan
Reply
#5
There are scripting programs that will simulate mouse and button presses. I've written an AutoHotkey script in the past to click the update library button in Ember. I'm sure something similar could be scripted to control xbmc.
How to use Git
| AMD Athlon II X3 Triple Core Processor 2.9 GHz |GIGABYTE GA-MA785GM-US2H Mobo 2GB DDR2 Ram | MSI N430GT |
| Logitec Harmony Smart Control Remote| 52" Sharp Aquos LED TV | Denon AVR-X1000 |
| Freenas Server with 18TB ASRock Intel Avoton C2750 |
Reply
#6
or you could, you know, script the export of the library

Separate files per entry:
xbmc-send -a "exportlibrary(video,true,[fanart],[actor thumbs])"

Single file per entry:
xbmc-send -a "exportlibrary(video,false,[location])"

http://wiki.xbmc.org/?title=List_of_Built_In_Functions
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#7
Consider using automation software like Automation Anywhere. It records your actions and can move data from any application to any other. Can pull data from front end, which is a huge benefit. No coding or scripting.

Try the free trial and let me know what you think:
http://www.automationanywhere.com/downlo...tm?ptr=tvl

Hope this helps.
Tom
Reply
#8
*cough*cough*Shill*cough*cough*

I posted the way to automate it.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#9
darkscout Wrote:*cough*cough*Shill*cough*cough*

I posted the way to automate it.

Is there a way to implement this in a batch file in Windows? If not, how do I implement this?

Thank you!
TV: VIZIO E-Series 43”
HTPC: Raspberry Pi 3
STORAGE: Windows 8 Server with DrivePool (Currently with 24TB)
Reply
#10
Xbmc-send is a command line utility. Just call it from your batch file.
Reply
#11
I can't seem to find the utility. Is it in the XBMC folder. I'm using Windows.
TV: VIZIO E-Series 43”
HTPC: Raspberry Pi 3
STORAGE: Windows 8 Server with DrivePool (Currently with 24TB)
Reply
#12
jhsrennie Wrote:I wouldn't do a library export, just copy the %appdata%\xbmc folder somewhere safe. Preferably keep a few copies in case there's library corruption that you don't spot for a few days.

JR

This is exactly what i do - well almost....

I run XBMC in portable mode and just backup the enitre XBMC directory.

I use a backup script which keeps the last 7 days of backups and adds the date of the backup to the folder name.

I.e. the copied "XBMC" folder becomes "XBMC 24.07.2011".

So if i have an issue i can just shove the whole directory back and i've lost nothing or at most a days worth of library updates. Also this means any changes i've made to any xml files or the gui are also stored.

I also have a ghost image of the system disk (fully configured to my tastes), so if the os (windoze) gets corrupted it takes me a whopping 10 mins to restore everything back to how it should be.

It's so simple even the wife (technophobe) can do a restore Big Grin.
Reply
#13
>>X<<' Wrote:You can create a batch to backup your cache ...

Not an option. Thanks for trying, though.

htpc guy Wrote:I've written an AutoHotkey script ...

I'm not adding any extra automation softs or macro gubbinses to the OS.

darkscout Wrote:or you could, you know, script the export of the library

A lean in the direction I want, but two lines of cryptic code is not a solution. Care to flesh that out into a .bat script I can trigger with Scheduled Tasks?

AutomationTom Wrote:Consider using automation software like Automation Anywhere.

Not a chance.

Floodi Wrote:Xbmc-send is a command line utility. Just call it from your batch file.

You're as bad as darkscout -- most people wouldn't even know what a command line is let alone know how to use it even if they did know where to find it. I know I don't.

I want either an Add-on that can be told to export to individual files on a schedule, or a a ready-to-go .bat file I can download that I can trigger with Scheduled Tasks.
Reply
#14
@Hyram

I to want a lot if things but you still have to something for it. You can't expect a free program to included anything you want.
Try a little googling how to create a .bat file. It's easyer than you think.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#15
Machine-Sanctum Wrote:You can't expect a free program to included anything you want.

If there was something I could pay money for that can do even half of what XBMC can, I would buy it. There isn't anything which can come close to XBMC, free or payware, so I've asked for some way to get what I want done, done, and done easily.

It has been hinted at above that it is indeed possible, but no-one has yet told me exactly what needs to be done, step by step.

Quote:Try a little googling how to create a .bat file. It's easyer than you think.

Not to me. I've been a Mac user since they came out in 1984, if things can't be done in a visual, graphical manner I get hopelessly confused. I think in images, that's why XBMC appeals so much. The person I've built the media machine for is old and mostly illiterate and can barely work a microwave oven let alone a computer, but she understands how to use a remote with XBMC because choosing things is all visual.
Reply

Logout Mark Read Team Forum Stats Members Help
How do I automate library export?0