javinizer / Javinizer

(NSFW) Organize your local Japanese Adult Video (JAV) library
MIT License
572 stars 61 forks source link

Error occurred when creating nfo file #245

Closed ghost closed 3 years ago

ghost commented 3 years ago

Expected Behavior

Sort film

Current Behavior

Failed to generated nfo, program aborted.

Steps to Reproduce (for bugs)

> javinizer -Path D:\jav\raw\OFJE-292\ -DestinationPath D:\javinizer\ -Debug                              DEBUG: [OFJE-292] [Get-JVData] [Search - DmmJa] [Url - ]                                                                DEBUG: [OFJE-292] [Get-JVData] [Search - R18] [Url - ]                                                                  DEBUG: [OFJE-292] [Get-JVData] [Search - Javlibrary] [Url - ]                                                           DEBUG: [OFJE-292] [Get-JVData] [Search - MgstageJa] [Url - ]                                                            DEBUG: [OFJE-292] [Get-JVData] [Waiting - Scraper jobs] [jvdata-DmmJa jvdata-R18 jvdata-Javlibrary jvdata-MgstageJa]    DEBUG: [OFJE-292] [Get-JVData] [Completed - Scraper jobs] [jvdata-DmmJa jvdata-R18 jvdata-Javlibrary jvdata-MgstageJa]  WARNING: [OFJE-292] [Get-MgstageUrl] not matched on Mgstage                                                             DEBUG: [OFJE-292] [Get-JVData] [Success - Scraper jobs] [dmmja r18 javlibrary]                                          DEBUG: [OFJE-292] [Get-JVData] [Removed - Scraper jobs]                                                                 DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - javlibrary] Set to [[{"LastName":"Kojima","FirstName":"Minami","JapaneseName":"小小島島みみななみみ","ThumbUrl":null},{"LastName":"Mikami","FirstName":"Yua","JapaneseName":"三三上上悠悠亜亜","ThumbUrl":null},{"LastName":"Yumi","FirstName":"Shion","JapaneseName":"夕夕美美ししおおんん","ThumbUrl":null},{"LastName":"Hoshimiya","FirstName":"Ichika","JapaneseName":"星星宮宮一一花花","ThumbUrl":null},{"LastName":"Hinata","FirstName":"Marin","JapaneseName":"ひひななたたまま りりんん","ThumbUrl":null},{"LastName":"Yoshioka","FirstName":"Hiyori","JapaneseName":"吉吉岡岡ひひよよりり","ThumbUrl":null},{"LastName":"Hanamiya","FirstName":"Amu","JapaneseName":"花花宮宮ああむむ","ThumbUrl":null},{"LastName":"Amane","FirstName":"Mahina","JapaneseName":"天天音音ままひひなな","ThumbUrl":null},{"LastName":"Nanatsumori","FirstName":"Riri","JapaneseName":"七七ツツ森森りりりり","ThumbUrl":null},{"LastName":"Asuka","FirstName":"Aka","JapaneseName":"有有栖栖花花ああかか","ThumbUrl":null}]]                        DEBUG: [OFJE-292] [Get-JVAggregatedData] [AlternateTitle - javlibraryja] Set to [null]                                  DEBUG: [OFJE-292] [Get-JVAggregatedData] [AlternateTitle - dmmja] Set to [null]                                         DEBUG: [OFJE-292] [Get-JVAggregatedData] [CoverUrl - r18] Set to ["https://pics.r18.com/digital/video/ofje00292/ofje00292pl.jpg"]                                                                                                               DEBUG: [OFJE-292] [Get-JVAggregatedData] [Description - r18] Set to [null]                                              DEBUG: [OFJE-292] [Get-JVAggregatedData] [Description - dmmja] Set to ["S1女女優優たたちちががSEXよよりりもも気気持持ちちイイイイ抜抜ききテテククででいい~~ぱぱ いい抜抜いいててくくれれるる超超快快感感のの射射精精ララッッシシュュ150連連発発!!!!2分分以以内内にに必必ずず射射精精ののタタイイミミンンググがが訪訪れれるるスストトレレススフフリリーーののオオナナニニーー専専用用BEST!!ささささややきき手手ココキキ、、見見つつめめななががららののパパイイズズリリ、、チチンンポポにに絡絡みみつつくくババキキュューームムフフェェララななどど超超ややららししくく下下品品にに全全力力チチンンポポ愛愛撫撫!!可可愛愛いい女女のの子子ににチチンンポポをを触触らられれたただだけけででフフルル勃勃起起!!至至福福のの240分分間間をを堪堪能能ししててくくだだささいい!!"]                                                       DEBUG: [OFJE-292] [Get-JVAggregatedData] [Director - javlibrary] Set to [null]                                          DEBUG: [OFJE-292] [Get-JVAggregatedData] [Director - r18] Set to [null]                                                 DEBUG: [OFJE-292] [Get-JVAggregatedData] [Director - mgstageja] Set to [null]                                           DEBUG: [OFJE-292] [Get-JVAggregatedData] [Director - aventertainment] Set to [null]                                     DEBUG: [OFJE-292] [Get-JVAggregatedData] [Genre - javlibrary] Set to [["Blow","Handjob","Best, Omnibus","Big Tits","Beautiful Girl","4HR+"]]                                                                                                    DEBUG: [OFJE-292] [Get-JVAggregatedData] [Id - javlibrary] Set to ["OFJE-292"]                                          DEBUG: [OFJE-292] [Get-JVAggregatedData] [Label - javlibrary] Set to ["S1 NO.1 STYLE"]                                  DEBUG: [OFJE-292] [Get-JVAggregatedData] [Maker - javlibrary] Set to ["S1 NO.1 STYLE"]                                  DEBUG: [OFJE-292] [Get-JVAggregatedData] [Rating - dmmja] Set to [{"Rating":"10","Votes":"2"}]                          DEBUG: [OFJE-292] [Get-JVAggregatedData] [ReleaseDate - javlibrary] Set to ["2021-01-07"]                               DEBUG: [OFJE-292] [Get-JVAggregatedData] [Runtime - javlibrary] Set to ["240"]                                          DEBUG: [OFJE-292] [Get-JVAggregatedData] [Series - r18] Set to ["S1 GIRLS COLLECTION"]                                  DEBUG: [OFJE-292] [Get-JVAggregatedData] [ScreenshotUrl - r18] Set to [["https://pics.r18.com/digital/video/ofje00292/ofje00292jp-1.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-2.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-3.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-4.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-5.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-6.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-7.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-8.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-9.jpg","https://pics.r18.com/digital/video/ofje00292/ofje00292jp-10.jpg"]]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Title - r18] Set to ["Stunningly Beautiful Girls Try Their Best Techniques To Get Guys Off - Other Than Sex! Cocks Lovingly Lavished With Attention - Pleasure Like Never Before - 150 Loads"]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [TrailerUrl - r18] Set to ["https://awscc3001.r18.com/litevideo/freepv/o/ofj/ofje00292/ofje00292_dmb_w.mp4"]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [ContentId - r18] Set to ["ofje00292"]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Kojima","FirstName":"Minami","JapaneseName":"小島みなみ","ThumbUrl":null}] matched to [{"LastName":"Kojima","FirstName":"Minami","JapaneseName":"小島みなみ","ThumbUrl":"https://pics.r18.com/mono/actjpgs/kozima_minami2.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Mikami","FirstName":"Yua","JapaneseName":"三上悠亜","ThumbUrl":null}] matched to [{"LastName":"Mikami","FirstName":"Yua","JapaneseName":"三上悠亜","ThumbUrl":"https://pics.r18.com/mono/actjpgs/mikami_yua.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Yumi","FirstName":"Shion","JapaneseName":"夕美しおん","ThumbUrl":null}] matched to [{"LastName":"Yumi","FirstName":"Shion","JapaneseName":"夕美しおん","ThumbUrl":"https://pics.r18.com/mono/actjpgs/yuumi_sion.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Hoshimiya","FirstName":"Ichika","JapaneseName":"星宮一 花","ThumbUrl":null}] matched to [{"LastName":"Hoshimiya","FirstName":"Ichika","JapaneseName":"星宮一花","ThumbUrl":"https://pics.r18.com/mono/actjpgs/hosimiya_itika.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Hinata","FirstName":"Marin","JapaneseName":"ひなたまり ん","ThumbUrl":null}] matched to [{"LastName":"Hinata","FirstName":"Marin","JapaneseName":"ひなたまりん","ThumbUrl":"https://pics.r18.com/mono/actjpgs/hinata_marin.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Yoshioka","FirstName":"Hiyori","JapaneseName":"吉岡ひより","ThumbUrl":null}] matched to [{"LastName":"Yoshioka","FirstName":"Hiyori","JapaneseName":"吉岡ひより","ThumbUrl":"https://pics.r18.com/mono/actjpgs/yosioka_hiyori.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Hanamiya","FirstName":"Amu","JapaneseName":"花宮あむ","ThumbUrl":null}] matched to [{"LastName":"Hanamiya","FirstName":"Amu","JapaneseName":"花宮あむ","ThumbUrl":"https://pics.r18.com/mono/actjpgs/hanamiya_amu.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Amane","FirstName":"Mahina","JapaneseName":"天音まひな","ThumbUrl":null}] matched to [{"LastName":"Amane","FirstName":"Mahina","JapaneseName":"天音まひな","ThumbUrl":"https://pics.r18.com/mono/actjpgs/amane_mahina.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Nanatsumori","FirstName":"Riri","JapaneseName":"七ツ森 りり","ThumbUrl":null}] matched to [{"LastName":"Nanatsumori","FirstName":"Riri","JapaneseName":"七ツ森りり","ThumbUrl":"https://pics.r18.com/mono/actjpgs/nanatumori_riri.jpg"}]
DEBUG: [OFJE-292] [Get-JVAggregatedData] [Actress - {"LastName":"Asuka","FirstName":"Aka","JapaneseName":"有栖花あか","ThumbUrl":null}] matched to [{"LastName":"Asuka","FirstName":"Aka","JapaneseName":"有栖花あか","ThumbUrl":"https://pics.r18.com/mono/actjpgs/asuka_aka.jpg"}]
Get-RunspaceData: C:\Users\me\Documents\PowerShell\Modules\Javinizer\2.4.5\Public\Invoke-JVParallel.ps1:568
Line |
 568 |              Get-RunspaceData -Wait
     |              ~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "EndInvoke" with "1" argument(s): "The running command stopped because the
     | preference variable "ErrorActionPreference" or common parameter is set to Stop: [OFJE-292]
     | [Set-JVMovie] Error occurred when creating nfo file [D:\javinizer\@Group\2021\OFJE-292 [S1 NO.1 STYLE]
     | - Stunningly Beautiful Girls Try Their Best Techniques To Get Guys Off - Other Than Sex!
     | Cocks...\OFJE-292.nfo]: Could not find a part of the path 'D:\javinizer\@Group\2021\OFJE-292 [S1 NO.1
     | STYLE] - Stunningly Beautiful Girls Try Their Best Techniques To Get Guys Off - Other Than Sex!
     | Cocks...\OFJE-292.nfo'."

