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

Rewrite #64

Merged
merged 80 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
d1ef4d3
Add new logging function
jvlflame Aug 8, 2020
f8cdb56
Remove old files
jvlflame Aug 9, 2020
2225ec2
Update for pipeline input
jvlflame Aug 9, 2020
b40855b
Convert settings from ini to json
jvlflame Aug 9, 2020
76ca9a6
Update file matcher to better capture contentid
jvlflame Aug 9, 2020
e573c79
Set Convert-HTMLCharacter public
jvlflame Aug 10, 2020
0405404
Update scrapers functionality
jvlflame Aug 10, 2020
f8a1876
Move scraper files to public
jvlflame Aug 10, 2020
a081e53
Update R18 scrapers
jvlflame Aug 10, 2020
fb8ba90
Set log info to verbose
jvlflame Aug 10, 2020
be1743d
Update scrapers
jvlflame Aug 11, 2020
6d2d2ef
Allow nulls on convert-htmlcharacter
jvlflame Aug 11, 2020
564ce1a
Rename dataobject filenames
jvlflame Aug 12, 2020
d7b4967
Update function names
jvlflame Aug 12, 2020
7446fbf
Update url scraper outputs
jvlflame Aug 12, 2020
964199b
Update settings file format to single line
jvlflame Aug 12, 2020
e9c2c57
Update r18/dmm retry from 5 to 3
jvlflame Aug 12, 2020
478e23d
Add initial data/aggregated functions
jvlflame Aug 12, 2020
dbfeec4
Remove get-javinizerdata file
jvlflame Aug 12, 2020
ae549fd
Update date/year field names
jvlflame Aug 13, 2020
e36a548
Update pipeline functions
jvlflame Aug 13, 2020
e7ee92f
Update dmm contentid to id
jvlflame Aug 13, 2020
1a5fafa
Update scrapers
jvlflame Aug 29, 2020
5b8407c
Updates
jvlflame Aug 30, 2020
d964874
Update thumb csv function
jvlflame Aug 30, 2020
71d8496
Fix only one actress being scraped from javlibrary
jvlflame Aug 30, 2020
5a4753a
Rename Update-JVThumbs
jvlflame Aug 31, 2020
9c25c63
Rename settings files
jvlflame Aug 31, 2020
3f12b3a
Fix extra characters in JVString conversion
jvlflame Aug 31, 2020
14de267
Remove legacy scripts
jvlflame Aug 31, 2020
2a05e0d
Add thumbcsv and alias functionality to aggregated
jvlflame Aug 31, 2020
0773660
Split scraper functions
jvlflame Aug 31, 2020
06335ee
Set Write-JLog as private function
jvlflame Aug 31, 2020
45f8fbe
Fix thumb img setting
jvlflame Aug 31, 2020
4290719
Update log messages
jvlflame Aug 31, 2020
0a4af85
Update actress set functionality in nfo
jvlflame Aug 31, 2020
e20b0f7
Add settings declaration
jvlflame Aug 31, 2020
dfeff84
Update function name Get-JVUrlLocation
jvlflame Aug 31, 2020
2926972
Update find and sort functionality
jvlflame Aug 31, 2020
98c93bb
Update verbose messaging
jvlflame Aug 31, 2020
268bf38
Allow external settings definition
jvlflame Aug 31, 2020
a224378
Fix year conversion
jvlflame Aug 31, 2020
d1a5137
Add translate/ignore genre functionality
jvlflame Aug 31, 2020
3d7cee9
Update string translation function
jvlflame Aug 31, 2020
f9768b2
Remove maxpathlength, add maxtitlelength
jvlflame Aug 31, 2020
96f53a0
Update function formatting
jvlflame Sep 1, 2020
d1699b6
Remove hardcoded module import path
jvlflame Sep 1, 2020
c6b91ce
Rename Write-JVLog
jvlflame Sep 1, 2020
8861383
Update logging
jvlflame Sep 1, 2020
1e6a551
Add nfoperfile functionality
jvlflame Sep 1, 2020
1e825ec
Add replacegenre functionality
jvlflame Sep 1, 2020
b2a9e20
Remove maxpathlength and update settings defaults
jvlflame Sep 1, 2020
b036e59
Update genre replacement defaults
jvlflame Sep 1, 2020
ef5b42d
Rewrite Test-JVData functionality
jvlflame Sep 1, 2020
cd217cf
Update logging
jvlflame Sep 1, 2020
c5c21fd
Update verbouse completed output
jvlflame Sep 1, 2020
c282b00
Fix error message output
jvlflame Sep 1, 2020
d7b45f4
Rewrite Set-JVEmbyThumbs
jvlflame Sep 1, 2020
0c356da
Set better default paging for thumbs
jvlflame Sep 1, 2020
b6d16ee
Update emby thumb functionality
jvlflame Sep 1, 2020
42467f2
Allow user-defined thumb csv path
jvlflame Sep 1, 2020
47703c0
Add user defined javlibrary base url
jvlflame Sep 1, 2020
8952757
Allow user defined genre csv
jvlflame Sep 1, 2020
3c7e3d5
Allow user defined javlibrary base url
jvlflame Sep 1, 2020
d1fb83d
Replace default log file
jvlflame Sep 1, 2020
ee60e7d
Fix trailing slash on javlibrary baseurl
jvlflame Sep 1, 2020
26ac94b
Remove legacy files
jvlflame Sep 1, 2020
474a36b
Update settings defaults
jvlflame Sep 1, 2020
6a94da5
Update if log is disabled
jvlflame Sep 1, 2020
4513d07
Fix trailing commas
jvlflame Sep 1, 2020
cbc6860
Fix open jv files
jvlflame Sep 1, 2020
ea91770
Add logging module
jvlflame Sep 1, 2020
48bd9e1
Update build to not error on code formatting check
jvlflame Sep 1, 2020
46fa2ec
Remove formattingcheck test
jvlflame Sep 1, 2020
a48b4ba
Removed logging module
jvlflame Sep 1, 2020
03e321f
Fix file declarations
jvlflame Sep 1, 2020
be5841d
Add url sort support
jvlflame Sep 1, 2020
344103c
Update for 2.0.0-alpha1
jvlflame Sep 1, 2020
f1b2b96
Fix for 2.0.0-alpha1
jvlflame Sep 1, 2020
a0bcc4e
Fix nfo host output
jvlflame Sep 1, 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
2 changes: 1 addition & 1 deletion src/Javinizer.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Add-BuildTask FormattingCheck {

if ($scriptAnalyzerResults) {
$scriptAnalyzerResults | Format-Table
throw ' PSScriptAnalyzer code formatting check did not adhere to {0} standards' -f $scriptAnalyzerParams.Setting
throw ' PSScriptAnalyzer code formatting check did not adhere to {0} standards' -f $scriptAnalyzerParams.Setting
} else {
Write-Build Green ' ...Formatting Analyze Complete!'
}
Expand Down
27 changes: 22 additions & 5 deletions 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 = '1.7.3'
ModuleVersion = '2.0.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -70,7 +70,26 @@
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('Javinizer')
FunctionsToExport = @(
'Javinizer',
'Get-DmmData',
'Get-DmmUrl',
'Get-Jav321Data',
'Get-Jav321Url',
'Get-JavBusData',
'Get-JavbusUrl',
'Get-JavlibraryData',
'Get-JavlibraryUrl',
'Get-JVAggregatedData',
'Get-JVData',
'Get-JVItem',
'Get-JVNfo',
'Get-R18Data',
'Get-R18Url',
'Set-JVEmbyThumbs',
'Set-JVMovie',
'Update-JVThumbs'
)

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = '*'
Expand Down Expand Up @@ -111,7 +130,7 @@
ReleaseNotes = 'https://github.com/jvlflame/Javinizer/blob/master/.github/CHANGELOG.md'

# Prerelease string of this module
# Prerelease = ''
Prerelease = 'alpha1'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
RequireLicenseAcceptance = $false
Expand All @@ -130,5 +149,3 @@
# DefaultCommandPrefix = ''

}


