New Categories in Plex

How to make custom categories?
Hi,

I have just started using plex and wanted to add comics to my media library. I started out searching through the forums here for plugins etc. to use and found some posts saying that plex already supports this. However, I think this may be regular photo files. Comics often comes in cbr/cbz files(renamed rar/zip files) which contains a jpg file for each page in the comic book. I saw through the scanners used by plex and I cant find any of them supporting cbr/cbz files so my guess is that plex cannot read them out of the box. I am on windows btw.

Ok, so the next thing I did was to develop a scanner for cbr/cbz files. Easy enough. Just copy/pasted the existing photo scanner and modified it for cbr/cbz files. This works and the cbr/cbz files are added to a library if I use this scanner and show up in plex media center.

So to my question: What is the best way to continue from here? I was thinking I need a new category( other than: movies, tv shows, photos, music and home movies as is the current options on the media server for a section) in plex so I manage how plex reads the cbr/cbz files. Or a plugin that "knows" how to read cbr/cbz files as a photo album. Ive studyed plugins abit, but it seems to me that these are more focused on reading data from some external source(web tv, web radio, etc.). Is it even possible to make something like I want? Does it already exist(aka I am blind and stupid)?

Any information barely related to this could help me:)

Thanks

Edit: I forgot the add the reason I am adding this to the scanner forum. Should it be the scanners job to find out what is inside the cbr/cbz files or is it the plugin/some other modules job?

I can’t speak for the, but I doubt that the Plex team are likely to add another media type for comics. It would be a pleasant surprise but, I don’t expect it’s on the list of priorities. That being said, a solution which doesn’t require that addition is probably a better bet.

It’s true that plugins are generally designed for handling web-based media but, it is possible for them to handle local media as well. I suspect that what you want would be possible with a plugin but I’ve never tried. I don’t have the time or the comic book collection (and therefore motivation) to try and get something like this off the ground. However, if you’re interested in trying to write a plugin for comic archives, I’ll offer whatever help and advice I can.



Thank you for the answer:)

Plugins are the same as channels in Plex media center right? Is there a way to write plugins that you use like sections you can add in the server? As it seems to me now, the directories to the comics have to be hardcoded into the plugin(if its possible to read local data) and the scanner will have to be kinda hard coded into to plugin again. A maintenance mess:p

Do you think I am correct in these assumptions?

Yes, plugins and channels are the same. It is possible for a plugin to request data from PMS. I believe it would be possible to make a plugin present a list of items from a PMS section. The directories wouldn’t need to be hardcoded into the plugin. They could be entered as preferences by the user. Using the onscreen keyboard to enter a file path is a little cumbersome as a user interface but definitely do-able. Depending on how you choose to implement it, the plugin could essentially replace the scanner, or it could work with it. I’m not quite sure I understand your comment about the maintenance mess. Do you mean for the user? Or for the developer/you?



I meant for me/developer, I am the user;) If I want different paths, change paths, change system etc. It would be more clean, I think, if I could use a PMS section(scanned by the comic scanner).

Further, use these items and in some way make it so PMC reads it as a photo album. I would like to avoid unpacking the files though. I hope some python libraries exists that can look into the cbr/cbz files so I can add the content in some way(May have to temporally unpack files, at least in memory).

Ive not yet wrapped my head around every part of the plex development framework, but I think what I really would like is a way to write a plugin for a section directly, not a channel, as the sections already provide the other needs I want;) For me it seems like this is not possible if I do not do something similar as you suggested above? That may be a viable solution though:)


class Comic(MediaRoot):<br />
  def __init__(self, title):<br />
    MediaRoot.__init__(self, 'Comic')<br />
    self.name = title



A "MediaRoot" object holds information basic for every media type and is defined by plex. The code above is something I first tried. I made an "extension" to the Mediaroot object and in the scanner I added cbr/cbz files as "Comic" types. Other "extensions" like photo and movies already exists. However, this is not possible. It seems like there only are these predefined categories, like mentioned in my first post, and trying to use another results in an error in the scanner log. Something like this is not possible?

Ive actually never read comics before the end of season 2 of the walking dead and I wanted to know who that katana woman at the end was:p So I guess I do not have a super high motivation, but I like to have pet projects and I find plex to be very awesome:) Just unpacking the comic archives and adding them as photo albums also will work. Not as cool though;) A section/plugin for comics could be extened with a metadata agent too:)

Edit: Subclass was the word I was looking for instead of "extension":P


Sounds to me like you've got your head wrapped around the issue pretty well. I agree that a PMS Section-type for comics would be the best solution to your problem. Failing that, yes, a way to force PMS to recognize cbr/cbz files as PhotoAlbums would be a pretty decent setup since, then all you need is a Photo section specifically for comics scanned by your custom scanner, and voila. Since, the Plex team have made it clear that they have no intention of supporting rar files for other media types, I doubt that they're going to support the cbr format either. I could be wrong.
I have no experience with scanners so I don't think I'll be much help. Good luck, though. I look forward to seeing what you come up with :)

Did this go anywhere? I was just starting the hunt for a comic book streamer to android tablet.



Would be awesome if this could be encompassed in Plex !!

Did this go anywhere?  Would love to do something similar for organizing/retrieving my library of books.

+1

There's talk of comic book readers elsewhere in the forums, and I'm definitely intrigued with a plug-in that could handle it. 

Please do plugin for comics readers! PLEEEAASE!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.