Your Environment

ghost commented 3 years ago

oops my fault syntax error in config file closed.

jvlflame commented 3 years ago

Great, glad you were able to resolve this!

ghost commented 3 years ago

Actually, the error occur with 2.4.5 using following config I downgraded to 2.3.3 and works fine

"sort.format.folder": "<ID> [<STUDIO>] - <TITLE>",
"sort.format.outputfolder": ["<ACTORS>", "<YEAR>"],
ghost commented 3 years ago

Great, glad you were able to resolve this!

could you please check if the config works for 2.4.5?

jvlflame commented 3 years ago

Actually, the error occur with 2.4.5 using following config I downgraded to 2.3.3 and works fine

"sort.format.folder": "<ID> [<STUDIO>] - <TITLE>",
"sort.format.outputfolder": ["<ACTORS>", "<YEAR>"],

I believe the issue actually has to do with the trailing periods in the folder name due to <TITLE> being at the end of the sort.format.folder setting. When Windows creates directories, any trailing periods are culled, which is then causing the error that the path isn't found when creating the nfo. Let me see if I can add in a workaround for this.

telix5000 commented 3 years ago

Same issue using Docker 2.4.6 (latest). It attempts to create the .nfo, and does, but it is of 0 size. Then it tells me access denied, but it worked previously a few versions ago before it updated.

