webOS Nation Forums >  Homebrew >  webOS patches > [3 patches] Improved Camera Photo Filenames
[3 patches] Improved Camera Photo Filenames

  Reply
 
LinkBack Thread Tools Display Modes
Old 02/27/2010, 11:18 AM   #1 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default [3 patches] Improved Camera Photo Filenames

Yes, yes, I know it's generally best to have 1 patch per release thread, but in this case, these 3 patches are nearly identical.



Basically, webOS 1.4 changed the way the camera works. The old photo naming patches no longer work. Now, filenaming and album creating is done via the camera linux daemon, which is not patchable.

However, Palm does allow developers to specify filenames, and using that, I was able to set a custom filename format for photos.

So these are the 3 patches and their filename formats:
  1. improved-cimg-photo-naming.patch = CIMG_YYYY-MM-DD-hhmmss.jpg
  2. improved-pre-photo-naming.patch = PRE_YYYY-MM-DD-hhmmss.jpg
  3. improved-pixi-photo-naming.patch = PIXI_YYYY-MM-DD-hhmmss.jpg

All images will be saved to the /DCIM/100PALM/ folder

Keep in mind, I was unable to set a custom name for videos, which will remain in their usual CIMGxxxxx.mp4 format (which is why I personally prefer the 1st of the 3 patches).


Oh, and obviously, only install one of these patches, heh.


EDIT: Files removed; updated versions below
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook

Last edited by Jason Robitaille; 02/27/2010 at 01:01 PM.
Jason Robitaille is offline   Reply With Quote
Old 02/27/2010, 11:35 AM   #2 (permalink)
Member
 
Join Date: Jan 2004
Location: UK
Posts: 1,524
Likes Received: 2
Thanks: 54
Thanked 66 Times in 51 Posts
Default

Thanks.
__________________
Thought of the day :
No sense being pessimistic, it probably wouldn't work anyway
ChasT is offline   Reply With Quote
Old 02/27/2010, 11:43 AM   #3 (permalink)
Member
 
Join Date: Oct 2009
Posts: 151
Likes Received: 12
Thanks: 17
Thanked 52 Times in 20 Posts
Default

Hi Jason,
I´m seeing disappearing videos from the video app, after shooting some random videos my older clips have been overwritten apparently. Do you think your name patch will fix this problem? Can´t seem to find other people having this strange issue.

Edit, my bad, I read again, seeing this concerns photos only. Maybe any other idea what causes this strange behaviour?
heth is offline   Reply With Quote
Old 02/27/2010, 11:52 AM   #4 (permalink)
Member
 
maxima2k53's Avatar
 
Join Date: Jul 2009
Location: Miami, Fl
Posts: 3,596
Likes Received: 0
Thanks: 1,084
Thanked 247 Times in 206 Posts
Default

so the older patch thats is in preware is pretty much useless?
__________________
Juan

2010-2011 Champions!

maxima2k53 is offline   Reply With Quote
Old 02/27/2010, 12:00 PM   #5 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Quote:
Originally Posted by heth View Post
Hi Jason,
I´m seeing disappearing videos from the video app, after shooting some random videos my older clips have been overwritten apparently. Do you think your name patch will fix this problem? Can´t seem to find other people having this strange issue.

Edit, my bad, I read again, seeing this concerns photos only. Maybe any other idea what causes this strange behaviour?
honestly, no idea what might be causing that.

Quote:
Originally Posted by maxima2k53 View Post
so the older patch thats is in preware is pretty much useless?
Yea, I believe it was removed from Preware
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 02/27/2010, 12:58 PM   #6 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

So I've found an issue in the above patches.

Attached is the fixed versions
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 02/27/2010, 01:02 PM   #7 (permalink)
Member
 
maxima2k53's Avatar
 
Join Date: Jul 2009
Location: Miami, Fl
Posts: 3,596
Likes Received: 0
Thanks: 1,084
Thanked 247 Times in 206 Posts
Default

Quote:
Originally Posted by Jason Robitaille View Post
So I've found an issue in the above patches.

Attached is the fixed versions
so this should work even though webOS internals is getting hammered?
__________________
Juan

2010-2011 Champions!

maxima2k53 is offline   Reply With Quote
Old 02/27/2010, 03:21 PM   #8 (permalink)
Member
 
Join Date: Jan 2004
Location: UK
Posts: 1,524
Likes Received: 2
Thanks: 54
Thanked 66 Times in 51 Posts
Default

Quote:
Originally Posted by Jason Robitaille View Post
...
Yea, I believe it was removed from Preware
AUPT Place-holder inserted until new version is available, so I'll remove it now from my Pre.
__________________
Thought of the day :
No sense being pessimistic, it probably wouldn't work anyway
ChasT is offline   Reply With Quote
Old 02/27/2010, 03:22 PM   #9 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Quote:
Originally Posted by maxima2k53 View Post
so this should work even though webOS internals is getting hammered?
if WOSQI is unable to download the postinst/prerm scripts, then the patch can't be applied. It'll create the package on the device which can be uninstalled.
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 02/28/2010, 06:31 PM   #10 (permalink)
Member
 
Ozmodiar's Avatar
 
Join Date: Jul 2009
Location: Ohio
Posts: 230
Likes Received: 0
Thanks: 47
Thanked 28 Times in 26 Posts
Default

Thanks for the update.

I'll be holding off on installing until Preware has these, but I'm certainly looking forward to it!
Ozmodiar is offline   Reply With Quote
Old 02/28/2010, 07:20 PM   #11 (permalink)
Member
 
Spader's Avatar
 
