summaryrefslogtreecommitdiffstats
path: root/lib/class
Commit message (Collapse)AuthorAgeFilesLines
* Add naive compaction for Query serializationapiPaul Arthur2013-06-121-2/+55
| | | | | | | | | | | | | | | | | | | | | Can be very efficient with the right input, but probably has degenerative cases where it increases the size. Worst-case size increase is one character per ID in the result set, so it shouldn't be an issue. String lengths for a large search result that was unstorable before: serialize: 1991874 json_encode: 756249 cooked: 244 And some with more discontinuity: serialize: 1772238 json_encode: 674751 cooked: 37950 serialize: 164942 json_encode: 65771 cooked: 25369
* Abstract serialization within QueryPaul Arthur2013-06-121-2/+10
|
* Parameterise queries in QueryPaul Arthur2013-06-121-28/+28
|
* Don't cache browses for the APIPaul Arthur2013-06-122-18/+27
| | | | | The API will never request it again, so caching the query just wastes space.
* Set Encoding parameter in ASX filesthinca2013-06-041-0/+1
| | | | http://msdn.microsoft.com/library/windows/desktop/dd563989%28v=vs.85%29.aspx
* Cosmetic cleanup of the ASX outputPaul Arthur2013-06-041-3/+3
|
* Scrub output fields in ASX playlistsPaul Arthur2013-06-041-4/+5
| | | | Closes GH #35
* Drop validateEmailPaul Arthur2013-05-301-0/+9
| | | | | PHPMailer will validate the format of the address, and that's all we really want.
* Clean up Core::autoload()Paul Arthur2013-05-301-11/+11
|
* Add and use Core::is_readable()Paul Arthur2013-05-302-23/+45
| | | | | | | | 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.
* Work on remote cleanPaul Arthur2013-05-301-28/+54
|
* Rating::build_cache: cache the correct valuethinca2013-05-301-2/+2
| | | | | The structure of the temporary $ratings array changed a while ago, but we were still trying to pull the global rating from the old structure.
* Use the correct operator for 'before date' rulesthinca2013-05-301-1/+1
|
* Register session_write_close shutdown functionPaul Arthur2013-05-301-0/+4
| | | | | | | | | | | | | | | | 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.
* Change Dba::error() and audit its callersPaul Arthur2013-05-272-6/+8
| | | | | Will hopefully return more useful information during installation, which is the only place it's actually used and useful.
* Dba: Add support for MySQL socketsrandomessence2013-05-271-1/+6
|
* Unify debugging output to a single filePaul Arthur2013-05-272-26/+26
| | | | | | Splitting some things off to ampache-catalog doesn't really make sense to me and makes it harder to see the entire process during catalog operations.
* Clean up Song->_get_info() and constructorPaul Arthur2013-05-131-21/+21
| | | | Return false and unset the id if the song isn't in the database.
* Fix Rating::gc()Paul Arthur2013-05-131-1/+1
| | | | | | The join was incorrect, sometimes resulting in loss of ratings. Fixes GH #22
* Make Catalog::count_songs use the correct variablePaul Arthur2013-05-131-1/+1
| | | | Fixes GH#23
* Add support for nonstandard MySQL portsPaul Arthur2013-05-131-1/+8
|
* Stream::start_transcode: Fix typo in queryToilal2013-05-061-1/+1
|
* Update the stream_playlist table to use MyISAMPaul Arthur2013-04-291-1/+14
| | | | | | | | | | | | 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
* Correct debug output for Stream_Playlist addsPaul Arthur2013-04-291-1/+1
|
* Clean up Random::play_url()Paul Arthur2013-04-231-3/+3
| | | | | | | | | 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
* Fix Stream_URL::parse()Paul Arthur2013-04-131-1/+1
| | | | Also fixes democratic voting.
* Fix democratic playlist displayPaul Arthur2013-04-131-2/+4
|
* Fix song downloadsPaul Arthur2013-04-111-0/+1
| | | | | 'download' wasn't in the list of allowed types for Stream_Playlist, so download attempts were processed as M3U playlists.
* GH#4: Tagging artist incorrectlyPaul Arthur2013-04-021-6/+9
| | | | | We should only look up by MBID if we actually have an MBID. Might fix this issue.
* Drop nonworking Dba::check_database_exists()Paul Arthur2013-03-291-8/+0
| | | | It didn't work.
* Fix infinite loop in DbaPaul Arthur2013-03-291-1/+1
| | | | Strong and stupid indeed.
* Fix User::count()Paul Arthur2013-03-281-2/+3
|
* Fix Rating::gc()Paul Arthur2013-03-281-1/+1
|
* Don't store plaintext passwordsPaul Arthur2013-03-281-1/+1
| | | | http://dbareactions.tumblr.com/post/41455377237/when-i-see-app-passwords-stored-in-clear-text-in
* Try to fix remote streamingPaul Arthur2013-03-281-5/+5
|
* Make remote catalogs actually workPaul Arthur2013-03-285-731/+572
|
* Try to be more robust in DbaPaul Arthur2013-03-281-0/+12
|
* Remove sole use of Dba::seekPaul Arthur2013-02-111-1/+1
| | | | | Can't be cleanly supported by PDO, so it was removed from Dba's interface. This change was supposed to be done then, but was missed.
* Dba: return false on errorsPaul Arthur2013-02-111-0/+1
| | | | I'm pretty sure this is the correct thing to do.
* Fix setting ACLsPaul Arthur2013-02-111-3/+3
| | | | _verify_range should be static.
* Fix xml.server.php after changes to sessionPaul Arthur2013-02-111-1/+1
| | | | | It was calling the wrong method in Session, which is entirely my fault. Also, the correct method was broken. Gah.
* FS#272 - Adding songs to democratic playlistPaul Arthur2013-02-071-1/+4
| | | | This is more likely to fix democratic handling. Untested.
* Scrub user data in User->update()Paul Arthur2013-02-071-10/+13
| | | | Fixes another persistent XSS vulnerability.
* Fix scrub_in to be saferPaul Arthur2013-02-071-1/+2
|
* FS#272 - Adding songs to democratic playlistPaul Arthur2013-02-072-6/+8
| | | | This might fix democratic handling. Untested.
* Some cleanup of play URL handlingPaul Arthur2013-02-076-42/+43
| | | | | | 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.
* Drop Dba::escape in vainfoPaul Arthur2013-02-051-3/+3
|
* Clean up vainfo somewhatPaul Arthur2013-02-051-528/+233
| | | | | | | | | | | | | | 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.
* Add fallback title to filename metadata sourcePaul Arthur2013-02-051-2/+2
| | | | If we didn't parse anything out, set it to the filename.
* Parameterise query in ApiPaul Arthur2013-02-041-8/+6
|