1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 10:19:25 +02:00
Commit graph

166 commits

Author SHA1 Message Date
Paul Arthur
cf5a674965 Update the stream_playlist table to use MyISAM
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
2013-04-29 15:18:35 -04:00
Paul Arthur
b7c9678012 Switch Dba from mysql to PDO-MySQL
The mysql extension is deprecated in PHP 5.5 and will be removed in the
future.
2013-01-29 03:08:52 -05:00
Paul Arthur
0d569db17b Fix incorrect updates
Starting with a fresh 3.3.3.5 import these updates failed.  Kick them to
the curb.
2013-01-28 21:48:10 -05:00
Paul Arthur
1b4fe6a2b1 Drop unnecessary updates
We only claim to support updates from 3.3.3.5, and that tarball has
340002.
2013-01-28 21:46:00 -05:00
Paul Arthur
a80c969202 Clean up updates
Drop useless updates that created or modified tables which were later
dropped.
2013-01-28 21:46:00 -05:00
Paul Arthur
8b061518cb Make the update process potentially sane
Make sure our writes succeed before declaring the update a success and
updating the DB version.
2013-01-28 21:46:00 -05:00
Paul Arthur
a6b70f9eba Rename the 'local' auth method to 'pam'
It's what it should have been from the start.
2013-01-28 21:23:14 -05:00
Paul Arthur
ef4d366060 Cosmetics: death to tabs
The refactoring I've been doing has reminded me of my strong preference
for spaces, and I feel inclined to impose my will on the tree.
2013-01-26 03:38:46 -05:00
Paul Arthur
16c3ba34fd Cosmetics: clean up heads in lib/ 2013-01-25 18:38:22 -05:00
Paul Arthur
83dc27dcce Remove explicit collation settings from updates
Shouldn't be necessary, might be wrong, hmm.
2013-01-25 18:01:15 -05:00
Paul Arthur
e2ca05d5b4 Make playlist downloads idempotent
Should fix the VLC plugin, as well as allow direct use of an Ampache
site on Android devices.

First, split the Stream class into an instantiable class that does the
playlist wrangling and a static class that handles the streaming stuff.

