feat: rename agent and add fallback API with custom host support#130
feat: rename agent and add fallback API with custom host support#130binyaminyblatt wants to merge 11 commits intodjdembeck:developfrom
Conversation
chore(release): v1.3.1
chore(release): 1.3.2
- Renamed from "Audnexus Agent" to "Audnexus Agent With Backup API" - Changed CFBundleIdentifier from `com.plexapp.agents.audnexus` to `com.plexapp.agents.audnexuswithbackup` - Default API is now https://audnex.us/, with fallback to https://audimeta.de/ - Added support for custom API host configuration - Improved logging with more detailed output - Switched from `from logging import Logging` to `from audnexuslogging import Logging` to avoid conflicts with internal logging - Added type hints for improved clarity and tooling support - Enforced code style using flake8 - Bumped version number
|
If you are using AudiMeta, please include a meaningful User Agent. This will help me block traffic if there are any bugs in current or future versions that might cause too many requests from mmultiple sources at the same time. |
- Added functionality to tag albums as explicit based on metadata from audnexus - Implemented `set_metadata_adult` function in `AlbumUpdateTool` to add "Explicit" and "ADULT" labels to albums in Plex - Uses `plexapi` to interact with the Plex server and add labels - Requires `PLEXTOKEN` environment variable to be set but it should be set by Plex - Added `PlexPluginCodePolicy` key to `Info.plist` with value `Elevated` to allow plugin to interact with the Plex server - Updated version to 1.3.4 - PYTHON PACKAGES we can use plexapi and requests now unfortunately we nead to include the packages in the repo
@Vito0912 any suggestions of something that would be meaningful |
There was a problem hiding this comment.
SonarCloud found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
i just added id3 tag support for the ASIN this should help with #123 |
|
See https://www.rfc-editor.org/rfc/rfc9110#name-user-agent |
|
I set it to
|
|
@djdembeck would you be willing to review this pull |
|
Thanks for the comprehensive work on this, @binyaminyblatt! I appreciate the effort you've put into adding these features. However, this PR has grown beyond a single feature and combines multiple concerns that need to be reviewed and released separately: Breaking changes that need discussion:
Features that should be separate PRs:
Next steps: |
|
@binyaminyblatt I discontinued the Audimeta provider. Please see the README. I would call it a lucky coincidence that Audnexus is being maintained again (well on the other hand idk, if AI PRs and even AI answers/comments are such a good inidcation), but neither Audnexus nor Audimeta are needed at all. There is no scraping needed for any information Audnexus (or Audimeta) provides. The only benefit is that Audnexus (and Audimeta as well) may cache responses and do not hit Audible as often. But as this is the design of Audible and it caches itself, that makes up for nothing, especially since searching still has to be done outside of Audnexus. So TL;DR, other than having a slightly more inconvenient way to get the data (because of a different structure), there is no need for such a proxy. It only adds delay and the risk of complete failure, which has already happened twice with Audnexus (and also Audimeta). Thus I decided to stop working on my project altogether and also showed some few projects how to migrate to a way more response friendly design (basically everything can be done in one request [searching (with book data), series, author books etc. etc.] While this is a software based/devolved by the same author it makes sense to be based on Audnexus, but I can just recommend to use the Audible API directly in such cases. |
it was done for testing so i could have both installed at the same time then when i asked ai to help me write the pr i forgot it was there I should change it back at this point. I just haven't had a chance to seeing as How the whole code bases is about to become useless. Seeing as how they're removing the feature |
|
Some of the other features that I added in after I started the PR were Personally, I'm a nut for type casting things. I cannot look at code without it so I added in type notes for almost every function in the code base as well as the whole Plexhint at the top. I made it so The agent could actually label adult content as adult content by adding the ability to directly edit the content, the reason I did this is because you can only use tags for Plexs parental controls I was actually looking into basically integrating the collection system that is used by kometa directly into the agent. It should be possible at least with my fork because the agent now has the ability to access Plex's API and make real edits. To address security concerns, I recommend we move this feature to be optional a.k.a. add a preference that is by default, disabled and require it to be enabled manually by making the user type in to a preference box I consent or something like that The graphic audio part I do not believe I ever got finished. I seem to remember it never worked properly though it would probably be much easier to have a second crack at now because basically I have another repo which scrapes everything off of graphic audio and just stores it in a json file so all it would have to do is download it and look it up https://github.com/binyaminyblatt/graphicaudio_scraper As far as reading the ID3 tags to try and figure out the ASIN it works fine. I've used it many times. And if it's still works, I'm not 100% sure if it still works because their API is very flaky the audiobookcovers API was working last time I tested it. I don't use it personally, but I figured it'd be nice to implement. I'd be very happy to break this into multiple PR's. The only reason I didn't was the original PR was done so long ago and there was no response so I just kept working on it and adding new things to the point where it ballooned to be this mess of code. But if you look at the comments, each feature is individually committed for the most part. As for the fallback API seeing is how it's about to be shut down I don't know that it's a good place to start if I was going to try breaking this up Oh yeah, I also added a couple on Settings to allow me to run local copies of both APIs especially since the public version hasn't been updated in a very long time The code was actually written by me. I just had an AI spit out the original pull request, which is why we ended up with the changed name. I really should undo that at this point. |
That's sad your API worked great for everything I did as well as had many more features that I used consistently than Audnexus and using Audible's API directly is a mess even still there are other parts of this PR, which make it still relevant though how we're gonna sort through the mess that this PR has become is going to be a little complicated Can you point me in the direction of the list of URLs that I might need to make this work directly off of Audible I'm not looking forward to implementing audibles API. It's so complicated last time I looked at it. I've used it before, but it is a really annoying API to work with. |
com.plexapp.agents.audnexustocom.plexapp.agents.audnexuswithbackupfrom logging import Loggingtofrom audnexuslogging import Loggingto avoid conflicts with internal logging