Closed damenootoko closed 4 years ago
oh, and outside of this, i'm getting 403 failure when getting cover image from r18
WARNING: [2020-09-11T11:16:15][Set-JavMovie] Error downloading cover images Exception: C:\Users\Funster\Documents\PowerShell\Modules\Javinizer\1.7.3\Private\Set-JavMovie.ps1:113 Line | 113 | … $webClient.DownloadFile(($DataObject.CoverUrl).ToString() … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (403) | Forbidden."
did they implement some kind of blocking mechanism?
Seems like R18 now requires a User Agent to be included in the header when performing requests on their media resources. I've addressed it in #80 and #82, but seems like that did not solve it completely.
I'll have a fix in place for both the v1.x.x and v2.x.x versions shortly.
[update] on 1.7.5 it seems some of it is solved, but the get actress img is still being affected
WARNING: [2020-09-11T14:28:41][Set-JavMovie] Error downloading actress images Exception: C:\Users\Funster\Documents\PowerShell\Modules\Javinizer\1.7.5\Private\Set-JavMovie.ps1:194 Line | 194 | … $webClient.DownloadFile($actress.thumb, (Join-Path -Path … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (403) | Forbidden."
Resolved with https://github.com/jvlflame/Javinizer/commit/eb810bcd6298283cfefad23cf02a151678969c15. Going to push 1.7.6 shortly..
allright, it seems to be totally fixed in 1.7.6 but now the -SetEmbyActorThumbs doesn't work with error forbidden, I don't know whether this issue is still related (maybe emby doesn't have the required user agent for r18) or anything else, but if you deemed it unrelated we can close this issue
`[2020-09-11T16:01:05][Set-EmbyActors] Writing thumburl [https://pics.r18.com/mono/actjpgs/yukimi_chinatsu.jpg] to actor [Yukimi Chinatsu]
DEBUG: [2020-09-11T16:01:05][Set-EmbyActors] Performing [POST] on Uri [192.168.1.10:8096/emby/Items/8480/RemoteImages/Download?Type=Thumb&ImageUrl=https://pics.r18.com/mono/actjpgs/yukimi_chinatsu.jpg&api_key=794569f1206846849527b2f13dff0d2a]
Invoke-RestMethod: C:\Users\Funster\Documents\PowerShell\Modules\Javinizer\1.7.6\Private\Set-EmbyActors.ps1:45
Line |
45 | … $rest = Invoke-RestMethod -Method Post -Uri "$embyServerUri/emby/ …
| ~~~~~~~~~~~~~
| Forbidden
DEBUG: [2020-09-11T16:01:05][Set-EmbyActors] Performing [POST] on Uri [192.168.1.10:8096/emby/Items/8480/RemoteImages/Download?Type=Primary&ImageUrl=https://pics.r18.com/mono/actjpgs/yukimi_chinatsu.jpg&api_key=794569f1206846849527b2f13dff0d2a]
DEBUG: AAAA
VERBOSE: POST http://192.168.1.10:8096/emby/Items/8480/RemoteImages/Download?Type=Primary&ImageUrl=https://pics.r18.com/mono/actjpgs/yukimi_chinatsu.jpg&api_key=794569f1206846849527b2f13dff0d2a with 0-byte payload
VERBOSE: received 9-byte response of content type text/html
Invoke-RestMethod: C:\Users\Funster\Documents\PowerShell\Modules\Javinizer\1.7.6\Private\Set-EmbyActors.ps1:48
Line |
48 | … $rest = Invoke-RestMethod -Method Post -Uri "$embyServerUri/emby/ …
| ~~~~~~~~~~~~~
| Forbidden`
(the AAAA line is what i added while doing some debugging, and i don't know whether this 403 is by emby or r18, the get persons list works though)
turns out it really was failure in emby itself
2020-09-11 16:12:35.342 Error HttpServer: Error processing request *** Error Report *** Version: 4.4.3.0 Command line: C:\Users\Funster\AppData\Roaming\Emby-Server\system\EmbyServer.dll Operating system: Microsoft Windows NT 6.2.9200.0 64-Bit OS: True 64-Bit Process: True User Interactive: True Runtime: file:///C:/Users/Funster/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll System.Environment.Version: 3.1.4 Processor count: 16 Program data path: C:\Users\Funster\AppData\Roaming\Emby-Server\programdata Application directory: C:\Users\Funster\AppData\Roaming\Emby-Server\system MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Forbidden at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod) at MediaBrowser.Providers.Manager.ProviderManager.SaveImage(BaseItem item, String url, ImageType type, Nullable
1 imageIndex, CancellationToken cancellationToken)
at MediaBrowser.Api.Images.RemoteImageService.DownloadRemoteImage(BaseItem item, BaseDownloadRemoteImage request)
at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory1 urlString, ReadOnlyMemory
1 localPath, CancellationToken cancellationToken)
Source: Emby.Server.Implementations
TargetSite: Void MoveNext()`
So I think it's safe to close this issue, since the problem is in emby itself
Opened feature request on emby board itself https://emby.media/community/index.php?/topic/89821-override-custom-user-agent-for-remoteimageservice/
can i close this issue @jvlflame ?
Yep, thanks for confirming the fix. As for the Emby stuff, I will do some testing as well.
As for version 1.7.x, I haven't tested the Emby/Jellyfin actor functionality in a while, but I rewrote the functionality and tested setting Jellyfin actors with my v2.0.0alpha builds.
I'll do some testing with both Emby/Jellyfin on both 1.7.6 and 2.0.0 and we can open another issue if it has stopped working for Emby.
Expected Behavior
javinizer -apply command completed succesfully
Current Behavior
fails with an error
WARNING: [2020-09-11T11:07:47][Set-JavMovie] Error downloading cover images Exception: C:\Users\Funster\Documents\PowerShell\Modules\Javinizer\1.7.3\Private\Set-JavMovie.ps1:113 Line | 113 | … $webClient.DownloadFile(($DataObject.CoverUrl).ToString() … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Exception calling "DownloadFile" with "2" argument(s): "A connection attempt failed because the | connected party did not properly respond after a period of time, or established connection failed | because connected host has failed to respond. A connection attempt failed because the connected party | did not properly respond after a period of time, or established connection failed because connected | host has failed to respond."
the cover url does exist and echoed in the script, and when i go to download it manually, rename it to fanart.jpg, and rerun apply it completes successfully (even downloading the much larger trailer file)
Steps to Reproduce (for bugs)
run javinizer on some title, (includes HUNTA-733, JUL-059, and miaa-201
Your Environment
Actress scrapers
scrape-actress-en=True scrape-actress-ja=True
[General]
Maximum number of threads to sort with if parameter '-Multi' is applied (range 1-15)
multi-sort-throttle-limit=5 move-to-folder=True rename-file=True
Available tags for file/folder rename string
I do not recommend changing the filename other than as you may have to manually rename files if you need to re-sort them at a later date
rename-file-string=""
rename-folder-string=" [] - ()"
cms-displayname-string="[] "
actors-name-delimiter=", "
poster-file-string="folder"
thumbnail-file-string="fanart"
trailer-file-string="-trailer"
nfo-file-string will only apply if create-nfo-per-file=False
nfo-file-string=""
screenshot-folder-string="extrafanart"
screenshot-img-string="fanart"
actorimg-folder-string=".actors"
Max-title-length will limit the length of your string
max-title-length=100
Max-path-length will limit the sorting of a file if its full path is greater than this number
max-path-length=255
This option will allow Javinizer to ignore video files below a certain size (in MB)
minimum-filesize-to-sort=0 included-file-extensions=asf,avi,flv,m4v,mkv,mp4,mov,rmvb,wmv excluded-file-strings=-trailer.,-5.
Allows you to use a regex string to match files if the default Javinizer matcher doesn't work
(e.g. In regex ([a-zA-Z|tT28]+-\d+z{0,1}Z{0,1}e{0,1}E{0,1})(?:-pt){0,1}(\d{1,2})? , "[ABP-123] Title text-pt3.mp4", match 1 is "ABP-123, match 2 is "3")
regex-match=False
The match value of your movie ID (e.g. "ID-112")
regex-id-match=1
The match value of your movie part number (e.g. "2")
regex-pt-match=2 regex=([a-zA-Z|tT28]+-\d+z{0,1}Z{0,1}e{0,1}E{0,1})(?:-pt){0,1}(\d{1,2})?
[Metadata]
General metadata options
If you use Emby/Jellyfin, create-nfo-per-file is required (nfo is required to have the same filename)
create-nfo=True create-nfo-per-file=True download-thumb-img=True
Download-poster-img requires download-thumb-img to be true
download-poster-img=True download-screenshot-img=False download-trailer-vid=True download-actress-img=False translate-description=True
View language codes: https://developers.google.com/admin-sdk/directory/v1/languages
translate-description-language=en
Use this if you want R18 series names to be set as clickable tag in Emby. If you primarily use Plex, you can set this to false.
add-series-as-tag=True
True = FirstName LastName / False = LastName FirstName
first-last-name-order=False
This option will convert actress names matching 'Alias' in r18-thumbs.csv to their original full name
convert-alias-to-originalname=True
This will convert all JavLibrary genres to their R18 counterparts to keep a consistent genre schema. If you want to use JAVLibrary genres, set this to false.
normalize-genres=True
List of genres to ignore in comma separated format (no spaces)
ignored-genres="Featured Actress,Hi-Def"
Metadata scraping priorities
Javinizer will fail the sort on a movie if any fields listed in required-metadata-fields is null
required-metadata-fields=coverurl,genre,id,maker,title,releasedate,releaseyear actress-priority=r18,javlibrary actressthumburl-priority=r18 alternatetitle-priority=dmm coverurl-priority=r18,dmm,javlibrary description-priority=dmm director-priority=r18,javlibrary genre-priority=r18,javlibrary id-priority=r18,javlibrary label-priority=r18,javlibrary maker-priority=r18,javlibrary rating-priority=dmm ratingcount-priority=dmm releasedate-priority=r18,javlibrary,dmm releaseyear-priority=r18,javlibrary,dmm runtime-priority=r18,javlibrary,dmm series-priority=r18 screenshoturl-priority=r18,dmm title-priority=r18,javlibrary trailerurl-priority=r18
[Locations]
These locations will only be used if you are running Javinizer with the -Apply parameter
input-path="F:\R18\JAV_UNORGANIZED" output-path="F:\R18\JAV_ORGANIZED"
[Emby/Jellyfin]
You can create an Emby/Jellyfin API key under Dashboard -> Advanced -> Security
server-url=192.168.1.10:8096 server-api-key=b56f075411e44f07a5a03ad97d7f424d
[JavLibrary] set-owned=False username=####censored#### session-cookie=####censored#### request-timeout-sec=90
[Other]
Log path will default to the javinizer.log file inside your module directory
log-path= check-updates=True verbose-shell-output=True debug-shell-output=True