macr0dev / Audiobooks.bundle

Plex metadata scraper for Audiobooks
600 stars 65 forks source link

Fixed xpath for series, and tried to add to collection #52

Open pofo14 opened 4 years ago

pofo14 commented 4 years ago

Series was not getting parsed at all. Fixes issue with the xpath, most likely due to html change.

Tried to add functionality to save series to the Collection Tag - code has no errors - but the tags do not save.

macr0dev commented 4 years ago

Audible likes to make little tweaks and break things for me. :)

Collections have never really worked right on music, that's why it ended up in the genre tag. It was the only real place I could stick it to be useful for filtering. Once upon a time, you could even click the genre in the web client and it would load the ones matching, which is why the series was first on that list - but that's not working anymore either.

With the introduction of the new android client, Chronicle Audiobook Player - I'm taking a look at a few more things. I'll see if I can figure out the collections issue.

Question for you - have you ever seen Audible tag a book with more than one series? I noticed you appeared to be trying to account for that.

pofo14 commented 4 years ago

Yes - I was using a book from the Harry Potter series for testing, so I luckily stumbled upon it. That is one book that has multiple series, one seems to be the European name vs. the US name.

Let me know if there is anything I can help out with - I am not a Python expert, but I have free time on my hands with everything going on. I was trying to figure out the best way to "test" it - but found just essentially running it in Plex was the best way. So I have a "test" server I use for that. Curious if you have a better way.

On Fri, May 22, 2020 at 11:14 AM macr0dev notifications@github.com wrote:

Audible likes to make little tweaks and break things for me. :)

Collections have never really worked right on music, that's why it ended up in the genre tag. It was the only real place I could stick it to be useful for filtering. Once upon a time, you could even click the genre in the web client and it would load the ones matching, which is why the series was first on that list - but that's not working anymore either.

With the introduction of the new android client, Chronicle Audiobook Player - I'm taking a look at a few more things. I'll see if I can figure out the collections issue.

Question for you - have you ever seen Audible tag a book with more than one series? I noticed you appeared to be trying to account for that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/macr0dev/Audiobooks.bundle/pull/52#issuecomment-632746210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBTPUSMZXJ2P3NDAYVW4TRS2JD7ANCNFSM4M7LFP3A .

macr0dev commented 4 years ago

I'll go looking around at the harry potter series. Always need a good use case for testing stuff like that.

Running it through Plex is the only way to test it I know of. I've discovered another coder on the plex forums who was attempting do collections in music libraries a year or two ago, so I've reached out to him to see if he had any success. Fingers crossed. Thanks for contributing!

If you're an android guy, go check out the Chronicle Audiobook Player. It works with plex. It's not my app, but I'm testing it out. Just trying to help share the love.

jmeosbn commented 4 years ago

Also, Ender's Game is a good one as it has a series for the whole universe, and Pip and Flinx where one is release order vs. chronological.

The collections work in as much as they get written correctly if you check the files on disk - it's plex that prevents that info being used for music. I've left that code in case it ever is enabled, likewise for .tags.

