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

1583 commits

Author SHA1 Message Date
Paul Arthur
984c738187 Mess around with rating search
Simplify the rating search and drop the ugly subquery; make it a
straight query against the current user's ratings.
2013-01-23 13:06:35 -05:00
Paul Arthur
fd214fdcb7 Mess around with ratings
Drop the public variables from the rating class; everyone should use the
getters.

Add the ability for themes and applications to distinguish between
a user's actual rating and the global average rating; in the web
interface the average shows up if a user hasn't rated something but at
least one other user has.
2013-01-23 13:03:14 -05:00
Paul Arthur
af6fdbb67e Change the gc on stream sessions
It's a little suspect to automatically delete them just because another
was used. Waiting for them to expire will get rid of them plenty quick,
with less chance for weird issues.
2013-01-15 23:15:49 -05:00
Paul Arthur
246e9094d1 Fix regression in generation of xspf playlists
When it's a video, add some special sauce.
2013-01-15 15:56:54 -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
4be88447e8 Break Localplay->add(), it's been replaced 2013-01-15 01:26:38 -05:00
Paul Arthur
4818baade2 Rename localplay.abstract.php
The actual class name is localplay_controller, the filename should
reflect that.
2013-01-15 01:26:38 -05:00
Paul Arthur
7cd9fd9e08 localplay: make add_url actually do something 2013-01-15 01:26:38 -05:00
Paul Arthur
a1594882c7 Add Stream_URL class for passing them around 2013-01-15 01:26:38 -05:00
Paul Arthur
4afe4b507b Cosmetics: correct outdated tmpPlaylist comment 2013-01-15 01:26:37 -05:00
Paul Arthur
663798897f Cosmetics: remove unused variables in Stream 2013-01-14 13:57:20 -05:00
Paul Arthur
b423def173 Add a convenience function to generate an AJAX url 2012-12-19 12:54:58 -05:00
Paul Arthur
0982bc392e Use Ajax::action to generate the browse AJAX. 2012-12-19 12:44:20 -05:00
Paul Arthur
4e247196ff Rip out ugly lyrics code 2012-11-13 18:51:11 -05:00
Paul Arthur
75b6969ae1 Cosmetics: fix typo 2012-11-13 18:44:46 -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
649298b241 Clean up remaining direct calls to mysql functions
This makes it theoretically possible to replace Dba with a different
implementation somewhat painlessly.
2012-11-08 14:31:53 -05:00
Paul Arthur
c51ddbd3d6 Clean up check_database, more direct mysql calls 2012-11-08 14:02:28 -05:00
Paul Arthur
54f9633498 Cosmetics: clean up spaces 2012-11-08 13:23:27 -05:00
Paul Arthur
93251b3c8d Move check_database_inserted into the Dba class 2012-11-08 13:22:56 -05:00
Paul Arthur
d2eaf10b07 Move check_database into the Dba class 2012-11-08 13:15:19 -05:00
Paul Arthur
bea34c4261 Fix spurious errors from Catalog::create()
is_readable is flaky under Windows, opendir should be more accurate.
2012-10-18 18:16:30 -04:00
Paul Arthur
8821554dda Mainly cosmetic cleanup of the catalog update complete message 2012-10-16 20:35:40 -04:00
Paul Arthur
bc90c0128c Start cleaning up the democratic thing.
Whoever wrote the old implementation of get_items suffered from intense fear
and hatred of SQL.
2012-10-15 13:20:28 -04:00
Paul Arthur
8c4921f5f3 Consistently use 'object_type' in playlist returns 2012-10-15 13:20:27 -04:00
Paul Arthur
866e7f4a1c Add Search->get_random_items 2012-10-01 12:44:36 -04:00
Paul Arthur
cd98c2ed6d Fix inaccurate comment. 2012-10-01 12:21:09 -04:00
Paul Arthur
92e29041a4 Drop support for old passwords 2012-09-21 14:28:53 -04:00
Paul Arthur
a24b711143 Some cleanup of the playlist import code
Global variables are ugly and unnecessary.
2012-09-21 10:52:47 -04:00
Florent Fourcot
c9dab7bf4e FS#262 - M3U import should be ordered 2012-09-21 10:11:23 -04:00
Paul Arthur
2f8656a20c FS#202 - Stats not registered on some songs
Removed check from User->update_stats. It looks iffy, is reported to be
broken, and everything that calls it has an independent check.
2012-09-20 12:13:51 -04:00
Paul Arthur
bd7bf80aae FS#249 - SQL error for iAmpache client
Add a sanity check before we attempt to execute the SQL statement
2012-09-20 11:22:48 -04:00
Paul Arthur
afd69ce334 Cosmetics: api::url_to_song 2012-09-20 11:22:48 -04:00
Paul Arthur
bba378c39b Cosmetics: xmlData::songs 2012-09-20 11:22:48 -04:00
Paul Arthur
de300b2c16 Cosmetics: Song::build_cache 2012-09-20 11:22:42 -04:00
Paul Arthur
0086e772db FS#260 - Multiple rules result in "Not Enough Data"
This should be a more complete fix, and possibly a somewhat more
efficient approach.
2012-09-19 17:05:07 -04:00
Paul Arthur
256a312af3 FS#260 - Multiple rules result in "Not Enough Data"
This quick fix probably won't interact properly with smart playlists,
and it doesn't seem like a very efficient approach. But it's less
broken.
2012-09-17 10:43:39 -04:00
Paul Arthur
e9d8c44f64 FS#257 - Social comments function not working.
make_bool is definitely the wrong way to handle the parameter.  This
(untested) change might fix the bug.
2012-09-17 10:41:13 -04:00
Paul Arthur
25b77a6c75 Partial fix for ASF tags
Actually transfer all ASF tags into the asf tag array.  I suspect that
some things like 'genre' may actually be multivalued, but I don't have
any samples to back that up.
2012-09-06 12:56:20 -04:00
Paul Arthur
33d07e8910 Make a debug message less alarming
It's expected that reading from sessions will fail after expiry or
before login.  Remove the word 'error' from the logged message and bump
it down a few levels.
2012-07-24 16:46:21 -04:00
Paul Arthur
408e71344a escapeshellarg's behaviour is locale-dependent
Reimplement it locally so it isn't.  Might fix FS#252.
2012-05-25 16:52:57 -04:00
Paul Arthur
5f2f81fa8f Use spl_autoload_register instead of __autoload
Might be useful in the future, __autoload is discouraged according to
the PHP documentation.
2012-04-18 00:54:54 -04:00
Paul Arthur
8a93c849e2 FS#226 - does not catch MySQL errors before passing to num_rows()
Clean up Dba::num_rows (based on a patch by Natureshadow)

We could check before every call instead, but screw that.
2012-04-15 23:32:03 -04:00
Paul Arthur
4aa37feccc Fix disk number parsing for ID3v2
According to the changelog, getID3 1.7.9 standardised on part_of_a_set
as the key for this info (pulled from TPOS or TPA, depending on the
minor version of ID3v2); we were looking for 'pos', which is wrong.
2012-04-15 03:02:29 -04:00
Paul Arthur
512f77a70c Support setting a custom format for the rss feed 2012-04-13 17:59:16 -04:00
Paul Arthur
8af2544b27 Refactor getting MBIDs from ID3 tags
Just grab the info from the TXXX bit, instead of relying on a
correlation between the raw tags and the cooked ones.
2012-04-12 21:56:27 -04:00
Paul Arthur
ecdb8bc02d Add support for pulling ratings from id3 tags
Not used by anything yet, but it might work.
2012-04-12 21:42:44 -04:00
Paul Arthur
774e53db7d Switch from ngettext() to T_ngettext() 2012-04-12 21:13:29 -04: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
1c2de30150 Add support for parsing MBIDs in M4A files 2012-04-11 19:13:32 -04:00