johnkiddjr / PlexMatch-File-Generator

This application generates a .plexmatch file in the directory of all shows and movies added to your Plex Server. This is especially useful for migrating storage devices if you have some shows that needed a custom match.
MIT License
64 stars 2 forks source link

Null Reference Exception #24

Closed Findarato closed 2 years ago

Findarato commented 2 years ago

Tried to run your tool on the plex server and kept getting the following error

[12:13:51 INF] Logger attached. Startup complete. Running file generator...
[12:13:51 ERR] An unhandeled exception occurred details below:
[12:13:51 ERR] Exception Type: System.NullReferenceException
[12:13:51 ERR] Exception Message: Object reference not set to an instance of an object.
[12:13:51 ERR] Exception Source: PlexMatchGenerator
[12:13:51 ERR] Exception Stack Trace:    at PlexMatchGenerator.Services.GeneratorService.Run(GeneratorOptions options)
johnkiddjr commented 2 years ago

Can you share the parameters you used?

techie2000 commented 2 years ago

I have just tried using this for the first time and observed the exact same INF/ERR msgs.

My cli input was ./PlexMatchGenerator-Linux-x64 -u http://192.168.1.115:32400 -t mysecrettoken -l /tmp/plexmatch/

I was running 0.4.2-beta on linux (Slackware 14.2)

johnkiddjr commented 2 years ago

This issue should be fixed with v0.4.3-beta (which is building now)

techie2000 commented 2 years ago

This issue should be fixed with v0.4.3-beta (which is building now)

The error is not observed in 0.4.3-beta, but when executed now returns a different error for every folder (be it tvshow, film, music etc, e.g.

07:56:44 ERR] Missing or Invalid Folder: /webshows/linustechtips [youtube-UCXuqSBlHAE6Xw-yeJA0Tunw]

johnkiddjr commented 2 years ago

@techie2000 Does that folder exist on the machine running the application? If not, you'll have to use root path remapping (the -r command line switch) to change it to the path as it exists on the machine running the application

techie2000 commented 2 years ago

@techie2000 Does that folder exist on the machine running the application? If not, you'll have to use root path remapping (the -r command line switch) to change it to the path as it exists on the machine running the application

ah, I see (I did wonder what that switch was intended for/what use-case to employ it on). So my command would run ok if I executed it inside the plex docker container. The container maps /webshows to /mnt/user/webshows/share/ on the host so I now execute with -r /mnt/user/webshows/share:/webshows and all is well in the world. I'll try repeating for all the other mappings but expect it to work now.

Many thanks for the help 👍

The way I read the official Plex documentation (https://support.plex.tv/articles/plexmatch/), .plexmatch only works on tvshows? If that's the case, I would have thought the code would/should only work on tvshow libraries, at least by default, and perhaps an optional flag to work on other/all other library types?

Thanks.