The OpenAniDB Client Thread

misc client related stuff

Moderators: AniDB, AniDB API

Locked
MostAwesomeDude
Posts: 38
Joined: Fri Jun 01, 2007 11:02 am

The OpenAniDB Client Thread

Post by MostAwesomeDude »

Edit: SVN 339 committed. Yay for user feedback!

Hey, guys. My client is mature enough that it's not gonna kill your computer or kidnap your family, so I want some opinions, mostly on UI, since I'm more of an algorithms guy than a graphics designer.

For those not in the know, OADB is a new UDP client. Right now it's at a level sort of like WebAOM or Ame, but not quite as bug-free. On the plus side, the source is open and it's got a pretty small footprint.

The tarballs and zips are here: http://locke.aweenet.net/~simpson/oadb/
(If the server's down, email MostAwesomeDude@gmail.com and I'll get it back up.)

If you're on Windows, grab openanidb-svn-###-win32.zip and run openanidb.exe. If you're on Linux, grab openanidb-svn-###.tar.gz and run openanidb.py.

You will need Python, wxPython, PyCrypto for hashing, and APSW. If you're on Windows, these have been provided for you.

Python: http://www.python.org/
APSW: http://www.initd.org/tracker/pysqlite/wiki/APSW
wxPython: http://wxpython.org/download.php
PyCrypto: http://www.amk.ca/python/code/crypto

Debian: apt-get install python-wxgtk26 python-crypto python-apsw
Gentoo: emerge -av wxpython pycrypto apsw

Mac users, I can't really help you too much. Sorry. If somebody has info, lemme know.

I'm interested in your comments, flames, criticisms, suggestions, and patches, so send everything my way. If you experience a crash, send me your openanidb.ini, anime.db, and whatever was in the traceback window when it died.

If you need help using the damn thing, ask me! I won't know what's hard to use and not intuitive if you don't talk to me!

~ C.
Last edited by MostAwesomeDude on Sun Sep 02, 2007 9:18 pm, edited 4 times in total.
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

commit email wrote:+To get started, make sure you have Python 2.4.x, wxPython 2.6.x, and
+APSW. I realize that for now this is difficult for those not on Linux,
+but I will address that in a few days.
Are there specific portability issues, or are you just worried about the ability of windows users to install dependencies?

Rar
MostAwesomeDude
Posts: 38
Joined: Fri Jun 01, 2007 11:02 am

Post by MostAwesomeDude »

Rar wrote:Are there specific portability issues, or are you just worried about the ability of windows users to install dependencies?
AFAIK, there are no outstanding wx bugs that affect me on Windows or Mac. In addition, winPython and wxMSW through Wine run just fine here. I was more worried about "I tried to start it and it said 'WX not installed; please install wxPython,' what do I do?" kinds of replies.

I've got an experimental kind of support for NOTIFY and its relatives coming along. The code is fine, but I need feedback for UI since I never make good UI decisions...

~ C.
Der Idiot
AniDB Staff
Posts: 1227
Joined: Fri Mar 21, 2003 10:19 am

Post by Der Idiot »

conviniently i had that all installed already as i'm poking my own python sql bit atm :P

anyway it dies for me on trying to login. the interface freezes. that's all i see. no debuginfo i could give you. trying to run it via idle, idle just cries at me because of the mixed use of tabs and spaces :P
MostAwesomeDude
Posts: 38
Joined: Fri Jun 01, 2007 11:02 am

Post by MostAwesomeDude »

Der Idiot wrote:conviniently i had that all installed already as i'm poking my own python sql bit atm :P

anyway it dies for me on trying to login. the interface freezes. that's all i see. no debuginfo i could give you. trying to run it via idle, idle just cries at me because of the mixed use of tabs and spaces :P
...And thus I have bug #1: Make indentation uniform. I've gotta go knock down a fence, will fix when I return.

Edit: All tabs in SVN are now whitespace. In addition, two menu-related regressions were taken care of. Do you get a busy cursor when trying to log in, and did you wait at least five seconds? The interface is configured to go to a busy cursor, send a PING, LOGIN, and ENCODING, and then become usable again.

Edit edit: Going to kill kdesvn. Rev 307 has the correct udp.py in it, and is up on locke.aweenet.net. Login/logout works fine over here; wonder if there's some Windows network bug I haven't seen yet?

~ C.
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

issues in svn version

Post by exp »

got the following issues with the latest svn version:

at first startup (does not happen on subsequent startups):

Code: Select all

Traceback (most recent call last):
  File "./openanidb.py", line 39, in ?
    import db
  File "./db.py", line 76, in ?
    regendb()
