Code Monkey home page Code Monkey logo

gloc's People

Contributors

justin2004 avatar jvolkening avatar uhoreg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gloc's Issues

Error fetching license

Attempting to use "GNU/Linux OverDrive/eMusic Client 0.600" to download audio for the first time after just downloading it now. After opening the odm file I just downloaded from overdrive, I get a list of 6 files to download, with all of them automatically selected. If I hit "Start Download" I get the following error:

"There was an error fetching the license for this book"

I also see the message "Redundant argument in subroutine entry at ./gloc line 1407" in my terminal, but from looking at the code, that appears to be a side effect, and not the cause of my error.

If I go to File->License Info, The license details show "Yes" or "Unlimited" for all fields except Expiration Date which says "March 11, 2017 13:53:20"

Handle case when Overdrive inserts unescaped ampersand in CDATA->Metadata->Subjects->Subject

I downloaded a file from overdrive with the following raw text:

<?xml version="1.0"?>
<OverDriveMedia ...>
  <License>...</License>
  <![CDATA[<Metadata> ... <Subjects> ... <Subject id="74">Religion & Spirituality</Subject> ...	

The CDATA section contains an unescaped ampersand in the subject tag, causing a parsing exception in gloc, which is visible in the terminal:

*** unhandled exception in callback:
***   
***   not well-formed (invalid token) at line 1, column 770, byte 770 at /usr/lib/x86_64-linux-gnu/perl5/5.30/XML/Parser.pm line 187.
***   XML::Simple called at /usr/local/bin/gloc line 1029.
***  ignoring at /usr/share/perl5/Gtk3.pm line 572.

A quick workaround was to remove the & in "Religion & Spirituality", after which gloc downloaded the audiobook just fine. Note that "column 770" is counted from the beginning of the CDATA section, not from the beginning of the file.

In addition, the unhandled exception makes gloc unable to open other .odm files and the "open audiobook descriptor file" dialogue cannot be closed. You can still close gloc through the main window.

I hope this is helpful to others.

remove eMusic support

It appears that eMusic (now under eStories for audiobooks) is no longer using the same format for downloads. The website now serves a zip file from the user's web library as a direct download.

Given this, it probably makes sense to remove eMusic support from the codebase. This will significantly simplify some parts of the code.

fails when narrator is not present in odm file

I have an ODM that is missing the narrator field. When this happens, the program crashes with the following error message:

undefined value for mandatory argument 'str' encountered at /usr/local/bin/gloc line 1236.

However, I was able to comment out that line and proceed with my download:

    # update display
    $info_labels{Duration}->set_text( $book->{duration} );
    $info_labels{Title}->set_text(    $book->{title}    );
    $info_labels{Author}->set_text(   $book->{author}   );
-   $info_labels{Narrator}->set_text( $book->{narrator} );
+   #$info_labels{Narrator}->set_text( $book->{narrator} );
    $info_labels{Publisher}->set_text($book->{publisher});
    $info_labels{Expires}->set_text(  $book->{exp_date} );

I don't know perl well enough to try making that an optional field, so I hope this helps. Not sure of the legality of sharing fill odm files, but I looked at the XML inside and found that there was only one <Creator> tag, with the role of "author". Nothing for Narrator, as I saw in other files that did work.

Thanks for making this! I'm really glad not to have to borrow a computer when I download an audiobook :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.