Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.0 #114

Merged
merged 41 commits into from
Sep 30, 2020
Merged

2.1.0 #114

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9b3a6a1
Update coverage threshold to 0
jvlflame Sep 22, 2020
f9eaa38
Fix dmm URL on id with suffix of z and e (#107)
jvlflame Sep 23, 2020
33e1999
Fix nfo name when sort.renamefile is false (#102)
jvlflame Sep 23, 2020
144ed29
Add fallback for actor name if selected language is blank in displayn…
jvlflame Sep 23, 2020
b15ec37
Add setting to insert unknown actress to aggregated data object (#105)
jvlflame Sep 23, 2020
e8d8154
Change unknown actress setting name (#105)
jvlflame Sep 23, 2020
baa59b1
Fix variable name for unknownactress
jvlflame Sep 23, 2020
abead29
Add tag and tagline to aggregated dataobject (#106)
jvlflame Sep 23, 2020
bca5e24
Fix error when tagline setting is empty (#106)
jvlflame Sep 23, 2020
271f285
Add initial dlgetchu scraper functions (#51)
jvlflame Sep 23, 2020
ddd996e
Remove extra html elements from dmm description
jvlflame Sep 24, 2020
5803861
Fix amateur r18 videos and uncensor functionality (#108)
jvlflame Sep 24, 2020
656a968
Clean up extra html on dmm description
jvlflame Sep 24, 2020
4d6d28b
Remove deprecated javlibrary session debug output
jvlflame Sep 24, 2020
a6487fa
Fix error messages when failing to opening external files
jvlflame Sep 24, 2020
b3e2c88
Set Javinizer to continue on scraper error (#109)
jvlflame Sep 24, 2020
8e87fa8
Fixed an update bug for multipart files
seeyabye Sep 22, 2020
51c5d56
Added more use cases
seeyabye Sep 22, 2020
97d744b
Regressed part support to A-D only
seeyabye Sep 24, 2020
36672b3
Added additional tests
seeyabye Sep 24, 2020
b047f6c
Moved file loop to a function
seeyabye Sep 25, 2020
480e5ab
Merge pull request #101 from seeyabye/fix/update-parts
jvlflame Sep 25, 2020
f8473e6
Fixed a bug when Url is specified on rename for DmmJa
seeyabye Sep 25, 2020
4014a0d
Fixed poster grabbing for DMM's amateur site
seeyabye Sep 25, 2020
b791e31
Merge pull request #111 from seeyabye/fix/dmmja-url
jvlflame Sep 26, 2020
d90438f
Add updated VSCode settings
jvlflame Sep 26, 2020
252c55a
Merge branch 'dev' of https://github.com/jvlflame/JAV-Organizer into dev
jvlflame Sep 26, 2020
6fa2ccb
Convert DMM's ContentID to standard ID
seeyabye Sep 26, 2020
7b22c44
Fixed regex for ID with suffix
seeyabye Sep 27, 2020
7d90fbb
Fixed bug for dmm-ja not extracting maker and label
seeyabye Sep 27, 2020
9e2d7e5
Added ContentId tag to aggregateData
seeyabye Sep 27, 2020
7cc646d
Add MediaInfo (#94)
jvlflame Sep 27, 2020
e33b972
Add a default retry to Javlibrary URL requests (#109)
jvlflame Sep 27, 2020
51a3dc7
Modified Id Preference setting
seeyabye Sep 28, 2020
df942c9
Merge branch 'dev' into feature/dmm-id
seeyabye Sep 28, 2020
79bef59
Merge pull request #112 from seeyabye/feature/dmm-id
jvlflame Sep 29, 2020
bef6f68
Add support for dlgetchu in main scraper functions (#51)
jvlflame Sep 30, 2020
9e0de6d
Fix release date for dlgetchu (#51)
jvlflame Sep 30, 2020
bf6ecb9
Update debug messages for dlgetchu (#51)
jvlflame Sep 30, 2020
b5755f0
Update thumb csv 9-29
jvlflame Sep 30, 2020
0e3337b
Update for 2.1.0
jvlflame Sep 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.0]

### Added
- **EXPERIMENTAL** Dl.getchu scraper (#51)
- This is scraper is only available via the `-Url` parameter when sorting a single file or using `-Find` to search the Url
- Setting `sort.metadata.nfo.mediainfo` added to allow user to add video/audio metadata to nfo (#94)
- [MediaInfo](https://mediaarea.net/en/MediaInfo) required for use. MediaInfo will need to be added to your system PATH
- `<RESOLUTION>` added to file formats
- Setting `sort.metadata.nfo.unknownactress` to allow `Unknown` actress to be written to nfo file when no actresses are scraped (#105)
- Setting `sort.metadata.nfo.format.tagline` to allow user to set a tagline which accepts file format strings (#106)
- Setting `sort.metadata.priority.contentid` to set the priority of the ContentId displayed by aggregated data object
- `<CONTENTID>` added to file formats

### Changed
- Default file matcher updated to better match multipart videos and support DMM ContentId (#111)
- Setting `sort.metadata.nfo.seriesastag` is now `sort.metadata.nfo.format.tag`
- This setting is now an array, which allows multiple file format strings to be created as separate tags (#106)
- Javinizer now performs a retry on the Javlibrary URL scraper and continues to run despite webrequest errors (#109)
- AggregatedData object now contains `ContentId`

### Fixed
- Get-DmmUrl now correctly assigns the URLs when searching for a movie with ID with a letter suffix (#107)
- Manually sorting with a DmmJa URL now functions properly (#111)
- Nfo file now correctly renames to the movie name when `sort.renamefile` is set to false, and `sort.create.nfoperfile` is true (#102)
- `<ACTORS>` file rename format now properly falls back to the alternate language when the primary is missing (#103)
- R18 scraper now properly assigns the genre and label fields for Amateur videos (#108)
- Extra html on the Description field for the DMM scraper is now removed



## [2.0.2]

### Fixed
Expand Down
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,17 @@
"files.insertFinalNewline": true,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"powershell.codeFormatting.preset": "OTBS"
"powershell.codeFormatting.preset": "OTBS",
"powershell.codeFormatting.autoCorrectAliases": true,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.codeFormatting.trimWhitespaceAroundPipe": true,
"powershell.codeFormatting.ignoreOneLineBlock": true,
"powershell.codeFormatting.alignPropertyValuePairs": true,
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
"powershell.codeFolding.showLastLine": true,
"powershell.codeFormatting.pipelineIndentationStyle": "NoIndentation",
"powershell.codeFormatting.whitespaceAfterSeparator": true,
"powershell.codeFormatting.whitespaceAroundOperator": true,
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenParen": true
}
68 changes: 44 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ A rebuild of my previous project [JAV-Sort-Scrape-javlibrary](https://github.com

### Install module dependencies

- [PowerShell 6/7](https://github.com/PowerShell/PowerShell)
- [PowerShell 6/7](https://github.com/PowerShell/PowerShell) *Recommended PowerShell 7
- [Python 3](https://www.python.org/downloads/)
- [Pillow](https://pypi.org/project/Pillow/)
- [Googletrans](https://pypi.org/project/googletrans/)
- [MediaInfo](https://mediaarea.net/en/MediaInfo) *MediaInfo will need to be added to your PATH

```powershell
# Python
Expand Down Expand Up @@ -401,9 +402,17 @@ ID-###_0\d - ID-069_01, ID-069_02
ID-###-cd\d - ID-069-cd1, ID-069-cd2
```

### In-depth usage
## In-depth usage

#### Metadata Priorities
### Media Library Setup

| CMS | How to use |
| ------------- | ------------- |
| Plex | Set-up a `Movie` library with custom agent [XBMCnfoMoviesImporter.bundle](https://github.com/gboudreau/XBMCnfoMoviesImporter.bundle). Turn on settings `Enable generating collections from tags` and `Use plot instead of outline` |
| Emby | Set-up a `Movie` library with all metadata/image downloaders disabled. Input your server url and API key in the `jvSettings.json` file and use `Javinizer -SetEmbyThumbs` to set actress thumbnails |
| Jellyfin | Set-up a `Movie` library with all metadata/image downloaders disabled. Input your server url and API key in the `jvSettings.json` file and use `Javinizer -SetEmbyThumbs` to set actress thumbnails |

### Metadata Priorities

Scrapers by default are english. Scrapers appended by Ja are Japanese, Zh are Chinese.
Current metadata scrapers include:
Expand All @@ -427,7 +436,22 @@ For example, if your actress priority looks like this: `"sort.metadata.priority.
- If actresses are not found on the R18 scraper but are found on the Javlibrary scraper => Javlibrary actresses will be assigned to the metadata field
- If actresses are not found on the R18 and Javlibrary scrapers but are found on the JavBus scraper => JavBus actresses will be assigned to the metadata field

#### Actress Thumb Csv
### Metadata Format Strings

- <\ID>
- <\CONTENTID>
- <\TITLE>
- <\RELEASEDATE>
- <\YEAR>
- <\STUDIO>
- <\RUNTIME>
- <\SET>
- <\LABEL>
- <\ACTORS>
- <\ORIGINALTITLE>
- <\RESOLUTION> - requires `sort.metadata.nfo.mediainfo` as true

### Actress Thumb Csv

Javinizer can utilize a csv file of actresses scraped from R18.com to further match actresses and their respective names/thumbnail URLs.

Expand Down Expand Up @@ -464,7 +488,7 @@ Nagase Yui | Nagase | Yui | 永瀬ゆい |https://[..]/nagase_yui2.jpg | Aika

If `sort.metadata.thumbcsv.autoadd` is enabled in addition to `sort.metadata.thumbcsv`, then Javinizer will automatically add any missing actresses scraped from the R18 or R18Zh scrapers to your thumbnail csv if the actress has a thumbnail.

#### Genre Csv
### Genre Csv

Javinizer can utilize a csv file of genres to replace them with a genre of your choice.

Expand Down Expand Up @@ -528,20 +552,24 @@ For example, if your jvGenres.csv file looks like this:
| `sort.download.screenshotimg` | Specifies to download screenshot images when sorting a movie. | 0, 1
| `sort.download.trailervid` | Specifies to download the trailer video when sorting a movie. | 0, 1
| `sort.format.delimiter` | Specifies the delimiter between actresses when using \<ACTORS> in the format string. | Any string value
| `sort.format.file` | Specifies the format string when renaming a file. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.folder` | Specifies the format string when creating the folder. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.posterimg` | Specifies an array of format string when creating the poster image. Multiple strings will allow you to create multiple poster image files. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.thumbimg` | Specifies the format string when creating the thumbnail image. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.trailervid` | Specifies the format string when creating the trailer video. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.nfo` | Specifies the format string when creating the nfo. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.screenshotimg` | Specifies the format string when creating the screenshot images. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.screenshotfolder` | Specifies the format string when creating the screenshot images folder. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.format.actressimgfolder` | Specifies the format string when creating the actress image folder. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.metadata.nfo.translatedescription` | Specifies to translate the description | 0, 1
| `sort.format.file` | Specifies the format string when renaming a file. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.folder` | Specifies the format string when creating the folder. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.posterimg` | Specifies an array of format strings when creating the poster image. Multiple strings will allow you to create multiple poster image files. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.thumbimg` | Specifies the format string when creating the thumbnail image. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.trailervid` | Specifies the format string when creating the trailer video. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.nfo` | Specifies the format string when creating the nfo. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.screenshotimg` | Specifies the format string when creating the screenshot images. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.screenshotfolder` | Specifies the format string when creating the screenshot images folder. | [Format Strings](#Metadata-Format-Strings)
| `sort.format.actressimgfolder` | Specifies the format string when creating the actress image folder. | [Format Strings](#Metadata-Format-Strings)
| `sort.metadata.nfo.mediainfo` | Specifies to add media metadata information to the nfo file. This requires the MediaInfo command line application. | 0, 1
| `sort.metadata.nfo.translatedescription` | Specifies to translate the description. | 0, 1
| `sort.metadata.nfo.translatedescription.language` | Specifies which language to translate to. | Check [here](https://developers.google.com/admin-sdk/directory/v1/languages) for language codes
| `sort.metadata.nfo.displayname` | Specifies the format string of the displayname in the metadata nfo file. | <\ID>, <\TITLE>, <\RELEASEDATE>, <\YEAR>, <\STUDIO>, <\RUNTIME>, <\SET>, <\LABEL>, <\ACTORS>, <\ORIGINALTITLE>
| `sort.metadata.nfo.displayname` | Specifies the format string of the displayname in the metadata nfo file. | [Format Strings](#Metadata-Format-Strings)
| `sort.metadata.nfo.seriesastag` | Specifies to add the <\SET> metadata as <\TAG> as well for Emby/Jellyfin support | 0, 1
| `sort.metadata.nfo.format.tag` | Specifies an array of format strings to add tags to the aggregated data object | [Format Strings](#Metadata-Format-Strings)
| `sort.metadata.nfo.format.tagline` | Specifies the format string to add a tagline to the aggregated data object | [Format Strings](#Metadata-Format-Strings)
| `sort.metadata.nfo.actresslanguageja` | Specifies to prefer Japanese names when creating the metadata nfo. | 0, 1
| `sort.metadata.nfo.unknownactress` | Specifies to add an 'Unknown' actress to scraped movies without any actresses | 0, 1
| `sort.metadata.thumbcsv` | Specifies to use the thumbnail csv when aggregating metadata. | 0, 1
| `sort.metadata.thumbcsv.autoadd` | Specifies to automatically add missing actresses to the thumbnail csv when scraping using the R18 or R18Zh scrapers. | 0, 1
| `sort.metadata.thumbcsv.convertalias` | Specifies to use the thumbnail csv alias field to replace actresses in the metadata. | 0, 1
Expand Down Expand Up @@ -569,11 +597,3 @@ For example, if your jvGenres.csv file looks like this:
| `javlibrary.baseurl` | Specifies the base URL of the Javlibrary instance you want to scrape. This is useful if you are running into CloudFlare errors on the main site and want to use a mirror such as g46e.com or m45e.com | http:\\/\\/javlibrary.com
| `admin.log` | Specifies to write debug, warning, error, and verbose messages to the log file. | 0, 1
| `admin.log.level` | Specifies the level of logs that will be written to the log file. | Debug, Info, Warning, Error

## Media Library Setup

| CMS | How to use |
| ------------- | ------------- |
| Plex | Set-up a `Movie` library with custom agent [XBMCnfoMoviesImporter.bundle](https://github.com/gboudreau/XBMCnfoMoviesImporter.bundle). Turn on settings `Enable generating collections from tags` and `Use plot instead of outline` |
| Emby | Set-up a `Movie` library with all metadata/image downloaders disabled. Input your server url and API key in the `jvSettings.json` file and use `Javinizer -SetEmbyThumbs` to set actress thumbnails |
| Jellyfin | Set-up a `Movie` library with all metadata/image downloaders disabled. Input your server url and API key in the `jvSettings.json` file and use `Javinizer -SetEmbyThumbs` to set actress thumbnails |
2 changes: 1 addition & 1 deletion src/Javinizer.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Add-BuildTask Test {
Assert-Build($numberFails -eq 0) ('Failed "{0}" unit tests.' -f $numberFails)

# Ensure our builds fail until if below a minimum defined code test coverage threshold
$coverageThreshold = 50
$coverageThreshold = 0

if ($testResults.CodeCoverage.NumberOfCommandsExecuted -ne 0) {
$coveragePercent = '{0:N2}' -f ($testResults.CodeCoverage.NumberOfCommandsExecuted / $testResults.CodeCoverage.NumberOfCommandsAnalyzed * 100)
Expand Down
2 changes: 1 addition & 1 deletion src/Javinizer/Javinizer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Version number of this module.

ModuleVersion = '2.0.2'
ModuleVersion = '2.1.0'

# Supported PSEditions
# CompatiblePSEditions = @('Core')
Expand Down
32 changes: 26 additions & 6 deletions src/Javinizer/Private/Convert-JVString.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,39 @@ function Convert-JVString {

$actressObject = @()
if ($ActressLanguageJa) {
$actressObject = $Data.Actress.JapaneseName
if ($null -ne $Data.Actress.Japanese) {
$actressObject = $Data.Actress.JapaneseName
} elseif ($FirstNameOrder) {
foreach ($actress in $Data.Actress) {
$actressObject += "$($actress.FirstName) $($actress.LastName)".Trim()
}
} else {
foreach ($actress in $Data.Actress) {
$actressObject += "$($actress.LastName) $($actress.FirstName)".Trim()
}
}
} elseif ($FirstNameOrder) {
foreach ($actress in $Data.Actress) {
$actressObject += "$($actress.FirstName) $($actress.LastName)".Trim()
if ($null -ne $Data.Actress.FirstName) {
foreach ($actress in $Data.Actress) {
$actressObject += "$($actress.FirstName) $($actress.LastName)".Trim()
}
} else {
$actressObject = $Data.Actress.JapaneseName
}
} else {
foreach ($actress in $Data.Actress) {
$actressObject += "$($actress.LastName) $($actress.FirstName)".Trim()
if ($null -ne $Data.Actress.FirstName) {
foreach ($actress in $Data.Actress) {
$actressObject += "$($actress.LastName) $($actress.FirstName)".Trim()
}
} else {
$actressObject = $Data.Actress.JapaneseName
}
}

$actresses = ($actressObject | Sort-Object) -join $Delimiter
$convertedName = $FormatString `
-replace '<ID>', "$($Data.Id)" `
-replace '<CONTENTID>', "$($Data.ContentId)" `
-replace '<TITLE>', "$($Data.Title)" `
-replace '<RELEASEDATE>', "$($Data.ReleaseDate)" `
-replace '<YEAR>', "$(($Data.ReleaseDate -split '-')[0])" `
Expand All @@ -80,7 +99,8 @@ function Convert-JVString {
-replace '<SET>', "$($Data.Series)" `
-replace '<LABEL>', "$($Data.Label)" `
-replace '<ACTORS>', "$actresses" `
-replace '<ORIGINALTITLE>', "$($Data.AlternateTitle)"
-replace '<ORIGINALTITLE>', "$($Data.AlternateTitle)" `
-replace '<RESOLUTION>', "$($Data.MediaInfo.VideoHeight)"

foreach ($symbol in $invalidSymbols) {
if ([regex]::Escape($symbol) -eq '/') {
Expand Down
Loading