bea34c42 fixed one use of is_readable, but Windows users encountering
this issue would still be affected in other cases. This commit fixes
all of the important is_readable calls within Ampache; I'm not going
to hack this into external modules, so if they're broken people will
have to live with it.
http://php.net/manual/en/function.session-set-save-handler.php:
When using objects as session save handlers, it is important
to register the shutdown function with PHP to avoid unexpected
side-effects from the way PHP internally destroys objects on
shutdown and may prevent the write and close from being called.
Typically you should register 'session_write_close' using the
register_shutdown_function() function.
We're not using objects as session save handlers, but some people
(notably, Synology users) seem to be encountering a similar issue
related to the timing of object destruction. Closing the session
earlier in the shutdown process is a perfectly sane thing to do, so
let's do it.
InnoDB's performance is unacceptable out of the box, and there's no
clean way to batch these insertions into transactions, and stuff.
Benchmarks for 1000 inserts:
InnoDB: 54.826
MyISAM: 0.091
InnoDB transaction: 0.159
Fixes GH #14
Include the correct type parameter in the URL and rename the random
type parameter to random_type.
Remove unused parameters from the function call.
Should fix issue #11
Move parsing from Song into Stream_URL and make it parse more things.
Add the type parameter to all generated URLs instead of adding video to
Video URLs.
Handling of unknown tags was wrong (we should just pass them through and
hope for the best, not do some weird-ass id3v2 thing). Add matroska to
the list of known tags. Switch the video types to a generic cleanup
function and move the several-times-duplicated general information
gathering into the general information gathering function where it
belongs. Treat the general information as another tag type instead of
special-casing it as a complete override through array_merge. Drop the
useless iconv stuff (getID3 already translates tags to our requested
charset). Rename some functions to more closely match their purpose.
Fix some private functions that were marked public. Fix encoding
detection, which has been completely broken for a while.
The table definition changed slightly and the old workaround didn't
work. If auth is disabled, we really don't care that much, so just drop
the attempt to constrain type in that case.