Picture Library - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Picture Library (/showthread.php?tid=141169) |
Picture Library - garbear - 2012-09-24 I'm working on getting a picture library in XBMC. ATM the database backend is complete, but it could use a little GUI love (mostly for tagging support). Now I'm looking to break it I could use some help writing test cases in XBMC's testing framework, and I'm also open to ideas for improving the library's layout. Scanning pictures into the library uses EXIF and IPTC tags, but once the pictures are in there's no way to modify the data (this would have to be implemented via in the GUI). Also, saving the modified metadata would have to be done via external .nfo files, or XBMC would need a way to write to picture tags. But overall, it's a good start The code is https://github.com/garbear/xbmc/commits/photolibrary . For those interested, the database backend is a new abstraction I wrote (I call it a denormalized database with dynamic normalization). Once I put it in place, I decided to upgrade the layout by adding tags, keywords and categories; the code to add the many-to-many tables and link tables, upgrade old schema to the new version, and while upgrading pre-populate the six new tables with data that was already in the database, and then modify the GUI to be able to browse by these new fields, was just over 20 lines of code. IOW, adapting to other libraries (looking at you, games!) should be a relatively painless task. Cheers, Garrett RE: Picture Library - edrikk - 2012-09-24 AWESOME! One suggestion: if you / someone decides one day to add writing tags back to file, please do everyone a favor and use the best toolset out there: exiftools by Phil Harvey ( http://owl.phy.queensu.ca/~phil/exiftool/ ). This is an area not for the faint of heart, and this tool does it perfectly, and is used by most tagging software... RE: Picture Library - bossanova808 - 2012-09-24 Yeah - nice, a picture library would be very cool. I wouldn't worry too much about metadata editing within XBMC - there are loads of better tools for that, XBMC is not a great editing environment. Indeed, apart from refreshing movies etc, there's not that much editing to be done in XBMC anywhere else is there? But nifty ways of finding and displaying stuff is it's core work, and this would be a huge leap forward. Will keep my eye on this! RE: Picture Library - spiff - 2012-09-24 keep plugins in mind. they are the tool to integrate stuff like databases from other picture software, or online galleries.. RE: Picture Library - Robotica - 2012-09-24 Great to see this! (2012-09-24, 01:27)garbear Wrote: ...and (2012-09-24, 09:22)bossanova808 Wrote: Yeah - nice, a picture library would be very cool. Saving orientation (is also an EXIF field) could be an automatic function (started after rotate/next picture) in XBMC but yeah, it's to bad XBMC uses a parser which can only read. This means all addon authors should use their own parser for writing to the database, which means a lot of redundant work. Besides, picture rating isn't an option without writing to the database and this is a much wanted feature i think. RE: Picture Library - Jako - 2012-09-24 (2012-09-24, 01:27)garbear Wrote: I'm also open to ideas for improving the library's layout.Have you already tried out MyPicsDB and looking at it for inspiration? MyPicsDB is an existing Python Script Addons for XBMC. http://forum.xbmc.org/showthread.php?tid=133905 The library GUI layout of MyPicsDB is quite nice and probably have most features the majority of us want. (2012-09-24, 01:27)garbear Wrote: IOW, adapting to other libraries (looking at you, games!) should be a relatively painless task.WOW! Just imagining a RetroArch games library in XBMC as a frontend for libretro just made me pee my pants a little bit. http://www.xbmc4xbox.org.uk/2012/08/retroarch-new-multiplatform-modular-emulator-for-the-xbox1/ RE: Picture Library - Robotica - 2012-09-25 Yesterday, I had a look to the picture section and this is what I noticed, just some thoughts: It would make sense to make the picture viewing experience similiar to videos and audio sections, for a better and more consistent user experience. This continues with improving the GUI, i.e. provide the user with settings for picture viewing (like this), some photo specific views, smarter/better context menus and a new OSD for pictures. General settings When entering your picture setting you can basiclly do the same stuff as in the music and video sections. Code: System settings > Pictures So you have to start with adding your (picture) sources. Just should use the same procedure as normal. So first use the context menu to fill your library. Settings in the context menu for sources: - scan in library - Once scanned your source there are some views and option. Available views: - Folder view - showcase (/grid) view - full screen Available context menu within slideshow: - Show user comment - Show Date & Time - View original picture - Delete picture - Change transition-effect - Start / Stop music - Amount of time for each picture The OSD needs some functions to overwrite some settings and music osd and controls should accessible from within picture slideshow. There are some good tickets, describing some problems related to the GUI. I try to post them soon in this topic. Other sources to scrape could be an rss feed. Many photo apps (also on NAS) offer picture solution with an RSS feed when photo are published. Also, (recursive) slideshows always loops. Should this be an option if someone want it to stop after going through all photos once. RE: Picture Library - garbear - 2012-09-25 (2012-09-24, 18:31)Jako Wrote: MyPicsDB Jako I feel kind of bad barging in on their turf, but a picture library is far overdue and c++ can finally get us full integration . I just loaded up MyPicsDB and I'll check it out. What specific features do you like the best? I knew you'd be on board, Robotica! I'm putting the slideshows and GUI overhauls in separate PRs, as more incremental steps will speed development and merging with mainline. Views are decoupled from content, so additional views would have to be added on a per/skin basis. And if you've seen my skinning attempts, it's probably best if I let the skinners do their thing Scanning is already in Files' context menu, and scraping RSS feeds is a good idea. Plugins can already do this, and I think it'd be really cool to allow scanning their content into the library (not currently possible with music or videos). Post any Trac ticket you find and i'll see if they're something I can tackle. Cheers, Garrett RE: Picture Library - Jako - 2012-09-26 (2012-09-25, 22:55)garbear Wrote:Yes I definitely agree that a native picture library with a standardized database in XBMC is overdue, and it means that all skins will support it by default.(2012-09-24, 18:31)Jako Wrote: MyPicsDBJako I feel kind of bad barging in on their turf, but a picture library is far overdue and c++ can finally get us full integration (2012-09-25, 22:55)garbear Wrote: I just loaded up MyPicsDB and I'll check it out. What specific features do you like the best?Other than the standard features such all the filtering options, the MyPicsDB addon has a very nice filter wizard that works kind of like XBMC's SmartPlaylists. I also really like the idea of GeoTagging features with Google Maps connection to show the location, as the new camera I just ordered got GPS tagging so that should give photo viewing an additional dimension! Note that MyPicsDB not only supports EXIF and IPTC tags but also Adobe XMP metadata tags for pictures. (2012-06-13, 09:41)Xycl Wrote: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags RE: Picture Library - Xycl - 2012-09-26 I'm the current maintainer of MyPicsDB and I would really appreciate an XBMC picture database, too. There are a lot of guys, including me, needing a database to select the pictures they want to see. Therefore some ideas for the new feature. I think the user expactation for a picture library is different from music/video library. Video: I choose the movie I want to see. Library only needed for additional information. Music: Use of a smart playlists to select (e.g.) 80th rock music, a 'normal' playlist or direct select of an album. Library is needed for fast access. Pictures: I would like to see pictures from me, my wife & child from last holiday or pictures from father's 70th birthday without his dog. This is a mix of several different EXIF, IPTC and XMP tag types including a NOT condition. Therefore I introduced the filter wizard in MyPicsDB. Database: The old approach of MyPicsDB was to store each tag type in it's own table like 'Keywords' with an relation to table 'Files' called 'KeywordsInFiles'. This is obviously bad, but still in use for already existing parts of MyPicsDB. Additionally the tags are stored in table files. The new parts of MyPicsDB only use tables TagTypes, TagContents and TagsInFiles which makes it very easy for the tag parser to add new (unkown) tag types to the database and to show them in the filter wizard or sub menu 'Browse by tags' without modifying anything except the parser. This also allows to map different tags like 'EXIF DateTimeDigitized', 'EXIF DateTimeOriginal', 'Image DateTime' (IPTC tag) etc. to one tag with an user definable name. MyPicsDB also allows you to delete the tag translation which removes these tags from GUI. E.g. I don't need and therefore don't want to see a camera tag. List views: They can be sorted by date but not by date/time! Please change this, too. Some users complain about wrong sort order of their pictures. Picture orientation: Robotica already told that saving picture orientation would be nice. People/person tagging: There is no standard. But Microsoft introduced the XMP tag MPRegersonDisplayName in Picture Gallery. MyPicsDB supports this tag. RE: Picture Library - garbear - 2012-09-26 (2012-09-26, 17:27)Xycl Wrote: Other than the standard features such all the filtering options, the MyPicsDB addon has a very nice filter wizard that works kind of like XBMC's SmartPlaylists. (2012-09-26, 17:27)Xycl Wrote: Picture orientation: Robotica already told that saving picture orientation would be nice. Montellese has done a great job with advanced library filtering, I'll see how much of his work I can integrate. Upgrading libexif to the latest version would bring XMP support and tag writing. As for GPS, I need a program that can write tags, preferably lightweight. Any suggestions? Basically, MyPicsDB is laying the groundwork for this library and the source code is a really great resource. I plan to blatantly rip off as many features as I can (2012-09-26, 17:27)Xycl Wrote: Database (i summarize)Don't worry. I think my database abstraction can handle this and more ;-) (2012-09-26, 17:27)Xycl Wrote: List viewsYes. (2012-09-26, 17:27)Xycl Wrote: People/person taggingI've written a pretty big Facebook app. We'll see where this takes us Cheers, Garrett More ideas welcome! RE: Picture Library - joebrady - 2012-09-26 My 2 cents. Not really related to library, but I'd like to see some faster options for Slideshow interval. http://forum.xbmc.org/showthread.php?tid=140218&highlight=slideshow Also, some old closed tickets: http://trac.xbmc.org/ticket/5875 http://trac.xbmc.org/ticket/8979 RE: Picture Library - Xycl - 2012-09-26 (2012-09-26, 19:56)garbear Wrote: As for GPS, I need a program that can write tags, preferably lightweight. Any suggestions?For Windows: GeoSetter which uses ExifTool to store the tags. (2012-09-26, 19:56)garbear Wrote:Okay, but I don't think that Facebook stores the tags in the pictures.(2012-09-26, 17:27)Xycl Wrote: People/person taggingI've written a pretty big Facebook app. We'll see where this takes us It's like Google Picasa which stores people tags in it's database which makes it unusable as a tagging tool. RE: Picture Library - Robotica - 2012-09-26 - GUI problems and inconsistency. Context menu needs some cleanup: This ticket andthis one. Also sorting on date doesn't work. A simple GUI option (besides a general setting on tab"slideshow" also in the context of the slideshow) to control the amount of time each picture shows in a slideshow would be much appreciated. See: http://forum.xbmc.org/showthread.php?tid=104362&pid=1138418#pid1138418) Another one: if scrolling through your photo collection, you cannot see the path, like with video's. RE: Picture Library - sphere - 2012-09-29 Well done garbear regarding the cleanup of context menu entries, I already opened a PR for that. I guess Picture Library won't get into Frodo but maybe my PR It would also be nice to have (visible) infolabels like title and some kind of plot on photos - this way I finally could transform my BigPictures script to a plugin (Take a look if you don't know what I talk about). regards, sphere |