23 changes: 0 additions & 23 deletions src/Javinizer/Private/Convert-CommaDelimitedString.ps1

This file was deleted.

7 changes: 4 additions & 3 deletions src/Javinizer/Private/Convert-HTMLCharacter.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
function Convert-HTMLCharacter {
[CmdletBinding()]
param (
[string]$String
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
[AllowEmptyString()]
[String]$String
)

process {
Expand All @@ -17,8 +19,7 @@ function Convert-HTMLCharacter {
-replace '&#039', ''

$newString = $String.Trim()
# Write-Debug "[$(Get-TimeStamp)][$($MyInvocation.MyCommand.Name)] Begin String: [$String]; End string: [$newString]"
# Write-JVLog -Level Debug -Message "Begin String: [$String]; End string: [$newString]"
Write-Output $newString

}
}
75 changes: 75 additions & 0 deletions src/Javinizer/Private/Convert-JVString.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
function Convert-JVString {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[PSObject]$Data,

[Parameter(Mandatory = $true)]
[String]$FormatString,

[Parameter()]
[Int]$PartNumber,

[Parameter()]
[Int]$MaxTitleLength
)

process {
# These symbols need to be removed to create a valid Windows filesystem name
$invalidSymbols = @(
'\',
'/',
':',
'*',
'?',
'"',
'<',
'>',
'|',
"'"
)

if ($maxTitleLength) {
if ($Data.Title.Length -ge $MaxTitleLength) {
$shortTitle = $Data.Title.Substring(0, $MaxTitleLength)
$splitTitle = $shortTitle -split ' '
if ($splitTitle.Count -gt 1) {
# Remove the last word of the title just in case it is cut off
$title = ($splitTitle[0..($splitTitle.Length - 2)] -join ' ')
if ($title[-1] -match '\W') {
$Data.Title = ($title.Substring(0, $title.Length - 2)) + '...'
} else {
$Data.Title = $title + '...'
}
} else {
$Data.Title = $shortTitle + '...'
}
}
}

$convertedName = $FormatString `
-replace '<ID>', "$($Data.Id)" `
-replace '<TITLE>', "$($Data.Title)" `
-replace '<RELEASEDATE>', "$($Data.ReleaseDate)" `
-replace '<YEAR>', "$(($Data.ReleaseDate -split '-')[0])" `
-replace '<STUDIO>', "$($Data.Maker)" `
-replace '<RUNTIME>', "$($Data.Runtime)" `
-replace '<SET>', "$($Data.Series)" `
-replace '<LABEL>', "$($Data.Label)" `
-replace '<ORIGINALTITLE>', "$($Data.AlternateTitle)"

foreach ($symbol in $invalidSymbols) {
if ([regex]::Escape($symbol) -eq '/') {
$convertedName = $convertedName -replace [regex]::Escape($symbol), '-'
} else {
$convertedName = $convertedName -replace [regex]::Escape($symbol), ''
}
}

if ($PartNumber) {
$convertedName += "-pt$PartNumber"
}

Write-Output $convertedName
}
}
Loading