Skip to content

Commit

Permalink
feat: Additional Api Filter
Browse files Browse the repository at this point in the history
- Adding the ability to filter posters, backgrounds and titlecards on width and height
- Code cleanup
- Bugfixes
- Module1.bass fixes from PR #134

Closes #133
Closes #134
  • Loading branch information
fscorrupt committed Aug 13, 2024
1 parent 7d3052d commit a6e9101
Show file tree
Hide file tree
Showing 7 changed files with 1,027 additions and 436 deletions.
10 changes: 5 additions & 5 deletions Module1.bas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sub PromptUser()
Dim currentVersion As String

' Specify the current version number
currentVersion = "1.0.4"
currentVersion = "1.0.5"

' Check for updates
CheckForUpdate currentVersion
Expand Down Expand Up @@ -144,9 +144,9 @@ Sub ImportCSVs(folderPath)
Set wsPlexLibexport = ThisWorkbook.Worksheets.Add
wsPlexLibexport.Name = "PlexLibexport"
ThisWorkbook.Queries.Add Name:="PlexLibexport", Formula:= _
"let" & Chr(13) & "" & Chr(10) & " Source = Csv.Document(File.Contents(""" & Filename2 & """),[Delimiter="";"", Columns=18, 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"",{{""Library Name"", type text}, {""" & _
"Library Type"", type text}, {""title"", type text}, {""originalTitle"", type text}, {""SeasonNames"", type text}, {""SeasonNumbers"", type text}, {""SeasonRatingKeys"", type text}, {""year"", Int64.Type}, {""tvdbid"", type text}, {""imdbid"", type text}, {""tmdbid"", type text}, {""ratingKey"", type text}, {""Path"", type text}, {""RootFoldername"", type text" & _
"}, {""MultipleVersions"", type logical}, {""PlexPosterUrl"", type text}, {""PlexBackgroundUrl"", type text}, {""PlexSeasonUrls"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & " #""Changed Type"""
"let" & Chr(13) & "" & Chr(10) & " Source = Csv.Document(File.Contents(""" & Filename2 & """),[Delimiter="";"", Columns=19, 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"",{{""Library Name"", type text}, {""" & _
"Library Type"", type text}, {""Library Language"", type text}, {""title"", type text}, {""originalTitle"", type text}, {""SeasonNames"", type text}, {""SeasonNumbers"", type text}, {""SeasonRatingKeys"", type text}, {""year"", Int64.Type}, {""tvdbid"", type text}, {""imdbid"", type text}, {""tmdbid"", type text}, {""ratingKey"", type text}, {""Path"", type text}," & _
" {""RootFoldername"", type text}, {""MultipleVersions"", type logical}, {""PlexPosterUrl"", type text}, {""PlexBackgroundUrl"", type text}, {""PlexSeasonUrls"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & " #""Changed Type"""

With wsPlexLibexport.ListObjects.Add(SourceType:=0, Source:= _
"OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=PlexLibexport;Extended Properties=""""", Destination:=wsPlexLibexport.Range("$A$1")).QueryTable
Expand Down Expand Up @@ -447,4 +447,4 @@ Sub RemoveDocumentPersonalInfo()
' ThisWorkbook.RemoveDocumentInformation (XlRemoveDocInfoType.xlComments)
' ThisWorkbook.RemoveDocumentInformation (XlRemoveDocInfoType.xlCompanyName)
' ThisWorkbook.RemoveDocumentInformation (XlRemoveDocInfoType.xlManager)
End Sub
End Sub
5 changes: 5 additions & 0 deletions MyPersonalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"FanartTvAPIKey": "xxxxxxxxxxxxx",
"PlexToken": "xxxxxxxxxxxxx",
"FavProvider": "tmdb",
"WidthHeightFilter": "false",
"PosterMinWidth": "2000",
"PosterMinHeight": "3000",
"BgTcMinWidth": "3840",
"BgTcMinHeight": "2160",
"PreferredLanguageOrder": [
"xx",
"en",
Expand Down
Loading

0 comments on commit a6e9101

Please sign in to comment.