SearchServiceRecord Services and DirectoryObject error...

Well, short lived plug-in for now....  They took movie2k.to down looks like they are about to do something else on movie4k.to.  I will have to wait and see.  The back end host scripts can be reused easily the way I set it up.  That was the hardest part getting all the hosting sites to work.  Went ahead and added Site URL select to the Preferences for "URL blockers".  I will work on the few Hosting sites that need to be fixed to keep moving forward with the project.

One weird thing is I added a search for trailers feature which still works.  And it uses the same URL string setup I fixed from MIkedm139 suggestions and the experimental transcoder setup on the Roku works....  I don't see the disconnect between the two.  However, the search does not show up on Plex Web  I assume it's do to the fact the way Plex Web's search is set up.  But shows up fine on the Roku.

Not sure who is keeping up with this thread now to see updates... :blink:

MOVIE2K to MOVIE4K UPDATE:

Fixed the plugin to match the move to the new domain movie4k.to.  Also, fixed and updated some hosts to the plugin.  To me their site looks more like an older back up but that's great they had that much.   Plug-in name still the same just tweaked the graphics to reflect the changes.  The Login at this time does not work for MY MOVIE4k.  :ph34r:

To use Tor proxy you will have to download and install Tor on your Plex Media Server machine (Should work for fine Windows, OSX, Linux).  To get the IP changer to work you will need to put in a password and enable Generate Tor Hashed Password.  You will need to next look in your com.plexapp.plugins.movie2k.log file to get your hashed password and copy and past it into the torrc file found in the Tor Browser folder \Data\Tor...  Just past it at to bottom of the file  Example:
HashedControlPassword 16:C66BF3B72C28938B607CE71CC9949A2AF2AE579A0A54A8182439BFD982

To get the Plex transcoder to use Tor proxy server on Windows use an app like Proxifier it forces all net traffic to Tor when set up.  For OSX and Linux  not real sure at the moment.

Also, added the two proxy servers that where set up for movie2k.to...  They are still in use...  You can now change the Site URL in the Preferences to one of the two proxy servers.  This can be used if the www.movie4k.to site URL is being blocked.  This has no effect on Host site URLs only MOVIE4k.  Only proxy effects on Host sites will be using the Tor setup.

PS:  www.movie2k.bz  is a fake knock off of the site!!!!

Link to updates:
https://github.com/Joecowboy/MOVIE2K.bundle

Enjoy!!! Any feedback welcome.....  B)

Riddle Me This???

I was thinking/wondering if the Trailer Addict Search uses the URL Service and Hands off the the Experimental Transcoder on the Roku without any errors could this be do to the fact that the video URLs are hosted on the same site?  Where as when Movie2k jumps over to a Hoster site to get the video URL???  Could this be the disconnect between the Roku and the Expermental Transcoder and Plex Web and the "Summary Page" error?  Neither one leaves any log errors even with debug log turned on.  Do I or should I in the ServiceInfo.plist file add to the URLPATTERNS for the Hoster sites and if so some of the Hoster site videos are IP addresses.

In the URLPATTERNS for Trailer Addict I have this:

http://media31\.traileraddict\.com/+
http://www\.traileraddict\.com/clip+

The first string line I can leave out which is the actual video URL and the Experimental Transcoder still will work.  So I am up in the air on this this.  Any thoughts or ideas would be greatly appreciated.

Mikedm139, on 19 Apr 2013 - 07:56, said:
Mikedm139, on 19 Apr 2013 - 07:56, said:
If it was working ok with PMS v0.9.7.12 and broke with the upgrade to .22, I would suggest rolling back to the .12 release to verify if it still works. It sounds to me like it might be tripping on a transcoder bug that crept in to the .22 release. Another test is to follow the XML keys manually via a browser or curl command to see if the video key URL actually returns a video file when requested.


This in response to checking the URL keys via web browser found in the Plex Media Server Log. From looking at both of the errors they do look related. Something to do with the thumb function in my URL service code??? Looks like it does not like the Callback function for the thumb or what it is returning????

