Skip to content

Conversation

@NotVinny
Copy link

This channel wasn't working for me, so I have forked it and re-written it from scratch. I believe the only remaining things from the original project are some icons.

NotVinny and others added 30 commits November 25, 2015 00:31
Complete re-write of existing channel. Initial check-in. There is still
some work to be done (some sets of videos still need to be sorted, and
some sort options need to be modified), but otherwise fairly functional.
Created the GenerateMenu function, which reads in a dictionary of menu
items, and turns them into DirectoryObjects and returns them in a
ObjectContainer. Used this function everywhere I could to cut down on
repetition and lines of code. Created a language file to hold some
string constants. But most importantly, I found some artwork to use as
the background... And I couldn't decide which one to use so I have 2
alternates sitting in the Resources folder. In v0.3 I plan to create
preferences for artwork (and other options), as well as fix up the
MemberMenu function to filter out empty directories.
No functionality change, just minor changes to make code more uniform.
Updated the service to not only select the best possible resolution, but
to actually return all available resolutions. This involves using the
deferred decorator (which is apparently evil, but it seems to work for
me... I've only tested on Roku/Android clients, and I've read threads
from 2013ish that say Plex Home Theatre doesn't work well with it).
Minor fix with the Next Page functionality
Added preferences to select the background/icon art for the channel.
Also added a no_cache option for the GenerateMenu function. Finally, I
fixed up the way localization was done (for the few strings that I
actually localized...) by using Plex's built in Locale functionality
rather than my own file of constants.
I have changed the channel so that instead of jumping right to the Video
Clip Object, you are sent to another Directory Object which will contain
the Video Clip Object, as well as related videos, playlists the video is
in, and porn stars in the video. I have not yet added the new features,
just "laid the foundation" by creating the new menu and adding the Video
Clip Object to it. Will be adding new functionality shortly.
Porn stars from the video now appear in the menu. If only one porn star,
then they are displayed immediately. If multiple, they are shown in a
separate Directory Object
Was previously displaying the wrong sorting options for a porn star's
videos. This commit fixes that
The video's channel (if any) now shows in the video menu
Forgot to comment the code
You can now see related videos.
You can now see playlists that contain the video from the video menu.
It's unfortunately limited to 4 playlists, but it's still helpful to
traverse the channel.
Added thumbnails for Related Videos and Playlists. Also includes a bit
more error handling, and an extra comment for that sweet sweet
readability.
Duration was previously missing from both MetadataObjectForURL and
MediaObjectsForURL. I am now obtaining a JSON object with more metadata,
fixing this problem. xPath is still used as a backup.
Added photo album of thumbnails to video sub menu.
Added a menu that shows time stamps for actions (e.g. different
positions). I made it using recursive DirectoryObjects because I didn't
really know how else to display information like that. So you can
technically click through that menu infinitely and never get anywhere,
but hopefully after a few clicks you will realize what is happening and
start backing out. If Plex was able to start a video from a certain time
that would be sweet, because it would be trivial to modify this to add a
VideoClipObject with a time offset if that existed. If it does, I don't
know how to do it.
Porn Stars menus were missing the next page button. Browse All Videos
and Category pages were missing the next page button from page 2 onward.
Pagination seems to be working for everything now
Added duration to the directory objects that point to the video sub
menu.
Shortened the titles in the video menu, and lengthened the summary
I've thrown a lot of extra options into the video menu lately. In case
anyone wants to tone that down, you can now filter them out using
Preferences.
Added the ability to view Channels that Members have created, and also
Channels that Members are subscribed to.
Now the items in the Member menu only show up if they contain items
Hiding Playlists with 0 videos
You can now see what Porn Stars a Member is subscribed to. Also fixed up
a comments that didn't make sense (due to lazy copypasta)
Forgot to pass along the page limit in the NextPageObject
You can now view a Member's subscribers, Member subscriptions, and
friends. Also re-organized the menu a little bit to bring the content
closer to the top. One thing to note is that while the xPath to check
for a Member's subscribers/Member subscriptions/friends is fairly
accurate, there are times when it is inaccurate. I will be addressing
this in a forthcoming commit where I will add the option to get accurate
results for those menu options (at the expense of 1 extra HTTP request
each). It will be configurable in the Preferences if you don't want to
create any extra HTTP requests
There are now overrides to get more accurate Member menu options at the
expense of extra HTTP requests. It's possible to override subscriptions,
however I think the default xPath is good enough so it is set to false
by default for now.
Turned off caching on Member menu, so that Preferences are reflected
immediately. Also set the default for subscriber override to false, as I
think the default xPath is good enough for that (though ugly).
NotVinny and others added 25 commits July 26, 2016 23:55
You can now override multiple checks per each Preference override. This
is because in cases like Playlists, you can check if a user has Public
or Favorite Playlists from the same URL.
…r menu

It is now possible to only make one HTTP request in the Member menu,
which increases speed greatly but reduces accuracy and removes certain
menu options altogether. Every Preference you turn on for Member menu
adds one HTTP request, but makes your results more accurate and shows
all possible menu items.
Changes for v1.1 release
I want to separate the data and logic in my code more. I want the
SharedCodeService to act as a model, and __init__.py (and other files in
that directory) to work as a controller. This commit is the first step
to that. I have moved all of the more basic xPath logic into the
SharedCodeService, removing xPath entirely from several of the
"controllers". There is still much more work to be done on this front,
v1.2 will largely be a code rewrite with only a couple new features.
With any luck though, the code rewrite will allow other features to be
added more easily in the future (and the code should be a bit clearer,
hopefully)
Moving more xPath code into Shared Code. Also moved the function to get
video meta data JSON into Shared Code, as that code was repeated
throughout this repository.
More of the same from the last two commits... Reorganizing code.
Moved two functions into shared code
The "Playlists - Most Viewed Daily" menu was broken, I have fixed the
URL parameters. Also found that the Member Menu was making two extra
HTTP requests, those have been removed.
Although this is not in use yet, this function returns the metadata
about the member who uploaded the video. This will be used eventually.
The new layout of the website broke the plugin because the XPath selectors in function GetVideos were too specific. I have simplified those so that they should work even with newer versions of the website. I have also added error-handling to said function so that a single malformed video-section does not make the whole plugin crash.
Simplified XPath selectors for video listing, added error routine
Messed up xpath was crashing plugin, fixed the string.
The format to find the video files changed, now they can be found again.
It's awful, but it's PornHub's fault, not mine. Works though.
Merging some bug fixes from v1.2 branch
Thanks to @mnemouse for pointing this out.
Fixed whitespace issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant