Picture Scanner

scanner-agent-dev

#1

Suggestion
Hi,



I myself is a total noob to developing scanners and such so I'm just throwing my idea out there (nothing special)

Is there a kind soul out there that could make a Picture scanner that just reads a dir and outputs that exact folder structure to plex.



I have a folder with all my photos organized in albums and just want to be able to show them on my plex.



/Sincerely



Johan


#2

That should already work for you in the existing released version, just make a Photo section.


#3

[quote name='elan' timestamp='1343386469' post='282296']


That should already work for you in the existing released version, just make a Photo section.

[/quote]


Dear elan,



Are you aware of any metadata agent or plugin specifically for Photos section? I' m tagging all my Jpgs like "kids, vacation, family" etc. But it s not possible to browse my files based on tags (like windows media center does) I'm also looking for ability to browse my library based on EXIF data of jpeg files. I could not find any plugins or agents for these purposes, any ideas?



Thnx


#4

Yes, browsing photos by EXIF Keyword tags would be the most sensible thing. Support for GPS tags would also be nice.


#5

Another thing: the photo scanner apparently uses the file creation time to detect the date at which the photo was taken. See Plex Photo Scanner.py:


created_at = time.localtime(os.path.getctime(path))





That might work for the case where plex would run on the camera, but for all other cases, where the photos are copied to the computer running plex some time after the photos where shot, it should use the modification time instead of the creation time.

The file creation time is set automatically to the current time when the copying happens. The modification time however is typically set to the time of the source photos (e.g. SD card).



Until a more sophisticated photo scanning is implemented using EXIF tags, I propose to s/getctime/getmtime/.


#6

So, after fixing the ctime vs. mtime issue locally, plex provides a proper "By Year" section. During scanning, that is. After scanning has finished, the (personal) metadata agent kicks in and somehow voids all dates. After digging a little, I found class PlexPersonalMediaAgentPhotos, which for some reason does not provide any date metadata. If I patch that class to do it similarly to PlexPersonalMediaAgentMovies (which reads the file's timestamp and adds that as 'year' and 'originally_available_at' metadata, all dates are fine.



I had thought that when the metadata agent does not provide the date metadata, the previously gathered metadata from the scanner would be used, but alas, it's not.



So can someone with enough karma fix the photo scanner to use the mtime and the PlexPersonalMediaAgentPhotos to provide the date metadata just like the PlexPnks!ersonalMediaAgentMovies agent?



Thanks!


#7

So, after fixing the ctime vs. mtime issue locally, plex provides a proper "By Year" section. During scanning, that is. After scanning has finished, the (personal) metadata agent kicks in and somehow voids all dates. After digging a little, I found class PlexPersonalMediaAgentPhotos, which for some reason does not provide any date metadata. If I patch that class to do it similarly to PlexPersonalMediaAgentMovies (which reads the file's timestamp and adds that as 'year' and 'originally_available_at' metadata, all dates are fine.

I had thought that when the metadata agent does not provide the date metadata, the previously gathered metadata from the scanner would be used, but alas, it's not.

So can someone with enough karma fix the photo scanner to use the mtime and the PlexPersonalMediaAgentPhotos to provide the date metadata just like the PlexPnks!ersonalMediaAgentMovies agent?

Thanks!

Hello.

Are someone working on the photo scanner?

I have a huge collection of Pictures going many years back. I was planning on using plex to view this, but as of now Plex is useless for me when it comes to Pictures.

Really hope this is in the pipeline.


#8

Another ping here - is it possible to have the "Photos" agent choose folder artwork automatically based on what's in the folder? (e.g. first pic in folder.)  That would be a huge improvement over the generic icon that covers my hundreds of folders...


#9

It's on our list, completely agreed :)


#10

It's on our list, completely agreed :)

Awesome, thanks.  And thanks for a great product!


#11

Any news about this?

Regarding the tagging part, could it be possible in combination with the multi-user/parental contol scope, to "block out" pictures with certain tags? Pictures from parties, might not be what I want the kids to see :)


\Kenneth


#12

Should be fixed in the next release.


#13

Is there an outlook for the next release that will have an improved photo scanner?  I have all my photos in a pictures directory, then have year subdirectories and month subdirectories within each year.  It appears to me that the photo scanner recursed the initial subdirectories, but once scanned, adding new directories and rescanning does not find the new subdirectories. There appears to be a cache somewhere that is not getting removed even if you delete the Photo library and re-create it.  I have Plex version 0.9.8.18.


#14

I'm happily using Plex, but I have some issues with photo's.

All my photos are black icons and if I select one picture it runs endlessly without showing the picture itself.

Is there a way to fix this?


#15

ping

exif tags... any news :D

facetags and that sort of stuff is the only reason why i am not 100% in plex


#16

I would like to be able to set the scanner to scan a particular field in the Exif data in order to populate Plex's "Summary" field for photos. In my case, the Exif field I would like to use is "Caption-Abstract" (according to ExifTool).


#17

Another vote for a photo scanner that can pull file metadata into the summary and date fields. I'm currently using embedded XMP data for my photos. Thanks!


#18

up


#19

A good photo scanner is really a long awaited feature. With Elan saying in 2013 that it is going to happen...We are mid 2015 and still Nothing. Is there any hope?


#20

One can created a test custom scanner in "Plex Media Server/Scanners/Photos/Custom Really Awesome Photos Scanner.py" and the picture library creation popup allow to select it so we can have a custom scanner for photos... The scanner cannot populate much metadata, just the year/date/title, but could create different folder categories for the pictures shall the need arise.

The agent would be the one populating the metadata info from the EXIF/XMP metadata and more especially the summary and title fields. The presence of filters in the Plez web ui for Photos library seem to indicate some undocumented level of support for metadata. What oculd be done with a scanner is populating the title with the exif data, but that doesn't seem that useful and would require a python library that accept being loaded by the scanner....

Photo scanner source:
https://github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Photos/Plex%20Photo%20Scanner.py
https://github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Common/PhotoFiles.py

Dev center down but link up https://web.archive.org/web/20140107030832/https://dev.plexapp.com/ (Thanks madman) but little on scanners but since i wrote my own i could possibly do it

os.path.getmtime would give last modification time

I don't mind doing a scanner, but all i can give you so far is a way to output logs in a custom log inside Logs folder. This could give a head start to somebody...

https://forums.plex.tv/discussion/99484/photo-agent:

Photos are scanned by the standard Scanner (look here: https://github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Photos/Plex%20Photo%20Scanner.py ) and additional metadata is extracted by the media server during analysis. There is not a separate agent like there is for other types of media.

The Plex agent seems to extract the EXIF metadatas, but it doesn't extract the XMP or the RDF...
No agent possible so the margin for manoeuvre is reduced