How does this work? Well, stream.php does its fancy stuff like
gathering the media IDs and clearing the playlist, but instead
of generating the playlist file there we use the Stream_Playlist
class to store the list of URLs in the database, then redirect to
play/index.php to create the actual download (there are some magic
playlist types like localplay that don't need to redirect.)
The playlist will be cached as long as that stream session is active, so
it can be downloaded multiple times and by clients that don't share the
browser's cookie cache.

Clean up the playlist generation by reducing copypasta.
2013-01-15 11:30:47 -05:00
Paul Arthur
d772b031a9 Switch from print_r to json_encode in debug output 2012-11-13 18:31:33 -05:00
Paul Arthur
f65076b93d Switch from _() to T_()
Even if we move away from php-gettext in the future, it's easy to
write a quick T_() as a simple wrapper; it's not so easy to rewrite
PHP to allow redeclaration of a function.
2012-04-12 21:13:29 -04:00
Paul Arthur
f2e01ab7d5 Increase the size of the mbid column in artist
Picard is putting multiple MBIDs in the tags now that MusicBrainz' new
schema is live.  The easiest way to deal with this is to store all of
them as an aggregate value and match against that.
2012-03-31 22:29:09 -04:00
Paul Arthur
ca60de30bc Add CLI tool for running database updates 2012-03-06 16:42:04 -05:00
Paul Arthur
e9e350b71e Lengthen varchar for tmp_playlist.session
Sessions can be longer than 32 characters.  Bump to 64.
2012-02-21 00:08:20 -05:00
Karl Vollmer
d7c6598528 Fix DB updates so catalog remote_username and remote_password are added correctly, also fix catalog creation so they are stored in the database 2011-11-23 10:45:43 -04:00
Paul Arthur
383c21ffa9 Use Dba::fetch_assoc instead of mysql_fetch_assoc 2011-06-24 11:55:37 -04:00
Paul Arthur
998f74ac71 Make require_session work with local auth. 2011-05-31 23:08:06 -04:00
Paul Arthur
4aa256cb07 Clean up some PHPDoc crap
Remove misleading, unvetted, or in some cases just plain wrong data.
Packages and categories weren't being used correctly.  They still
aren't.
2011-04-04 17:37:10 -04:00
Paul Arthur
a9da6a6fa2 Reworked search
Still has tentacles and should have been integrated into the existing
API/Browse implementation better, but it's functional.
2011-04-02 00:48:58 -04:00
momo-i
f99643663c header comment modified for phpdoc 2011-02-03 09:43:46 +09:00
momo-i
d703009677 header comment for phpdoc 2011-02-03 07:30:23 +09:00
momo-i
add54bc230 test header for phpdoc. now using only classes and libraries. 2011-02-02 16:48:45 +09:00
Paul 'flowerysong' Arthur
7b804afb55 Fix installation (base.js requires prototype). Also squelch a warning in update. 2010-06-29 04:18:47 +00:00
Paul 'flowerysong' Arthur
4b5756ba9d Miscellaneous cleanup. 2010-06-13 08:11:09 +00:00
Paul 'flowerysong' Arthur
7f36693353 Change Browse from static to instantiable. Among other things, fixes FS#13;
probably also breaks things.  Most things appear to still work, but I may have
missed some cases.
2010-06-10 05:33:57 +00:00
Paul 'flowerysong' Arthur
b9937cd7ce Clean up the rating code by moving uniqueness constraints into the database,
using SQL's AVG() when we want an average, updating the cache when a rating
changes, etc.
2010-06-07 00:49:47 +00:00
Paul 'flowerysong' Arthur
cceb1a4a9b Minor output change. FS#96, reported by Nate Gotz. 2010-05-29 16:59:55 +00:00
Paul 'flowerysong' Arthur
20d7fa5b08 Testing is all well and good...but uncomment things before you commit them. 2010-05-06 05:29:09 +00:00
Paul 'flowerysong' Arthur
b60419df85 You know, maybe I shouldn't be allowed to use computers. Revert accidentally
committed hunk.
2010-05-05 01:53:30 +00:00
Paul 'flowerysong' Arthur
e3e4c72466 Art work. Rationalise DB schema, support multiple thumbnail sizes and
caching thereof, call Catalog->gather_art instead of Catalog->gather_album_art,
unbreak (hopefully) gather_musicbrainz.
2010-05-05 01:43:51 +00:00
Paul 'flowerysong' Arthur
1cb0983ed0 Cosmetics: remove trailing whitespace 2010-03-14 20:14:52 +00:00
Paul 'flowerysong' Arthur
d78c207f76 Cosmetics: use tabs for indentation, tweak some indentation/coding style. 2010-03-14 06:10:27 +00:00
Karl 'vollmerk' Vollmer
45f382b06d Add vim modelines to all php files (Thx ascheel) 2010-03-14 04:53:15 +00:00
Karl 'vollmerk' Vollmer
2f9017e925 Typo - will require another db update eventually... sigh 2010-02-17 04:39:26 +00:00
Karl 'vollmerk' Vollmer
45bf0c4e0c Fix typos, and tweak insert_now_playing preping for Video now playing 2010-02-14 01:33:15 +00:00
Karl 'vollmerk' Vollmer
8bc17dd3f0 Tweaked how features / bandwidth level is checked, not happy with it. 2010-02-14 00:56:07 +00:00
martian
b3195a7271 moved database alterations to proper place 2010-02-11 19:26:33 +00:00
martian
1b35c20dd0 Adding the bandwidth option to the preferences. This changes the complexity of the UI and toggles album art. 2010-02-09 17:44:44 +00:00
Karl 'vollmerk' Vollmer
68aca76231 Add AmpacheAPI external, start work on future db changes 2010-02-04 23:56:18 +00:00
dipsol
a7838e2a13 Replaced almost every dba::query to dba::read or dba::write. 2009-12-14 08:06:20 +00:00
Karl 'vollmerk' Vollmer
9b3232ba29 whole bunch more Dba::query replacements 2009-12-14 05:21:36 +00:00
Karl 'vollmerk' Vollmer
94f5610ef6 add MBID support Thx flowerysong 2009-06-02 01:42:55 +00:00
Karl 'vollmerk' Vollmer
d84e62dba7 api fixes, added librefm scrobbler (untested) and fixed minor error in header file with rtl vs ltr languages also removed dead RioPlayer plugin 2009-05-18 17:34:22 +00:00
Karl 'vollmerk' Vollmer
809a3fc72f add download for video that does not work, and most likely break song downloads \o/ 2009-05-15 13:26:30 +00:00
Karl 'vollmerk' Vollmer
d3adf73c82 reset database charset on db update to make sure it remains in sync 2009-03-22 14:15:21 +00:00
Karl 'vollmerk' Vollmer
6ff9ca0a9e move server prefs to admin menu (Thx geekdawg) fix missing web_path on radio creation link 2009-03-18 21:14:21 +00:00
Karl 'vollmerk' Vollmer
fdb7c58cb1 fix typo causing height to not display on art retrival, update to db allowing gc of tmp_browse, add extension to api album art image urls 2009-03-15 16:16:04 +00:00
Karl 'vollmerk' Vollmer
b92109a64f put supplemental object support back into the browse object for now, replace later 2009-03-13 03:15:09 +00:00