WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: podPress] Podcast duration lost/not being saved (Workaround provided) (11 posts)

  1. Puck
    Member
    Posted 2 years ago #

    podPress version: 8.8.10.7

    I'm not sure when this behaviour began but I was notified by a user that our (podcast's) feed was giving an itunes:duration of 00:00:01 for every episode.

    I know that I had previously used "Auto Detect" for every podcast's duration and I'm fairly certain the duration was saved but now if I load up a post with an attached podcast the duration is blank.

    Pressing "Auto Detect" again properly detects the duration but after Updating the post this information was lost again.

    I determined that the problem was "Auto Detect" was putting an extra space character at the beginning of the duration (link shows screencap of the space selected).

    Workaround
    If I manually remove this space and then Update the post, the duration error is fixed both in the podPress settings for that post and the itunes:duration setting in the podcast feed.

    Though this solves the problem and I can do it manually for future podcasts, having to go back through over a hundred podcast posts is a bit daunting.

  2. ntm
    Member
    Posted 2 years ago #

    Puck,

    thanks for the report and thank you for your efforts to find a solution!

    I will investigate this. Please, tell which browser you have used (browser and OS version). I have tried it so far with Firefox 4.0.1 and Safari 5.0.4 both on a computer with Win 7. But Auto Detect did not prepend a whitespace.
    But I will do some more tests.

    Regards,
    Tim

  3. Puck
    Member
    Posted 2 years ago #

    Google Chrome 12.0.742.91 on Windows 7/64 bit.

    I hadn't thought about trying other browsers...

    Firefox 4: Yes, no space!
    IE 9: No space.

    So it's definitely a Chrome problem.

  4. ntm
    Member
    Posted 2 years ago #

    Thanks a lot for making these additional tests!

    It is probably a problem of the podPress code which appears in Chrome. I will try to find a solution. That is nothing that should last.

    Regards,
    Tim

  5. ntm
    Member
    Posted 2 years ago #

    Puck,

    please, try the current Development Version. I have added at several lines of the code trim commands which should definitely prevent "Auto Detect" from delivering values with prepended (or appended) white-spaces.

    Notice: This is a Beta version. Please, make a backup of your db before you try it.

    Regards,
    Tim

  6. Puck
    Member
    Posted 2 years ago #

    Grabbed it, backed up my release version, installed Development Version.

    Cleared browser cache, loaded the latest podcast, cleared the "Duration" field and clicked "Auto Detect". Space still occurs in Chrome.

  7. ntm
    Member
    Posted 2 years ago #

    Puck,

    I have also made some more tests with Chrome 12.0.742.100 on Win 7 64bit and Chromium 12.0.742.91 (87961) Ubuntu 11.04 (64 bit) in a blog on a Linux server and a Windows server. But so far I was not able reproduce this strange behaviour. That is why I still have problems to imagine where the whitespace comes from.
    With the last modifications the result of the duration retrieval gets trimmed (ltrim, rtrim) before it gets inserted.
    The javascript function which recieves the value as a response of a AJAX request replaces all characters with this (trimmed) result. It should be not relevant whether there is something in this input field or not. (Can you confirm that?)
    So it should work.
    However I have made some further modifications which are now part of the Development Version. I would appreciate it if you could download and install this version.
    If the problem still occurs after the upgrade then you could activate a debug log function in podPress. In oder to do that you need to edit the podpress.php file. In line 127 of that file you can find

    if ( ! defined( 'PODPRESS_DEBUG_LOG' ) ) { define( 'PODPRESS_DEBUG_LOG', FALSE ); }

    change it to

    if ( ! defined( 'PODPRESS_DEBUG_LOG' ) ) { define( 'PODPRESS_DEBUG_LOG', TRUE ); }

    If you do that, podPress will try to create a log file (podpress_log.dat) in the podpress folder. For this action the podpress script needs the permission to write in this folder (That is not always the default server setting.).

    podPress logs all its steps during these Auto Detect actions and other actions. So activate this only for one or two clicks on such a Auto Detect button.

    Maybe post the content of this log file. (Maybe you should consider using a pastebin service. Or make screenshot of the content of the file.)
    But mostly I want to know whether this file contains a line like podPress_getDuration - playtime_string: 0:00:01 and how many whitespaces are between playtime_string: and the duration value.
    Is the duration value in this file equal to the result which you could see in the input field next to the Auto Detect button?

    Are you using any Chrome browser extensions?

    Tim

  8. Puck
    Member
    Posted 2 years ago #

    The new Developer Version works! No more space!

    Thank you! Best and fastest plugin developer response ever!

    And for the record, I did a test before trying the new Dev version, disabling my Extensions, clearing the cache, and testing in an Incognito window and the space still showed up.

    Also of note was that the space also appeared in "File Size" but was trimmed after Publishing/Updating the post. Duration returned empty if it was Published/Updated with the space at the beginning.

    Next payday you're getting a donation from Caustic Soda for sure!

  9. ntm
    Member
    Posted 2 years ago #

    That are really good news!

    Thank you for your good and thorough descriptions and for all the tests.

    I will review the part of the plugin which stores the post settings in the db.

    Regards,
    Tim

    (ps: I have no donation button. But thanks for the offer.)

  10. Puck
    Member
    Posted 2 years ago #

    This isn't you? There's a donate button there.

  11. ntm
    Member
    Posted 2 years ago #

    No. That is the site of the original author of podPress Dan Kuykendall (seek3r). You may donate on his site. I did not wanted to stop you from doing that.
    Maybe it will bring Dan back to get involved again. Furthermore it is totally right to give him credit. He has written and maintained (until 2008) the plugin.

    I have started to write patches for podPress more than a year ago since it started to become incompatible with WP (e.g. jam the media upload dialog of the WP post editor; problems with the Widget API; Multi Site incompatibilities etc.) and since last summer I have started to add new features too.

Topic Closed

This topic has been closed to new replies.

About this Topic