gboudreau / XBMCnfoMoviesImporter.bundle

688 stars 158 forks source link

Set name dropping "Collection" #133

Open kuangmk11 opened 3 years ago

kuangmk11 commented 3 years ago

When Importing or refreshing metadata my sets, which all end in "Collection", are imported as new sets without the "Collection" suffix as it is in the nfo.

"Star Trek: Alternate Reality Collection" is imported to "Star Trek: Alternate Reality"

d6gNMGiKx6k8 commented 3 years ago

I just noticed this as well and came here to look into it. I intentionally label all my collections with the word "collection" at the end so they are clearly different from the items when looking in the library view. If both use cases are desired (sounds like they are), perhaps it can be an option that a user can enable/disable, as applicable, to optionally drop the word.

I'd guess that it was stripped to prevent accidental importing with it, but for those that actually want it, we lose it. I'd suggest those that don't want it fix it before it imports - haha.

Regardless, an option to toggle would be really cool to allow for both scenarios.

tardezyx commented 3 years ago

I think you can solve it by adjusting line 684 in the init.py:

                setname_pat = re.compile(r'[\s]?(series|collection)$', re.IGNORECASE)

You should put some gibberish nonsense instead of series|collection like:

                setname_pat = re.compile(r'[\s]?(h0LyM0Ly123)$', re.IGNORECASE)

As the following code uses setname_pat to remove "series" or "collection" from the collection string - it now tries to remove "h0LyM0Ly123" from that string which should not happen too often ;-)

pasha-19 commented 1 year ago

I just started using this feature and the trial and error approach to getting this working I just learned the same thing. The documentation for this feature that I found does not include this reasonable design consideration, "Collection" is common on downloaded movie set names that I used for collection names in Kodi. I like the original author like having Collection on Collection names (I also admit that the Plex icon for a collection makes this less necessary). Since this library is moving to Plex I could have multiple collections per item meaning remaining identical is not required. The Kodi app runs on mobile devices setup years ago. My autistic grandson likes touch screen capability. I migrated from Kodi to Jellyfin for local access on the network. I am migrating to Plex in hopes to support both mobile devices and LAN devices like TV's and desktops. I would like to see the trimming of Collection/Series be an option instead of requiring me to track source code changes across releases. Plex vs Jellyfin; I prefer Jellyfin however my available target is TruNAS core server and Jellyfin is a significant third party kluge of an install so reluctantly I am opting for Plex in hopes that their app will meet my needs when I can test it. For now I am going with the flow and dropping the Collection Suffix in the Plex environment.