ZeroQI / Lambda.bundle

Local Media Export, a reverse Plex 'Local Media Assets' agent to export metadata locally
GNU General Public License v3.0
134 stars 18 forks source link

Posters not saving in local directory #20

Closed hergonoway closed 4 years ago

hergonoway commented 4 years ago

Hello,

Since I've updated lambda to the last version, posters are not saved in show's local directory anymore after hiting "resfresh metadata". Problem doesn't seem to occur for nfo file. Problem is similar (same behavior) as issue #11 (personnal setup is the same as described in the issue)

Version : from last Commit on May 20, 2020

To test : I've changed the poster of the following anime (recent addition) and press "refesh metadata" :

Result : no poster saved in local folder

Here's the log captured 2 min after hiting refresh : com.plexapp.agents.lambda-20200526-0307.log

ZeroQI commented 4 years ago

Relevant log section, no error

2020-05-26 03:05:47,344 (7f6e12ffd700) :  INFO (__init__:142) - SaveFile("/library/metadata/97824/thumb/1590454890", "/data/Anime/Librairie/[All]/Aishen Qiaokeli-ing... [Web][anidb-11894]", "series_poster", "poster.ext"...) xml_field: ""
2020-05-26 03:05:47,345 (7f6e12ffd700) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/97824/thumb/1590454890'
2020-05-26 03:05:47,350 (7f6e12ffd700) :  INFO (__init__:210) - [?]  plex_value: "binary...", type: "<type 'str'>"
2020-05-26 03:05:47,350 (7f6e12ffd700) :  INFO (__init__:210) - [?] local_value: "", type: "<type 'str'>"
2020-05-26 03:05:47,351 (7f6e12ffd700) :  INFO (__init__:142) - SaveFile("/data/Anime/Librairie/[All]/Aishen Qiaokeli-ing... [Web][anidb-11894]/poster.jpg", "/data/Anime/Librairie/[All]/Aishen Qiaokeli-ing... [Web][anidb-11894]", "series_nfo", "tvshow.nfo"...) xml_field: "{'art': {'poster': {'text': '/data/Anime/Librairie/[All]/Aishen Qiaokeli-ing... [Web][anidb-11894]/poster.jpg'}}}"
2020-05-26 03:05:47,351 (7f6e12ffd700) :  INFO (__init__:210) - [?]  plex_value: "/data/Anime/Librairie/[All]/Aishen Qiaokeli-ing... [Web][anidb-11894]/poster.jpg", type: "<type 'str'>"
2020-05-26 03:05:47,351 (7f6e12ffd700) :  INFO (__init__:210) - [?] local_value: "None", type: "<type 'NoneType'>"

The version before last changed line 198

[-]  elif plex_value and (not local_value or Prefs['metadata_source']=='plex' or Prefs['metadata_source']=='local' and metadata_field is None):
[+]  elif plex_value and (not local_value or Prefs['metadata_source']=='local') and metadata_field is not None:

Please try latest version

hergonoway commented 4 years ago

thanks for quick feedback,

update to commit 101, plex dance and all, still got the issue, no poster generated.

I've redone the update poster test with "Kitsutsuki Tanteidokoro", please find below the logs from 2 min after the test :

com.plexapp.agents.lambda-20200526-1004.log

additional note : for this show, nfo wasn't generated as for the poster file.

ZeroQI commented 4 years ago

Please try new code, i added a logging line for when neither plex nor local updated with output i removed a restriction in the code which should solve this

hergonoway commented 4 years ago

updated __init__.py from patch branch, restarted plex

re-run test at 1143 with Kitsutsuki Tanteidokoro (choose poster + hit refresh)

logs from 1145 : com.plexapp.agents.lambda-20200526-1145.log

poster has been updated correctly, I've re-run the test a second time by picking another poster, the poster has been updated to the 2nd choice as well

ZeroQI commented 4 years ago

Thanks for your assistance, important fix fixed thanks to you