Link to code on GitHub:
https://github.com/Joecowboy/MOVIE2K.bundle/blob/master/Contents/Services/URL/MOVIE2K/ServiceCode.pys

1. Error - Roku with Experimental Transcoder enabled and trying to play video stream.

URL:
http://127.0.0.1:32400/system/:/services/url/lookup?url=http:%2F%2Fwww%2Emovie4k%2Eto%2FCrimson-Tide-watch-movie-882466%2Ehtml%3Ftitle%3DCrimson%2BTide%26summary%3D%250A%2B%2B%2B%2BOn%2Ba%2BUS%2Bnuclear%2Bmissile%2Bsub%252C%2Ba%2Byoung%2Bfirst%2Bofficer%2Bstages%2Ba%2Bmutiny%2Bto%2Bprevent%2Bhis%2Btrigger%2Bhappy%2Bcaptain%2Bfrom%2Blaunching%2Bhis%2Bmissiles%2Bbefore%2Bconfirming%2Bhis%2Borders%2Bto%2Bdo%2Bso%2E%26show%3DADDED%253A%2B10%252F03%252F2011%2B%2B%257C%2BHOST%253A%2BPutlocker%2B%257C%2BQUALITY%253A%2BDVDRip%252FBDRip%26date%3D2013-01-01%2B00%253A00%253A00%26thumb%3Dhttp%253A%252F%252Fimg%2Emovie4k%2Eto%252Fthumbs%252Fcover-882466-Crimson-Tide-movie4k-film%2Ejpg%26host%3DPutlocker%26season%3D0%26index%3D0%26type%3DMovies%26genres%3DAction%252CDrama%252CThriller%25A0%26director%3D%2BTony%2BScott%2B%25A0%26actors%3D%2B%250A%2B%2B%2B%2B%2B%2B%2B%2BDenzel%2BWashington%252C%2BGene%2BHackman%252C%2BMatt%2BCraven%252C%2BGeorge%2BDzundza%252C%2BViggo%2BMortensen%252C%2BJames%2BGandolfini%2B%2B%2B%2B%2B%2B%2B%2B%250A%2509%2B%2B%2B%2B%2509%2B%2B%2B%2B%250A%2509%2B%2B%2B%2B%2509%2B%2B%2B%2B%250A%2509%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%250A%2B%2B%2B%2B%2B%2B%2B%2B%250A%2B%2B%2B%2B%2B%2B%2B%2B%2509%26duration%3D6960000%26rating%3D7%2E2%26content_rating%3DNR%20as%206bbec6f5b3cebffbae3dceabd028dd473ae41adc

And this is the XML Response:
<?xml version='1.0' encoding='utf-8'?>
<Response code="2000" status="UnicodeDecodeError: ">
  <Traceback>Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 837, in handle_request
    result = f(**d)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\handlers\services.py", line 26, in url_lookup
    c = self._core.services.metadata_object_for_url(url, in_container=True)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 724, in metadata_object_for_url
    return self._get_result_from_function_for_url(self.metadata_object_for_url_from_service, url, do_normalization, dict(add_items_automatically = add_items_automatically, allow_deferred = allow_deferred, in_container = in_container))
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 740, in _get_result_from_function_for_url
    result = func(url, service, **kwargs)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 641, in metadata_object_for_url_from_service
    metadata = self._call_named_function_in_service(METADATA_OBJECT_FUNCTION_NAME, service, )
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 588, in _call_named_function_in_service
    return self._call_named_function_in_sandbox(service.sandbox, fname, None, f_args, f_kwargs, allow_deferred, raise_exceptions, f_optional)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 572, in _call_named_function_in_sandbox
    result = sandbox.call_named_function(fname, allow_deferred=allow_deferred, raise_exceptions=raise_exceptions, args=f_args, kwargs=f_kwargs, mod_name=mod_name, optional_kwargs=f_optional)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 294, in call_named_function
    result = f(*args, **kwargs)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\MOVIE2K.bundle\Contents\Services\URL\MOVIE2K\ServiceCode.pys", line 191, in MetadataObjectForURL
    return GetItemInfo(url,'Metadata')
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\MOVIE2K.bundle\Contents\Services\URL\MOVIE2K\ServiceCode.pys", line 94, in GetItemInfo
    thumb = Callback(GetThumb, url=thumb))
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 218, in __init__
    setattr(self, name, model_attrs[name])
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 292, in __setattr__
    attr.add(item)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py", line 523, in add
    obj._setcontent(value)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py", line 166, in _setcontent
    content = unicode(content)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa0 in position 8: unexpected code byte
