niemands / StashPlugins

A collection of python plugins for stash
GNU Affero General Public License v3.0
62 stars 18 forks source link

set_ph_urls.py always fails to find files #25

Open SomeAnon7 opened 2 years ago

SomeAnon7 commented 2 years ago

Fresh Stash install.

To replicate: Added one single video by URL and one channel download to the urls.txt Ran the Download portion of the plug-in Ran the Tag Downloads - populated the tags on the single URL video. Ran the set_ph_urls - No updates to the files, logs show zero files found.

Log entries. `Debug
Plugin returned: ok

Info
[Plugin / Set PH Urls] Set urls for 0 scene(s)

Debug
[Plugin / Set PH Urls] Regex found a total of 0 scene(s)

Debug
[Plugin / Set PH Urls] Regex found 0 scene(s) on page 1

Debug
[Plugin / Set PH Urls] Using stash GraphQl endpoint at http://localhost:9999/graphql`

Confirmed the filenames pulled should pass the regex, phXXXXXXXXXXXXX.mp4 titles. Nothing modified in the scripts outside of the download location being set, the python3 change as noted in the readme. Tested a few options in the yt-dl config.ini with no luck either populating the performer info, urls for the channel dump, etc.

niemands commented 2 years ago

Sorry that this took so long, but this is now fixed in the newest release

SomeAnon7 commented 2 years ago

Thanks for the followup.

Still experiencing the same behaviour. No URLs being backfilled. Removed the plugins completely and reinstalled. Removed all content from the instance and re-downloaded via the yt-dl.


Debug   
Plugin returned: ok

2022-04-05 16:53:31
Info    
[Plugin / Set PH Urls] Set urls for 0 scene(s)

2022-04-05 16:53:31
Debug   
[Plugin / Set PH Urls] Regex found a total of 0 scene(s)

2022-04-05 16:53:31
Debug   
[Plugin / Set PH Urls] Regex found 0 scene(s) on page 1

2022-04-05 16:53:31
Trace   
SQL: SELECT DISTINCT scenes.id FROM scenes WHERE ((scenes.path IS NOT NULL AND scenes.path regexp ?)) ORDER BY scenes.title COLLATE NATURAL_CS ASC, bitrate DESC, framerate DESC, scenes.rating DESC, scenes.duration DESC LIMIT 100 OFFSET 0 , args: [(?i)^(?:.+-)?ph[a-z0-9]{13}\.(?:[mM][pP]4|[wW][mM][vV])$]

2022-04-05 16:53:31
Trace   
SQL: SELECT COUNT(temp.id) as total FROM (SELECT DISTINCT scenes.id FROM scenes WHERE ((scenes.path IS NOT NULL AND scenes.path regexp ?))) as temp, args: [(?i)^(?:.+-)?ph[a-z0-9]{13}\.(?:[mM][pP]4|[wW][mM][vV])$]

2022-04-05 16:53:31
Debug   
[Plugin / Set PH Urls] Using stash GraphQl endpoint at http://localhost:9999/graphql```
SomeAnon7 commented 2 years ago

@niemands
Did a bit of poking and prodding at the script. This seems to work in my tests solving both the regex not catching the yt-dl'd content and solving the next issue I encountered which was it never writing the URL and hitting your IndexError in that block once I had it finding the files.

set_ph_urls.py_SA.zip

Hoping this solution helps with your amazing plugin.