jvlflame commented 3 years ago

Same issue using Docker 2.4.6 (latest). It attempts to create the .nfo, and does, but it is of 0 size. Then it tells me access denied, but it worked previously a few versions ago before it updated.

Yep.. I fixed the bug in an earlier release but accidently re-introduced it after doing some major code changes for some GUI functionality.

I already have a fix in place on my dev environment, but have yet to push a new release. If you want to implement the fix before the new release, copy the changes from https://github.com/jvlflame/Javinizer/commit/f76554bb445cf174aa16f032cc90f1bb751acc3b to the Get-JVSortData.ps1 file in your Javinizer module folder (if Docker, you'll need to bash into the container and find the module folder with (Get-InstalledModule Javinizer).InstalledLocation)

telix5000 commented 3 years ago

I made the modification but this still hasn't fixed the 0 byte creation of the nfo files. Same error message. Same problem.

jvlflame commented 3 years ago

@telix5000 You'll have to restart the Javinizer dashboard to make the changes reflect. If you go to http://<IP>:<PORT>/admin for your docker deployment, you can login with credentials:

Navigate to the dashboards window in the sidebar and find the javinizer dashboard entry and press restart.

I'll try to push this fix into a new release later today.

telix5000 commented 3 years ago

That didn't work. I restarted the dashboard and the container. I'll just wait till you push the new version for Docker. I'm still waiting on a ton of data to transfer to my new array so I am not in some serious hurry to re-run this, but it's rather unfortunate it is still saying access denied. It creates the folder just fine, it just cannot seem to properly generate the .nfo.

