Porting South Park Nl To Swedish

I used to watch south park alot on southparkstudios.com before they started to block people outside of the US. But now we have a local site here in sweden where we can watch full episodes. (southparkstudios.se).

This made me think that it would be a nice idea to watch the episodes in plex instead of the browser. Then i found the plugin South Park NL so i started to try to port it.



This far i have got some minor functionality working i can browse through seasons and episodes inside of plex and display thumbs, episode names and episode description.

But when i try to start the actual video i get an pop up error message in plex that says “Error while opening file”.



So i started to do some print outs in my log file.

Player id:328a331a-c0ca-4a1b-876c-394bc22b55aa

Player url: http://media.mtvnservices.com/mgid:hcx:content:southparkstudios.se:328a331a-c0ca-4a1b-876c-394bc22b55aa/



If i put in the player url in my webbrowser it launches the video in fullscreen (not real fullscreen but the fullscreen of the browser). This is the parameter that I send to WebVideoItem()

return Redirect(WebVideoItem(playerUrl))

Is this the correct way of action?



Since both the swedish and the netherlands south parks sites have the exact same layout i thought that I could use the same site config as the one I found in South Park NL but just switch the .nl to .se



But in the site config i found a reference to this site=“http://plugins.plexapp.net/southparknl/” which I don´t really understand because when i try to connect to that adress I get a 404. If I understood the documentation about site configurations correctly

should be a reference to the site where the player is located and a reference to the embedded player.



Is there anyone here that can help me figure out why I get this error?

Hi prinsen!

I wrote the South Park NL plugin, which in its turn is partly based on the original (“American”) South Park plugin. I think that for a Swedish version you’ll only need to change a couple of small things, I’ll go into detail about that below.



First let me explain this…:



The documentation is correct, you see *plugins.plexapp.net/southparknl/* in the Site Config because I'm hosting a small page myself under the *plugins.plexapp.net* subdomain. That page contains the Comedy Central/MTV webvideoplayer and expects a player id as input. I do this because the Dutch South Park website contains some broken Javascripts that do not always behave the same for each season (for example: you can't open season 13 episodes automatically in a popup).

The reason why you got a 404 error is because this url isn't complete:

http://plugins.plexapp.net/southparknl/


It expects a player id, like so:

http://plugins.plexapp.net/southparknl/9c1511a6-b6ad-48d5-8422-3c4feb77d4ae/



I use that player id to show the right videoplayer and thus the right South Park episode.

I already made a small change to plugins.plexapp.net/southparkXX so it’ll also work with Swedish stuff :wink:



Here are the things that need changing to “convert” the Dutch South Park plugin bundle file to a Swedish one:



[list][]Rename South Park NL.bundle to South Park SE.bundle[/list]



Then change the following files:



South Park SE.bundle/Contents/Info.plist

[list][
]Change this line:


<string>com.plexapp.plugins.southparknl</string>


To this:

<string>com.plexapp.plugins.southparkse</string>

[/list]



South Park SE.bundle/Contents/Strings/nl.json & se.json

[list][]Delete nl.json (this is the Dutch language file);

[
]Copy en.json to se.json and translate the contents.[/list]



South Park SE.bundle/Contents/Site Configurations/southparknl.xml

[list][]Rename southparknl.xml to southparkse.xml (for file naming consistency);

[
]Change this:


<site site="http://plugins.plexapp.net/southparknl/"<br />
	plugin="http://media.mtvnservices.com/mgid.*southparkstudios.nl"<br />
	initialState="playing"<br />
	version="1.0">


To this:

<site site="http://plugins.plexapp.net/southparkse/"<br />
	plugin="http://media.mtvnservices.com/mgid.*southparkstudios.se"<br />
	initialState="playing"<br />
	version="1.0">

[/list]



South Park SE.bundle/Contents/Code/init.py

[list][*]If the website is indeed a copy of the Dutch website, you only need to change PLUGIN_TITLE, PLUGIN_PREFIX, BASE_URL and EPISODE_PLAYER:



<br />
PLUGIN_TITLE                    = 'South Park SE'<br />
PLUGIN_PREFIX                   = '/video/southparkse'<br />
<br />
BASE_URL                        = 'http://www.southparkstudios.se'<br />
EPISODE_GUIDE                   = '%s/guide/' % BASE_URL<br />
EPISODE_GUIDE_SEASON            = '%s/guide/season/%%s/' % BASE_URL<br />
EPISODE_PLAYER                  = 'http://plugins.plexapp.net/southparkse/%s/'<br />
THUMB_URL                       = 'http://southparkstudios-intl.mtvnimages.com/shared/sps/images/south_park/episode_thumbnails/s%se%s_480.jpg?width=512'<br />


[/list]

And here is a new .bundle with all the above changes :slight_smile: If the Swedish website is a copy of the Dutch one, it probably already works. But maybe there are some small differences between the two websites, in that case you probably receive an error somewhere and some code may have to be changed. (Unfortunately I can’t test this, because I’m not in Sweden and access to that website is blocked for me).



Edit: attachment deleted, new bundle file in post below

Works like a charm. The only things that differed from my version was



in the init.py file

EPISODE_PLAYER = ‘http://plugins.plexapp.net/southparkse/%s/



and in the site config

site=“http://plugins.plexapp.net/southparkse/



From what i can understand you have started to host a new site at “http://plugins.plexapp.net/southparkse/” for us swedes. Which is really great thanks alot.

I´ve created this wiki site.

http://wiki.plexapp.com/index.php/South_Park_SE



But when i try to upload the latest build of the bundle i get errors.

If i try to submit the compressed .bundle i get the following error

“Files of the MIME type “application/zip” are not allowed to be uploaded.”



If i use Appmaker to make a .plexapp file of the bundle and try to upload that file i get the following error.

“The file is corrupt or has an incorrect extension. Please check the file and upload again.”



Even if both .zip and .plexapp is listed as permitted file types.

Uploading .zip or .plexapp file to the Wiki doesn’t work for me either. Anyway, I created a Lighthouse ticket for this plugin to be included in the App Store.

Great. I created a link to the attachment in this thread so that people who want to try it out can download it until it is possible to download it through the appstore.

I have downloaded this bundle and also the one from app store (the swedish one) But when I’m trying to watch I get a little turquoises screen inside the plex window.The episodes doesn’t start. I got the latest version of Plex.

Anyone knowin about this problem?



thanks!



Great work.
I am working on a Norwegian plug-in, or basically just a translation of the Swedish.
How do I get a http://plugins.plexapp.net/southparkno/ site?

Hi!
If the Norwegian website is the same as the Dutch and Swedish websites, just follow the steps above for the things that need changing. I added "no" to the webpage displaying the video, so this should work for you too now:
plugins.plexapp.net/southpark**no**/**playerid**