</Traceback>
</Response>

2: Error - Trying to access the summary page on Plex Web:

URL:
http://127.0.0.1:1227/system/:/services/url/lookup?url=http%3A//www.movie4k.to/Crimson-Tide-watch-movie-882466.html%3Ftitle%3DCrimson%2BTide%26summary%3D%250A%2B%2B%2B%2BOn%2Ba%2BUS%2Bnuclear%2Bmissile%2Bsub%252C%2Ba%2Byoung%2Bfirst%2Bofficer%2Bstages%2Ba%2Bmutiny%2Bto%2Bprevent%2Bhis%2Btrigger%2Bhappy%2Bcaptain%2Bfrom%2Blaunching%2Bhis%2Bmissiles%2Bbefore%2Bconfirming%2Bhis%2Borders%2Bto%2Bdo%2Bso.%26show%3DADDED%253A%2B10%252F03%252F2011%2B%2B%257C%2BHOST%253A%2BPutlocker%2B%257C%2BQUALITY%253A%2BDVDRip%252FBDRip%26date%3D2013-01-01%2B00%253A00%253A00%26thumb%3Dhttp%253A%252F%252Fimg.movie4k.to%252Fthumbs%252Fcover-882466-Crimson-Tide-movie4k-film.jpg%26host%3DPutlocker%26season%3D0%26index%3D0%26type%3DMovies%26genres%3DAction%252CDrama%252CThriller%25A0%26director%3D%2BTony%2BScott%2B%25A0%26actors%3D%2B%250A%2B%2B%2B%2B%2B%2B%2B%2BDenzel%2BWashington%252C%2BGene%2BHackman%252C%2BMatt%2BCraven%252C%2BGeorge%2BDzundza%252C%2BViggo%2BMortensen%252C%2BJames%2BGandolfini%2B%2B%2B%2B%2B%2B%2B%2B%250A%2509%2B%2B%2B%2B%2509%2B%2B%2B%2B%250A%2509%2B%2B%2B%2B%2509%2B%2B%2B%2B%250A%2509%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%250A%2B%2B%2B%2B%2B%2B%2B%2B%250A%2B%2B%2B%2B%2B%2B%2B%2B%2509%26duration%3D6960000%26rating%3D7.2%26content_rating%3DNR

And this is the XML response:
<?xml version='1.0' encoding='utf-8'?>
<Response code="2000" status="UnicodeDecodeError: ">
  <Traceback>Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 837, in handle_request
    result = f(**d)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\handlers\services.py", line 26, in url_lookup
    c = self._core.services.metadata_object_for_url(url, in_container=True)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 724, in metadata_object_for_url
    return self._get_result_from_function_for_url(self.metadata_object_for_url_from_service, url, do_normalization, dict(add_items_automatically = add_items_automatically, allow_deferred = allow_deferred, in_container = in_container))
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 740, in _get_result_from_function_for_url
    result = func(url, service, **kwargs)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 641, in metadata_object_for_url_from_service
    metadata = self._call_named_function_in_service(METADATA_OBJECT_FUNCTION_NAME, service, )
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 588, in _call_named_function_in_service
    return self._call_named_function_in_sandbox(service.sandbox, fname, None, f_args, f_kwargs, allow_deferred, raise_exceptions, f_optional)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 572, in _call_named_function_in_sandbox
    result = sandbox.call_named_function(fname, allow_deferred=allow_deferred, raise_exceptions=raise_exceptions, args=f_args, kwargs=f_kwargs, mod_name=mod_name, optional_kwargs=f_optional)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 294, in call_named_function
    result = f(*args, **kwargs)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\MOVIE2K.bundle\Contents\Services\URL\MOVIE2K\ServiceCode.pys", line 191, in MetadataObjectForURL
    return GetItemInfo(url,'Metadata')
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\MOVIE2K.bundle\Contents\Services\URL\MOVIE2K\ServiceCode.pys", line 94, in GetItemInfo
    thumb = Callback(GetThumb, url=thumb))
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 218, in __init__
    setattr(self, name, model_attrs[name])
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 292, in __setattr__
    attr.add(item)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py", line 523, in add
    obj._setcontent(value)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py", line 166, in _setcontent
    content = unicode(content)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa0 in position 8: unexpected code byte