jvlflame commented 3 years ago

@telix5000 I pushed a new docker tag 2.4.7-alpha. Can you run that version and see if that fixes your issue?

telix5000 commented 3 years ago

Same issue:

[2021-03-14T23:02:38][DEBUG] [AAO-020] [Set-JVMovie] [Directory] created at path [/xxx/JAV/Tdarr/AAO-020] [2021-03-14T23:02:38][ERROR] [AAO-020] [Set-JVMovie] Error occurred when creating nfo file [/xxx/JAV/Tdarr/AAO-020/AAO-020.nfo]: Access to the path '/xxx/JAV/Tdarr/AAO-020/AAO-020.nfo' is denied.

jvlflame commented 3 years ago

@telix5000 Ah, that's a different error than what the original issue is pertaining to, I didn't notice it in your earlier comments.

I would say that might be an issue with your directory permissions or your docker mount permissions. Can you double check that your container has full read/write permissions on that mount? Can you go to the Console page of the GUI and do a ls -lh /xxx/JAV/Tdarr and check the permissions of the directories that are being created?

telix5000 commented 3 years ago

Here you go (they're all the same):

drwxr-xr-x 2 1000 1000 0 Mar 12 14:53 ABW-037

jvlflame commented 3 years ago

@telix5000 For some reason your files are being created without write permissions. Are you familiar with modifying file permissions?

You could try a generic chmod -R 777 /xxx/JAV/Tdarr. Other than that, you can try pointing your destination folder to a different location to see maybe if it's only that folder that has permission issues.

telix5000 commented 3 years ago

That didn't work either. I even created a new directory, same issue. I don't think it is permissions if the directories are being created but the file is just a null value.

jvlflame commented 3 years ago

@telix5000 Can you go to the console again and try creating a generic nfo file?

'test' | out-file /xxx/JAV/Tdarr/test.nfo

Also try creating one directly inside the container, rather than on your mount.

'test' | out-file /home/test.nfo

telix5000 commented 3 years ago

Access to the path '/xxx/JAV/Tdarr/test.nfo' is denied.

jvlflame commented 3 years ago

@telix5000 Did you also get access denied when creating within the container?

telix5000 commented 3 years ago

Nope, I created it from scratch. Even removed the images previously. I used the same account I use for Radarr/Sonarr/Lidarr/et al and they can move/delete files without issues via Docker to the same path(s). This is the only thing giving me issues.

jvlflame commented 3 years ago

@telix5000 Sorry, I'm not as familiar with linux/docker permissions as I'd like to be so I can't really debug your specific error. I tried to reproduce your issue on my side as well, but my files/directories are being created with the correct umask of 000 within the container.

If possible, try reproducing the error on docker image jvlflame/javinizer:2.2.5. Otherwise, I would recommend spinning up a Windows VM and running the windows deployment of the GUI on there instead.

telix5000 commented 3 years ago

I figured out the workaround, but the bug is pretty bad. Basically, it's not able to cooperate with CIFS shares being mounted in Ubuntu. I was able to workaround the bug by using a NFS mount instead; but it still baffles me why I can create directories but not actual files. You may want to check on that, could be a bug in whatever is hosting the dashboard. I have all my permissions set appropriately too and after a few hours I narrowed it down to just that.

jvlflame commented 3 years ago

@telix5000 Awesome, I'm glad you were able to figure out a workaround! By any chance did you test your original CIFS shares being mounted on tag 2.2.5? I used a different base image (ubuntu:18.04 => python:3.9.2-buster) for the newer versions so I'm wondering if it's possible that has anything to do with it. Off the top of my head I can't think of any other changes that were made that could affect it.

telix5000 commented 3 years ago

I tried, but it wasn't really cooperating adding back in the dashboard. It really seems to be bit of a pain in Linux now and then. I tried out some other nonsense deleting, creating and moving files around and I did see some issues deleting a few dupes in Plex. This could be something to do with CIFS, but I am not certain. The NFS works fine, so perhaps CIFS has some weird bugs under Ubuntu 20.x, which really wouldn't shock me at this point. As a suggestion, this whole system would really be optimal under some branch off from Radarr, like Bonarr and merge it with the lookup features. It'd be the killer app at that point.

jvlflame commented 3 years ago

I tried, but it wasn't really cooperating adding back in the dashboard.

Ah right, older versions also required to manually import the dashboard with a different script path and also had a different container port. Anyhow, I'm glad it's working with NFS. I'm not too familiar with using CIFS, but hopefully they're able to optimize it eventually.

I think at this point, integrating into a *arr app would probably be hard given the project's language as well as some of the currently integrated features. It's an interesting idea for sure.

telix5000 commented 3 years ago

Technically, you could just have it take the RSS feeds via Jackett for like OneJAV, pass it to a torrent client; grab the files when complete, throw it through your organizer and it'd be actually optimal. It'd be better if there was some stand-alone integrated RSS grabber, that way it's just passing the .torrent file over to the download client, and like I said earlier, just do a workflow on the retrieved file.

anytinz commented 2 years ago

I think I encountered the same problem with @telix5000 , but I tried to fix it and it succeeded. The problem is in PowerShell, and the same problem is in the PowerShell/PowerShell#15339 and PowerShell/PowerShell#16056. I am able to solve the problem after upgrading PowerShell to PowerShell-Perview by modifying the Dockerfile.

RUN wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb \
    && dpkg -i packages-microsoft-prod.deb \
    && apt-get update \
    && apt-get install -y powershell-preview \
    && rm -rf /var/lib/apt/lists/* \
    && mv /usr/bin/pwsh-preview /usr/bin/pwsh