Join Date: Oct 2009
Location: Arizona, US
Posts: 1,449
Likes Received: 1
Thanks: 144
Thanked 362 Times in 241 Posts
Default

Great to see this one back. Installed without issue.
__________________
Follow me on teh Twitterz
Spader is offline   Reply With Quote
Old 03/13/2010, 05:14 PM   #12 (permalink)
Member
 
Join Date: Mar 2010
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Jason Robitaille View Post
So I've found an issue in the above patches.

Attached is the fixed versions
how come when I tried the fixed versions on my phone it said file not supported.? :/
how am I suppose to know it's working or it downloaded?
mz_real is offline   Reply With Quote
Old 03/13/2010, 05:59 PM   #13 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default QI

Quote:
Originally Posted by mz_real View Post
how come when I tried the fixed versions on my phone it said file not supported.? :/
how am I suppose to know it's working or it downloaded?
you install the .patch on your computer via WOSQIm not on your Pre
http://forums.precentral.net/canuck-...les-wosqi.html
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 03/13/2010, 10:13 PM   #14 (permalink)
Member
 
Join Date: Sep 2009
Posts: 3
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Jason, is there an easy way to have the original implementation where the file numbering stayed the simple 0001, 0002, etc, but the prefix is changed? I tried using some of the original camera-control.js code in the new location where you defined your code, basically I put this in instead of all your date calculations:
var imgNum = this.prefs[CameraControl.PREFS.COUNT];

var imgNumStr = "000"+imgNum;

imgNumStr = imgNumStr.substring(imgNumStr.length-4);
cam.imageDestination = "/media/internal/DCIM/100PALM/" +
"PRE" + imgNumStr + ".jpg";
but it appears that the count preference is no longer defined, I guess since the camera daemon is now handling things. So is there anyway to just change the prefix but keep the number, I'm not a fan of the time stamp file names.

Thanks
keppy is offline   Reply With Quote
Old 03/13/2010, 11:20 PM   #15 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Quote:
Originally Posted by keppy View Post
Hey Jason, is there an easy way to have the original implementation where the file numbering stayed the simple 0001, 0002, etc, but the prefix is changed? I tried using some of the original camera-control.js code in the new location where you defined your code, basically I put this in instead of all your date calculations:
var imgNum = this.prefs[CameraControl.PREFS.COUNT];

var imgNumStr = "000"+imgNum;

imgNumStr = imgNumStr.substring(imgNumStr.length-4);
cam.imageDestination = "/media/internal/DCIM/100PALM/" +
"PRE" + imgNumStr + ".jpg";
but it appears that the count preference is no longer defined, I guess since the camera daemon is now handling things. So is there anyway to just change the prefix but keep the number, I'm not a fan of the time stamp file names.

Thanks
Unfortunately, not as far as I know. The Prefix in the json doesn't even do anything anymore either
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 03/17/2010, 01:48 PM   #16 (permalink)
Member
 
Join Date: Aug 2004
Posts: 92
Likes Received: 3
Thanks: 8
Thanked 5 Times in 5 Posts
Default

The "cimg" version of the patch doesn't work for me. I have a Verizon Pre Plus w/ 1.4.
Anyone else got it working on a Vz PPP?
AlanK is offline   Reply With Quote
Old 03/31/2010, 12:46 PM   #17 (permalink)
Member
 
Join Date: Aug 2004
Posts: 92
Likes Received: 3
Thanks: 8
Thanked 5 Times in 5 Posts
Default

Using WOSQI, I verified that the edits in this patch were not applied. I copied the file onto my PC, edited the file to include the lines from the patch, and then copied it back to the Pre. Now I get the improved file names.
Any idea on why the patch wouldn't be applied? I didn't get any error message.
AlanK is offline   Reply With Quote
Old 03/31/2010, 01:25 PM   #18 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Quote:
Originally Posted by AlanK View Post
Using WOSQI, I verified that the edits in this patch were not applied. I copied the file onto my PC, edited the file to include the lines from the patch, and then copied it back to the Pre. Now I get the improved file names.
Any idea on why the patch wouldn't be applied? I didn't get any error message.
do you not have an active internet connection? The postinst/prerm scripts get downloaded directly from webos-internals' git and are what apply the patch. If they failed to download, then the patch would've installed, but not been applied.
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 03/31/2010, 04:25 PM   #19 (permalink)
Member
 
Join Date: Aug 2004
Posts: 92
Likes Received: 3
Thanks: 8
Thanked 5 Times in 5 Posts
Default

I'll have to give it a try when I get home. At work, coverage is spotty, so that may be the issue.
Thanks!
AlanK is offline   Reply With Quote
Old 04/01/2010, 08:49 AM   #20 (permalink)
Member
 
Join Date: Aug 2004
Posts: 92
Likes Received: 3
Thanks: 8
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by Jason Robitaille View Post
do you not have an active internet connection? The postinst/prerm scripts get downloaded directly from webos-internals' git and are what apply the patch. If they failed to download, then the patch would've installed, but not been applied.
After thinking about this some more, did you mean: active internet connection from my windows PC, not from the Pre?
The answer is yes, my PC has an internet connection. I didn't have a chance to try the patch from home last night. Hopefully, tonight.
AlanK is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://forums.webosnation.com/webos-patches/232987-3-patches-improved-camera-photo-filenames.html
Posted By For Type Date
dBsooner's webOS-Patches Web Portal This thread Refback 05/21/2010 01:46 AM
dBsooner's webOS-Patches Web Portal This thread Refback 05/20/2010 09:59 PM


 


Content Relevant URLs by vBSEO 3.6.0