On May 22, 2020 at 6:55 pm, <macr0dev - notifications@github.com (mailto:github.jamieo.542923af64.notifications#github.com@ob.0sg.net)> wrote:

I'll go looking around at the harry potter series. Always need a good use case for testing stuff like that.

Running it through Plex is the only way to test it I know of. I've discovered another coder on the plex forums who was attempting do collections in music libraries a year or two ago, so I've reached out to him to see if he had any success. Fingers crossed. Thanks for contributing!

If you're an android guy, go check out the Chronicle Audiobook Player. It works with plex. It's not my app, but I'm testing it out. Just trying to help share the love.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/macr0dev/Audiobooks.bundle/pull/52#issuecomment-632829710), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAEBTYCOMADM2GVOZAKR4LDRS24BPANCNFSM4M7LFP3A).

pofo14 commented 4 years ago

OK - that's strange, because the reason I had the idea to do it in the first place is I was able to set Collections in the UI, and then filter by them for the audiobooks (music library).

Can you verify that - because for me setting them up in the UI works. Not sure why it would work there but not saving them the way the plugin is doing it.

On Sat, May 23, 2020 at 12:35 AM jmeosbn notifications@github.com wrote:

Also, Ender's Game is a good one as it has a series for the whole universe, and Pip and Flinx where one is release order vs. chronological.

The collections work in as much as they get written correctly if you check the files on disk - it's plex that prevents that info being used for music. I've left that code in case it ever is enabled, likewise for .tags.

On May 22, 2020 at 6:55 pm, <macr0dev - notifications@github.com (mailto:github.jamieo.542923af64.notifications#github.com@ob.0sg.net)> wrote:

I'll go looking around at the harry potter series. Always need a good use case for testing stuff like that.

Running it through Plex is the only way to test it I know of. I've discovered another coder on the plex forums who was attempting do collections in music libraries a year or two ago, so I've reached out to him to see if he had any success. Fingers crossed. Thanks for contributing!

If you're an android guy, go check out the Chronicle Audiobook Player. It works with plex. It's not my app, but I'm testing it out. Just trying to help share the love.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub ( https://github.com/macr0dev/Audiobooks.bundle/pull/52#issuecomment-632829710), or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAEBTYCOMADM2GVOZAKR4LDRS24BPANCNFSM4M7LFP3A ).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/macr0dev/Audiobooks.bundle/pull/52#issuecomment-632983647, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBTPRGUA3XRRWIPZ7VDSLRS5G75ANCNFSM4M7LFP3A .

jmeosbn commented 4 years ago

Yes, that's how it works for me - in the UI I set a "Read" and "Unread" collection (among others) for filtering.

However, the collections that a plugin writes are ignored for music (in my experience) despite being written to the xml file on disk (the collection shown in the image is not present in any UI).

Additionally, the actual collections view that is available for TV and Films is not available - despite it being so some time ago.

On May 23, 2020 at 2:24 pm, <pofo14 - notifications@github.com (mailto:github.jamieo.542923af64.notifications#github.com@ob.0sg.net)> wrote:

OK - that's strange, because the reason I had the idea to do it in the first place is I was able to set Collections in the UI, and then filter by them for the audiobooks (music library).

Can you verify that - because for me setting them up in the UI works. Not sure why it would work there but not saving them the way the plugin is doing it.

On Sat, May 23, 2020 at 12:35 AM jmeosbn notifications@github.com wrote:

Also, Ender's Game is a good one as it has a series for the whole universe, and Pip and Flinx where one is release order vs. chronological.

The collections work in as much as they get written correctly if you check the files on disk - it's plex that prevents that info being used for music. I've left that code in case it ever is enabled, likewise for .tags.

On May 22, 2020 at 6:55 pm, <macr0dev - notifications@github.com (mailto:github.jamieo.542923af64.notifications#github.com@ob.0sg.net)> wrote:

I'll go looking around at the harry potter series. Always need a good use case for testing stuff like that.

Running it through Plex is the only way to test it I know of. I've discovered another coder on the plex forums who was attempting do collections in music libraries a year or two ago, so I've reached out to him to see if he had any success. Fingers crossed. Thanks for contributing!

If you're an android guy, go check out the Chronicle Audiobook Player. It works with plex. It's not my app, but I'm testing it out. Just trying to help share the love.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub ( https://github.com/macr0dev/Audiobooks.bundle/pull/52#issuecomment-632829710), or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAEBTYCOMADM2GVOZAKR4LDRS24BPANCNFSM4M7LFP3A ).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/macr0dev/Audiobooks.bundle/pull/52#issuecomment-632983647, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBTPRGUA3XRRWIPZ7VDSLRS5G75ANCNFSM4M7LFP3A .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/macr0dev/Audiobooks.bundle/pull/52#issuecomment-633052909), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAEBTYD5J5KD64RDPMMXGBDRS7E63ANCNFSM4M7LFP3A).

jmeosbn commented 4 years ago

Here's the image I had attached in email reply.

90D5807A-5144-40B8-9F82-FF1F6258BF4D

macr0dev commented 4 years ago

I've done a little digging around in the metadata xml files and it's kind of interesting the way it both stores and ignore collection data.

Even for movies the collection names stored in the Info.xml (be it in the agent dir or _combined dir) aren't necessarily the ones displayed or used in the UI. I have movies that have collections pulled from agents that are stored in both Info.xml files but have been overwritten in the UI or deleted entirely. But they're still there. Conversely, if I assign an object to a collection it doesn't write that name to either of these files.

So from all of this we know several things:

  1. The agent IS properly handing off the collection data to Plex.
  2. There is a second location where collection data (and possibly other data) is stored.

Unrelated PS - Children of Titan is an awesome series. I'm listening to the last book now, and prominently display my signed copy of Titanborn that Rhett sent me on my bookshelf.

jmeosbn commented 4 years ago

Ha, yes it is a good series. There's a whole thing with agents "contributing to" and then the order you may prioritise in the UI.

On top of that is your own manually set data - which appears to go into the sql db.

Then Plex itself decides to not show some of it!

There are also tags that you can set set as "tags" (but only with a plex pass), labels and source (where??) -- all would be useful and are listed as (empty) filters.

I'm setting narrators in to "moods" and used to use "styles" for series, but now I mix them with genres (it makes sense to me).

I added PRs previously (I think for some of the above) but eventually it got too hard to keep my fork in sync when the PRs weren't merged.