Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter tund3r

    (@tund3r)

    I fixed the player with a workaround:

    I added “$media_url=strtok($media_url,’?’);” at the beginning of powerpressplayer_get_extension()

    This caused the player to freak out and put a link instead of the real player, so I had to add the same instruction at the beginning of the player function.

    This is just a workaround and I’m not sure what can happen if I change the player or I receive a video with a query string

    Plugin Author Angelo Mandato

    (@amandato)

    The “?dest-id=xxxxx added to the end of the URLs is something LibSyn is doing recently. You do not need that added to the URLs if you are using PowerPress as it pretty much circumvents the destination tracking that they are trying to achieve. You can simply edit the URLs and remove them.

    If you did a bulk one-time import, you can quickly remove this extra bit from the URLS by using the Find and Replace episode URLs tool under PowerPress menu > Tools section. Simply enter ““?dest-id=xxxxx” (replace the xxxxx with the actual value in your situation) and the replace value leave blank then click next. It will show a preview of the media URLs it will modify. When you click to the 2nd step, make sure the option “Verify URLs” is checked, this will not allow the change to happen unless the URL returns a 200 OK response.

    From that point forth, when you create new episodes, do not include the ?dest-id=…. The query string (the question mark portion) has been known to cause issues in web players on some podcast directories where they do not properly escape special characters. This is why PowerPress warns against such urls in the media URL box. If you do not like the warning and want to keep the dest-id parameter you can disable warnings in PowerPress settings.

    Thread Starter tund3r

    (@tund3r)

    Thank you so much for your answer!
    Since I will be creating new episodes in libsyn my plan was to keep importing them when I create them, is there a better way to import them?

    Since I haven’t studied all the possibilities and podcasts feeds, what would be the best solution to fix the import in the plugin or the player to load correctly? I’m a programmer and I can help you if you want.

    Thank you again
    Andrea

    Thread Starter tund3r

    (@tund3r)

    For the moment I modified the import powerpress/powerpressadmin-rss-import.php

    I changed this:

    		$media_url = '';
    		if( !empty($enclosure['url']) )
             	         $media_url = $enclosure['url'];
    		$post_date_gmt = false;
    

    For this:

    		$media_url = '';
    		if( !empty($enclosure['url']) ) {        
    	                if ($_GET['import'] == 'powerpress-libsyn-rss-podcast') 
                                      $enclosure['url']=strtok($enclosure['url'],'?');  //Tund3r: added for libsyn
             	         $media_url = $enclosure['url'];
    			}
    		$post_date_gmt = false;

    It takes out any variable after the url if it is a libsyn rss, please let me know if you see any challenge with this

    Plugin Author Angelo Mandato

    (@amandato)

    Just giving you an update, I am adding your code plus adding an option to the import screens to parse the query string, then checkbox will be checked by default. I am coding the checkbox option because it is possible that the URLs do not work if the query string is not present. Most services that I’ve tested this it is not an issue but there is the possibility that it needs to remain. I’ll reply when It is ready.

    Thanks!

    Thread Starter tund3r

    (@tund3r)

    Thank you @amandato,

    for improving the solution, I understand my was more a workaround.

    At this poing I feel the most “complete” solution would to improve the script that loads the players (like the first workaround i tried) so we won’t have to alter the url in any way. From what I understand it guess the type of file (video or audio) by the extension and I don’t know if any of the podcasts hosts put this at the end of the query string.
    If you think it’s feasible I can try to work on it

    Plugin Author Angelo Mandato

    (@amandato)

    I Am almost done auditing this actually. There are a few hosting companies that require the query string or the media URL does not work. I sampled 1 million episode URLs and found almost 100,000 have query strings in them. I have been randomly picking URLs from that batch to determine more but it’s quite complicated. For example, early FeedBurner URLs used a query string that then redirected to the media file.

    Plugin Author Angelo Mandato

    (@amandato)

    Hello @tund3r,

    I found many examples going both ways, where the query string matters or does not matter.

    I’ve gone full circle! Here is the solution I am putting in place now…

    If you import via libsyn, by default the query string will be removed (your contributed code).

    If you import via other feed, there will be a checkbox option, default will be unchecked, to not include the query string. If the box is checked, your code will be used.

    These changes will be rolled out in the next release, I am hoping to put it all together either tonight or tomorrow night.

    Thread Starter tund3r

    (@tund3r)

    Hi @amandato, I’m glad you liked the contribution! I suspected that the issue was more complex than simply taking out the query.

    Reading your solution I have a question:
    The plugin selects the palyer based on the filename and this is why the query string is annoying (it loads the video even if it is audio). With this solution, if my provider needs the query string I check the box, my question is how is the plugin going to load the correct player? I thnk we might also need a checkbox to decide which player (audio or video) to use or another way to find the nature of the content.

    Let me know if it makes sense or there is something I’m missing and eventually how can I help

    • This reply was modified 8 years, 3 months ago by tund3r.
    Plugin Author Angelo Mandato

    (@amandato)

    Hello @tund3r,

    It is my fault that I made this more complicated than it needed to be, but I am a developer so it comes with the territory. The solution is now committed and will be part of the next release.

    Thanks,
    Angelo

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Import from Libsyn to WordPress’ is closed to new replies.