goose-ws / bash-scripts

A collection of bash scripts I've hacked together over time
MIT License
10 stars 3 forks source link

[Bug]parse error: Invalid numeric literal at line 1, column 6 #15

Closed HoreaM closed 1 month ago

HoreaM commented 1 month ago

I'm receiving the following error while running the script and checking for TBA items in my Plex library:

sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Processing instance: docker:sonarr
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Configuration file retrieved
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Port retrieved from config file
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  API key retrieved from config file
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  No URL base detected
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Checking API functionality
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  API authorization succeded
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Detected 1 libraries
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Checking for TBA/TBD items in /cloud/Series
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Located 2 files to process
sonarr-update-tba.bash   ::   2024-07-18 10:49:22   ::   [info]  Processing The Gentlemen (2024) - S01E02 - TBA [WEBDL-1080p][EAC3 Atmos 5.1][x264]-nhtfs.mkv
sonarr-update-tba.bash   ::   2024-07-18 10:49:23   ::   [info]  Issuing refresh command for: The Gentlemen
sonarr-update-tba.bash   ::   2024-07-18 10:49:24   ::   [info]  Command status [1301716]: started
sonarr-update-tba.bash   ::   2024-07-18 10:49:25   ::   [info]  Command status [1301716]: completed
sonarr-update-tba.bash   ::   2024-07-18 10:49:25   ::   [info]  Issuing rename command for: The Gentlemen [S01E02]
sonarr-update-tba.bash   ::   2024-07-18 10:49:26   ::   [info]  Command status [1301717]: completed
sonarr-update-tba.bash   ::   2024-07-18 10:49:26   ::   [info]  Renamed The Gentlemen - S01E02 to: Tackle Tommy Woo Woo
sonarr-update-tba.bash   ::   2024-07-18 10:49:26   ::   [info]  Processing The Gentlemen (2024) - S01E03 - TBA [WEBDL-1080p][EAC3 Atmos 5.1][x264]-nhtfs.mkv
sonarr-update-tba.bash   ::   2024-07-18 10:49:26   ::   [info]  Issuing rename command for: The Gentlemen [S01E03]
sonarr-update-tba.bash   ::   2024-07-18 10:49:27   ::   [info]  Command status [1301718]: completed
sonarr-update-tba.bash   ::   2024-07-18 10:49:27   ::   [info]  Renamed The Gentlemen - S01E03 to: Where's My Weed At?
sonarr-update-tba.bash   ::   2024-07-18 10:49:27   ::   [info]  Plex token detected, attempting to check for TBA items in Plex
sonarr-update-tba.bash   ::   2024-07-18 10:49:27   ::   [info]  Plex authentication verified
sonarr-update-tba.bash   ::   2024-07-18 10:49:27   ::   [info]  Checking for TBA items in the Plex library
parse error: Invalid numeric literal at line 1, column 6
parse error: Invalid numeric literal at line 1, column 6
sonarr-update-tba.bash   ::   2024-07-18 10:49:27   ::   [info]  No TBA items detected in the Plex library

Am I doing something wrong? I'm not sure what's causing the error. Thanks a lot!

goose-ws commented 1 month ago

Tough to say, without a better idea of what your PMS is returning. I'm planning to pull the Plex functionality out of the Sonarr script, though, and to make it its own standalone script. Since Plex now has its own metadata server, it's no longer reliable to count on metadata being able to update on Plex via TVDB if Sonarr updates via TVDB. I've learned a fair bit about working with XML from a separate Plex script I've been working on over the last couple of months, so this upcoming rewrite will likely solve whatever is going on here. In the meantime, I would just disable the Plex functionality for that script since it won't be very reliable. I'll leave this issue open for now and update it once I publish some changes. Probably before the end of this month.

goose-ws commented 1 month ago

You can now find the 'plex-update-tba.bash' script in the repository, and its accompanying .env file. It's fully functional per my own testing, but let me know if you run into any trouble with it.