Please let us know if everything works! B)

The only thing I can think of is that you maybe have an old(er) version of the Flash player installed on your system. Use the [Flash player uninstaller](http://kb2.adobe.com/cps/141/tn_14157.html) to remove your current Flash plugin and get the latest one from [Adobe](http://get.adobe.com/flashplayer/).

Thanks! The strange thing is that when I'm surfing in to soutparkstudios.se I can watch trough my browser with out any problems. Now after reinstalling flash player a screen in Plex with Cartman comes up where it says "oopps..something is wrong. Try again in a few minutes"
It still works in Safari and Firefox.


I get the same message on the Norwegian player. Can view the pages without problems while browsing.

Am using SL 10.6.2.

@tussler: did you make all the changes as mentioned in my earlier post? Can you otherwise upload the bundle file?


Done all the changes as in your post.

When entering this adresse in firefox I get a "Configuration Error: XML-malformed."-error.
http://plugins.plexapp.net/southparkno/237ab8cc-6d22-4466-a0a6-f71b333d38c1

I am still getting Cartman telling me that something i wrong in Plex.

Where should i upload the bundle?

I can confirm that there that some problem “Tussler” and “kallehallick” are describing have started to show up with the swedish plugin. When i try to play a episode the message “Oopps… something is wrong. Try again in a few minutes” show up even though the same episode plays well with Safari or Firefox.



It feels like they have done some change over at southparkstudios because me and a couple of friends really hard tested the plugin a few days ago. I watched south park for about 6 hours a day for two days straight when I was home sick. Then i didn’t experience any problems except that Plex crashed once.



@Sander1 Has this problem started to show up in South Park NL? Do you have any ideas of how to debug this problem?

Not sure what’s going on, but on the Dutch website I receive errors for almost every episode. :frowning:

Let’s hope this is temporary.

The problems on the Dutch website seem to be resolved!



Edit: Never mind, still (again) not working…

The Swedish plugin is still not working I’m getting the same error message.