Skip to content

Commit

Permalink
fixes to Module1.bas
Browse files Browse the repository at this point in the history
  • Loading branch information
bullmoose20 committed Mar 28, 2024
1 parent ce5e120 commit eeeba88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Module1.bas
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ Sub ImportCSVs(folderPath)
Set wsImageChoices = ThisWorkbook.Worksheets.Add
wsImageChoices.Name = "ImageChoices"
ThisWorkbook.Queries.Add Name:="ImageChoices", Formula:= _
"let" & Chr(13) & "" & Chr(10) & " Source = Csv.Document(File.Contents(""" & Filename1 & """),[Delimiter="";"", Columns=9, Encoding=65001, QuoteStyle=QuoteStyle.None])," & Chr(13) & "" & Chr(10) & " #""Promoted Headers"" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])," & Chr(13) & "" & Chr(10) & " #""Changed Type"" = Table.TransformColumnTypes(#""Promoted Headers"",{{""Title"", type text}, {""Type"", t" & _
"ype text}, {""Rootfolder"", type text}, {""LibraryName"", type text}, {""Language"", type text}, {""Fallback"", type logical}, {""TextTruncated"", type logical}, {""Download Source"", type text}, {""Direct Provider Link"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & " #""Changed Type"""

"let" & Chr(13) & "" & Chr(10) & " Source = Csv.Document(File.Contents(""" & Filename1 & """),[Delimiter="";"", Columns=9, Encoding=65001, QuoteStyle=QuoteStyle.None])," & Chr(13) & "" & Chr(10) & " #""Promoted Headers"" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])," & Chr(13) & "" & Chr(10) & " #""Changed Type"" = Table.TransformColumnTypes(#""Promoted Headers"",{{""Title"", type text}, {""Type"", t" & _
"ype text}, {""Rootfolder"", type text}, {""LibraryName"", type text}, {""Language"", type text}, {""Fallback"", type logical}, {""TextTruncated"", type logical}, {""Download Source"", type text}, {""Fav Provider Link"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & " #""Changed Type"""
With wsImageChoices.ListObjects.Add(SourceType:=0, Source:= _
"OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=ImageChoices;Extended Properties=""""", Destination:=wsImageChoices.Range("$A$1")).QueryTable
.CommandType = xlCmdSql
Expand Down
14 changes: 7 additions & 7 deletions PlexPosterMaker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ function GetFanartMoviePoster {
$global:PosterWithText = $true
$global:AssetTextLang = ($entrytemp.movieposter)[0].lang
$global:FANARTAssetChangeUrl = "https://fanart.tv/movie/$id"

if ($global:FavProvider -eq 'FANART') {
$global:Fallback = "TMDB"
$global:fanartfallbackposterurl = ($entrytemp.movieposter)[0].url
Expand Down Expand Up @@ -777,7 +777,7 @@ function GetFanartMovieBackground {
$global:PosterWithText = $true
$global:AssetTextLang = ($entrytemp.moviebackground)[0].lang
$global:FANARTAssetChangeUrl = "https://fanart.tv/movie/$id"

if ($global:FavProvider -eq 'FANART') {
$global:Fallback = "TMDB"
$global:fanartfallbackposterurl = ($entrytemp.moviebackground)[0].url
Expand Down Expand Up @@ -821,7 +821,7 @@ function GetFanartShowPoster {
$global:PosterWithText = $true
$global:AssetTextLang = ($entrytemp.tvposter)[0].lang
$global:FANARTAssetChangeUrl = "https://fanart.tv/series/$id"

if ($global:FavProvider -eq 'FANART') {
$global:Fallback = "TMDB"
$global:fanartfallbackposterurl = ($entrytemp.tvposter)[0].url
Expand Down Expand Up @@ -904,7 +904,7 @@ function GetFanartShowBackground {
$global:PosterWithText = $true
$global:AssetTextLang = ($entrytemp.showbackground)[0].lang
$global:FANARTAssetChangeUrl = "https://fanart.tv/series/$id"

if ($global:FavProvider -eq 'FANART') {
$global:Fallback = "TMDB"
$global:fanartfallbackposterurl = ($entrytemp.showbackground)[0].url
Expand Down Expand Up @@ -1311,7 +1311,7 @@ function GetTVDBSeasonPoster {
$global:AssetTextLang = $lang
}
$global:TVDBAssetChangeUrl = "https://thetvdb.com/series/$($response.data.slug)/seasons/$($Seasonresponse.data.type.type)/$global:SeasonNumber#artwork"

return $global:posterurl
break
}
Expand Down Expand Up @@ -1393,7 +1393,7 @@ function GetTVDBShowBackground {
$global:AssetTextLang = $lang
}
$global:TVDBAssetChangeUrl = "https://thetvdb.com/series/$($response.data.slug)/#artwork"

return $global:posterurl
break
}
Expand Down Expand Up @@ -1430,7 +1430,7 @@ function GetTVDBTitleCard {
Write-Entry -Subtext "Found Title Card on TVDB" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Blue -log Info
$global:TextlessPoster = $true
$global:TVDBAssetChangeUrl = "https://thetvdb.com/series/$($response.data.series.slug)/episodes/$($global:NoLangImageUrl.id)"

return $global:NoLangImageUrl.image
}
Else {
Expand Down

0 comments on commit eeeba88

Please sign in to comment.