</Traceback>
</Response>

Mikedm139 giving him a shout out for the idea to the URL keys I finally got around to doing!!!!!

So the Summary Page on Plex Web and on the Roku the Expermental Transcoder now works!!!!! %5Burl=

Ok, figured out the issue for the URL Services in the MetadataObjectForURL function by assigning parameters to EpisodeObject and MovieObject.  It has to do with the directors, guest_stars and genres being assigned (if you remember in earlier post deduced they had to be an array).  This information is not displayed on the Summary Page for Plex Web or on the Roku Summary Page anymore since I disabled those fields%5Burl=

So what the Summary Page does not support this information at this time or is this some new error that has crept into the Plex Media Server? %5Burl=

And, then if you try them as a string you get the following error:
 

<?xml version='1.0' encoding='utf-8'?>

  Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 837, in handle_request
    result = f(**d)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\handlers\services.py", line 26, in url_lookup
    c = self._core.services.metadata_object_for_url(url, in_container=True)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 724, in metadata_object_for_url
    return self._get_result_from_function_for_url(self.metadata_object_for_url_from_service, url, do_normalization, dict(add_items_automatically = add_items_automatically, allow_deferred = allow_deferred, in_container = in_container))
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 740, in _get_result_from_function_for_url
    result = func(url, service, **kwargs)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 641, in metadata_object_for_url_from_service
    metadata = self._call_named_function_in_service(METADATA_OBJECT_FUNCTION_NAME, service, )
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 588, in _call_named_function_in_service
    return self._call_named_function_in_sandbox(service.sandbox, fname, None, f_args, f_kwargs, allow_deferred, raise_exceptions, f_optional)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\services.py", line 572, in _call_named_function_in_sandbox
    result = sandbox.call_named_function(fname, allow_deferred=allow_deferred, raise_exceptions=raise_exceptions, args=f_args, kwargs=f_kwargs, mod_name=mod_name, optional_kwargs=f_optional)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 294, in call_named_function
    result = f(*args, **kwargs)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\MOVIE2K.bundle\Contents\Services\URL\MOVIE2K\ServiceCode.pys", line 194, in MetadataObjectForURL
    return GetItemInfo(url,'Metadata')
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\MOVIE2K.bundle\Contents\Services\URL\MOVIE2K\ServiceCode.pys", line 84, in GetItemInfo
    thumb = thumb)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 218, in __init__
    setattr(self, name, model_attrs[name])
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 297, in __setattr__
    setattr(self._model, name, value)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py", line 31, in __setattr__
    self._attributes[name]._setcontent(value)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py", line 600, in _setcontent
    ContainerObject._setcontent(self, content)
  File "C:\Documents and Settings\Administrator\Local Settings\Application Data\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py", line 244, in _setcontent
    raise Framework.exceptions.FrameworkException("Container-type attributes can't be assigned directly.")
FrameworkException: Container-type attributes can't be assigned directly.


Ok, I figured out the issue with the directors, guest_stars and genres.  So I created my own bug all this time but thanks for ALL the help on this plugin project!!!  I used the following to strip out bad characters that can not be processed.  :D

Now if I can just get feedback on who is using the plugin and on what devices.  :blink:

MOVIE2K.bundle (M2K) Plex Plugin on GitHub:
https://github.com/Joecowboy/MOVIE2K.bundle

Example:

def StripArray(arraystrings):

    temparraystring = []
    
    for array_elem in arraystrings:
        elem = re.sub("[ \xa0]", "", array_elem).strip()
        temparraystring.append(elem)

    return temparraystring

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.