apsw.ConnectionNotClosedError: apsw.Connection on "/home/nobody/.oadb/anime.db" at address 0xb6669910, allocated at ./db.py:62. The destructor has been called, but you haven't closed the connection.  All connections must be explicitly closed.  The SQLite database object is being leaked.
when searching for anime: (it doesn't matter whether i search for a title or an aid)

Code: Select all

Starting anime search...
Traceback (most recent call last):
  File "./openanidb.py", line 521, in gui_anime
    results = udp.anime(self.outbound, self.inbound, self.ssid, aid, aname)
AttributeError: 'oaframe' object has no attribute 'outbound'
when hashing a file:

Code: Select all

Starting hashing...
Traceback (most recent call last):
  File "./openanidb.py", line 684, in gui_hash
    for i in hasher:
  File "./hash.py", line 290, in ed2k
    hashl.append(md4obj(buf).digest())
TypeError: __init__() takes exactly 1 argument (2 given)
other points:
- an option to store username and password would be useful

my system:
- Linux 2.6.x/Debian Etch
- KDE 3.5.7
- openanidb code SVN revision 309

Code: Select all

Core:
  GUI Version: 0.2a
  Python version: 2.4.4
  WX version: 2.6.3.2
Network:
  UDP API version: 3
  UDP client version: 2
Hash module:
  No PCT present, using internal library
Database:
  APSW version: 3.3.13-r1
  SQLite version: 3.3.17
BYe!
EXP
MostAwesomeDude
Posts: 38
Joined: Fri Jun 01, 2007 11:02 am

Post by MostAwesomeDude »

Edit: Committed. Thanks for the patience.

In this commit:
- APSW after 3.3.8 requires all Connections be close()d before, say, popping the stack and returning. This is now fixed both for people like me, on 3.3.5, and people on Fedora/Debian/Windows using 3.3.10 or 3.3.13.
- The Anime Search tab has been fixed to work with the (newer) network/DB code. That tab was never really intended to be permanent, just a way to test DB calls, although I can see some use for it, if it were seriously patched up and make shiny-like.
- Hashing will never be fast without machine-level code. Using PyCrypto gets you 30-second-per-file hashes, which is about 60 times faster than the Python-based MD4. (That's right, 60x faster!!!) Thus, please do yourself a favor and install PyCrypto. While the code's been written to not die if you don't have it, it's gonna be slow otherwise. Even if you have Psyco, it will still be 15 minutes per file.
- By request, username and password can now be stored in settings. Unfortunately, while it remembers them, the network code isn't wired up to use the settings, and between making a commit and making a feature, I chose the commit. Sorry. I'll probably commit it this time tomorrow.

Todo for next commit:
- Wire up settings for username and password to network code

Eventually:
- Make Windows binaries (not done; I have no Windows comps)
- Enable dynamic per-file directory expansion for moving files (~/anime/$a/$g/, etc.)
- Add episode versions to file renaming templates (Bleach - 1v2 - [Lunar].avi, etc.)

~C.
MostAwesomeDude
Posts: 38
Joined: Fri Jun 01, 2007 11:02 am

Post by MostAwesomeDude »

Committed. God, that was a long week. Anyway, autologin works; I added an icon (and you can add one, too; just put a zero.xpm into your .oadb folder.)

There are no outstanding bugs. Or, to rephrase, I haven't been notified of any new bugs. Or feature requests, for that matter. If you guys have 'em, send 'em!

~ C.
MostAwesomeDude
Posts: 38
Joined: Fri Jun 01, 2007 11:02 am

Post by MostAwesomeDude »

Commits 337 and 338 are in. Sorry for two commits in a row, but I got a hold of a Windows box after 337 and had to try out my code for myself.

So, in 337, I unmangled classes and fixed hashing (again.) Also, substitutions now work for the destination directory to move files, and I added a popup box to settings explaining string formatting.

In 338, I took care of the showstopper Der Idiot found three weeks ago. Apparently, wxMSW doesn't like callbacks any more than wxGTK, so I changed the callbacks in udp.py to respect wx's loop, and it looks fine. I've also made binaries! Yay! Windows is a new and exciting environment, and I've already figured out how to port the icon. ("Yes, because the icon is the most important part, lawl.")

Enjoy!
~ C.
Hakker
Posts: 5
Joined: Tue Aug 03, 2004 10:23 pm

Post by Hakker »

using the windows 338 version

first of all I get the following error
"can't load image from file 'zero.xpm': file does not exist."
however I can continue with the program after I click it away so it ain't serious

Second I still see some filetypes missing
wmv, rm, rmvb, asf, mpg, ogm
especially wmv and ogm are still used on several animes
MostAwesomeDude
Posts: 38
Joined: Fri Jun 01, 2007 11:02 am

Post by MostAwesomeDude »

Sorry for the delay, but I've been getting ready for school. Still here, though.
Hakker wrote:using the windows 338 version

first of all I get the following error
"can't load image from file 'zero.xpm': file does not exist."
however I can continue with the program after I click it away so it ain't serious

Second I still see some filetypes missing
wmv, rm, rmvb, asf, mpg, ogm
especially wmv and ogm are still used on several animes
Totally correct. The icons were missing from the binary package; that's been fixed. Also, added all of the above filetypes. Thanks very much!

339 has been committed, which fixes both of these. The binary has been built and is available on locke.aweenet.net. Thank you for your time and bug report.
Locked