gardenshade / mam-plus

Tweaks & functionality for MAM
81 stars 6 forks source link

Random Book Button #78

Closed gardenshade closed 4 years ago

gardenshade commented 5 years ago

Description:

Add a button to the search box that will take you to a random book.

Implementation:

Links:

/f/t/52986

ooglyboogly commented 4 years ago

I am interesting in tackling this feature as it sounds like a fun and potentially difficult one.

Where do you think this button will live? On the actual Search/Browse page near the Search/Search All button area?

gardenshade commented 4 years ago

Yeah, the forum thread linked has a mock up that puts it there and the script already injects a button into the area with the Hide Snatched feature.

ooglyboogly commented 4 years ago

Ohhh... I didnt know that was a forum thread link :D i feel dumb. That will help on future Requests too I am sure. Sigh.

ooglyboogly commented 4 years ago

Unfortunately the JSON GET i am using to accomplish my solution is partially broken (or I am just not using it right). I have submitted a MAM Support Ticket asking for pointers on how to get around my current hangup.

I have a couple other ideas for how to get close to same result, although it could leave out a lot of books of ever being picked in some ways. Would also be a good bit more work to accomplish.

Will update after MAM Support gives answer.

ooglyboogly commented 4 years ago

Well, that was fast. They fixed the bug and can continue down original path when I get some time.

ooglyboogly commented 4 years ago

I did most of the Random Book Feature on my work break today, have everything except for ability to pull from the Selected Category on the search page done. Then I get an additional response to my Ticket with information about the JSON feature I am using. Apparently they have a Random Sort feature on the JSON that was not previously published!! All that work down the drain :D

I asked for the ability to use the Main Category (Audiobook, ebook, Radio, etc) as a JSON selector instead of just the SubCategories. Waiting to hear back if that is possible as that would be ideal.

While the RandomBook feature would work without taking into account the category selected on the page, I feel it will be more useful to select the type you want to better fit the desire. I wouldnt want a Radio torrent when I only consume ebooks for example.

gardenshade commented 4 years ago

True, though I'd consider scoped random results to be a step beyond what the request asks for. But if it can be implemented, why not :)