XGetPhotos plugin www

Xlobby plugin development

XGetPhotos plugin www

Postby dalanik on Tue Jun 27, 2006 8:19 pm

#
http://xlobby.lanik.org/XGetPhotos.jpg
##
XGetPhotos plugin - Copies photos from your camera/memory card into folder structure (by date) on HTPC. Also has delete function + copies videos to separate directory.
###

Just couldn't resist converting my copy photos script to a plugin; Easier to use, plus displays graphical progress bar. :-) Maybe somebody finds it usefull.

Third Beta version available as installer package at:

http://xlobby.lanik.org/XGetPhotos.v0.04b.exe

Plugin to copy photos from camera/memory card onto HTPC. Creates folder structure for each date (file creation date).

Also, available as standalone exe:

http://xlobby.lanik.org/GetPhotos.exe

D.
Last edited by dalanik on Mon Nov 19, 2007 8:46 pm, edited 5 times in total.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby Colby on Wed Jun 28, 2006 12:10 am

does this auto execute upon insert of USB? That would be ideal for me. Also can you set directories to download to? Maybe a folder browser database. (the forgotten database)
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby dalanik on Wed Jun 28, 2006 5:43 am

[
>> does this auto execute upon insert of USB?

No, you have to trigger it from within XLobby.

>> Also can you set directories to download to?

You can set folder to download to, but for the time being, the sub folders are defined in plugin. It is creating structure in format YYYY\MM\YYYYMMDD (according to file date). I hope to change this in the next release so you can specify exactly the format of output folder.


D>
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby dalanik on Wed Jun 28, 2006 8:32 pm

I changed the plugin so that you can specify how the sub-folder structure will look like, i.e. it can download photos into YY\MM\DD folders or YYYY\YYMM\MMDD etc.

Here:

http://xlobby.lanik.org/XGetPhotos.v0.02b.exe

Colby:
As for the auto-start, I suppose you could hook on disc insertion through girder and do XEvent to run XGetPhotos...

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby dalanik on Wed Jul 12, 2006 12:20 pm

Update:

Version 0.03 available.

You can now specify settings in plugin configuration dialog...

See first post for link.

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby Jay on Thu Jul 13, 2006 11:50 am

This looks great. I have it set as an active plugin now.
But how is the plugin called from a screen such as pictures?

Make text box plugin>XgetPhotos.... ?

Thanks
Jay
 
Posts: 869
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Postby dalanik on Thu Jul 13, 2006 12:54 pm

Oh, there is complete documentation in Word format in the installer. I made mistake and didn't mention it anywhere :-) it is copied to the plugin folder, that is c:\program files\xlobby\plugins\XGetPhotos

everything should be explained there. Here's stripped down version:

=========================

XGetPhotos plugin v0.03
PLUGIN FOR XLOBBY
by Dalibor Lanik

Installation:

Run installer exe

Notice:
· No sample skin is provided with this plugin (since it’s so simple)
· This plugin was tested with the Xlobby build dated 27/06/2006 (latest as of this writing).

Commands:

There are 3 commands in this plugin. They can be found in configuration dialog of XLobby by pressing F2, under events tab, by adding plugin command.

Here is the list with brief descriptions what they do:

Copy [source_path] [destination_path]
· Copies files from source path to destination path. Paths must be enclosed in quotes, i.e. „F:\DCIM\100OLYMP\“ „D:\PICS\“. The files are copied to the destination path in up to 3-level folder structure: i.e. \YYYY\MM\DD. Just to make things clear: it reads the creation date of the files, and makes folders for every file with different date (if you have several days worth of photos on your memory card). Doesn’t copy sub-folders.

Settings for folder structure are kept in registry. You can edit them in configuration dialog: From Xlobby, press F2, go to plugins tab, select XGetPhotos, click on Configure button. When you close it by clicking OK, settings will be created in registry.



There are 3 levels. If you don’t want to use a level, just leave it blank. Allowed values are: YYYY, YY, YYYYMM, YYMM, MM, MMDD, DD, YYMMDD, YYYYMMDD.

I.e. by setting 1st level to YYYY, 2nd to MM and 3rd to YYMMDD, it will copy pictures according to their creation dates into structure looking like this: 2006\07\20060720\

Don’t forget to restart Xlobby after changing the values in registry.

If you don’t change the values, defaults are used: YYYY\MM\YYMMDD.

Delete [source_path]
· Deletes files from source path. Doesn’t delete sub-folders, only the contents of specified source path. Path must be enclosed in quotes, i.e. „F:\DCIM\100OLYMP\“

Clear [no parameter]
· Clears variables. Needed so when you display overlay with copy info for the second time, it doesn‘t display old percentage, progress bar and filenames (from previous copy/delete) for a split-second, before it starts copying. Just assign this event prior to opening overlay with copy progress bar.

Variables:

You can use those on text fields to display info about copy/delete progress:

plugin>XGetPhotos>FileName * file currently being copied (text)
plugin>XGetPhotos>Percentage * total percent finished (text)
plugin>XGetPhotos>Source * source path (text)
plugin>XGetPhotos>Dest * destination path (text)
plugin>XGetPhotos>ProgressBar * progress bar (image)

Errors and logging

Errors are logged in file c:\program files\xlobby\xgetphotos_log.txt.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby Jay on Thu Jul 13, 2006 2:30 pm

thanks :D
Jay
 
Posts: 869
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Postby Jay on Thu Jul 13, 2006 4:39 pm

I'm sorry but where do you specify [source_path] [destination_path]?
Mine would be “I:\DCIM\100MSDCF\” “C:CAMPICS”. I thought next to Copy (e.g.) in the plugin command dialog box. That's not right. I'm afraid this is so simple I'm missing it. :oops:
Jay
 
Posts: 869
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Postby dalanik on Thu Jul 13, 2006 6:53 pm

Jay wrote:I'm sorry but where do you specify [source_path] [destination_path]?
Mine would be “I:\DCIM\100MSDCF\” “C:CAMPICS”. I thought next to Copy (e.g.) in the plugin command dialog box. That's not right. I'm afraid this is so simple I'm missing it. :oops:


In the variable field...

i.e. you have:

plugin:
XGetPhotos
Command:
Copy
Variables:
“I:\DCIM\100MSDCF\” “C:\CAMPICS”

Image

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby Jay on Thu Jul 13, 2006 7:54 pm

It was a bloody typo in the source path on my part. I had tried putting the paths there at first and when it didn't work, I assumed they went somewhere else.

Anyway, this is great! I cloned the Picture screen, added the 3 event buttons, changed the name of the Reset button to 'Load', hit it and in they came from the memory stick:D

Sorry for the bother.
Great job!
Jay
 
Posts: 869
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Postby dalanik on Thu Jul 13, 2006 10:31 pm

Glad it works for someone (except me) :-)
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby Jay on Thu Jul 13, 2006 11:53 pm

:?:
Am I misunderstanding? You wrote it and it doesn't work for you?
I did make a registry/folder change which was necessary to see the pics again after the 1st view.
Jay
 
Posts: 869
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Postby dalanik on Fri Jul 14, 2006 7:28 am

Jay wrote::?:
Am I misunderstanding? You wrote it and it doesn't work for you?
I did make a registry/folder change which was necessary to see the pics again after the 1st view.


No, no; I meant it works for me, and it works for someone else as well :-)

Now, when I wrote in the docs that nothing needs changing, I realized a bit later that on most of the cameras you can also make videos, and that most likely they have to go to a different folder. So I'll be adding that :-)

What registry change? Now everything should be configurable through "configure" dialog?

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby Jay on Fri Jul 14, 2006 11:12 am

I didn't mean registry, I meant 'folder' change in the config. I flattened the destination folder to display all pics together rather than by subfolders by date. It works better for my purposes.

Question though. Even if I change the picture database from c:\pic_folder to \\server_name\pic_folder, I just get image placeholders on a fat client. Does that have to do with the destination folder being outside of the XL folder?
Jay
 
Posts: 869
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Next