Skip to content

Commit

Permalink
Merge branch 'master' into devel/ceton
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed May 4, 2012
2 parents 337743c + 406dcfa commit fbea038
Show file tree
Hide file tree
Showing 94 changed files with 4,584 additions and 2,025 deletions.
60 changes: 30 additions & 30 deletions mythplugins/mythmusic/mythmusic/visualize.cpp
Expand Up @@ -168,11 +168,11 @@ bool StereoScope::process( VisualNode *node )
bool allZero = true;


if (node)
if (node)
{
double index = 0;
double const step = (double)SAMPLES_DEFAULT_SIZE / size.width();
for ( int i = 0; i < size.width(); i++)
for ( int i = 0; i < size.width(); i++)
{
unsigned long indexTo = (unsigned long)(index + step);
if (indexTo == (unsigned long)(index))
Expand All @@ -194,21 +194,21 @@ bool StereoScope::process( VisualNode *node )
if ( valL < 0. )
valL = 0.;
}
if (valR < 0.)
if (valR < 0.)
{
valR += falloff;
if ( valR > 0. )
valR = 0.;
}
else
}
else
{
valR -= falloff;
if ( valR < 0. )
valR = 0.;
}
}
#endif
for (unsigned long s = (unsigned long)index; s < indexTo && s < node->length; s++)
for (unsigned long s = (unsigned long)index; s < indexTo && s < node->length; s++)
{
double tmpL = ( ( node->left ?
double( node->left[s] ) : 0.) *
Expand All @@ -235,10 +235,10 @@ bool StereoScope::process( VisualNode *node )
index = index + step;
}
#if RUBBERBAND
}
else if (rubberband)
}
else if (rubberband)
{
for ( int i = 0; i < size.width(); i++)
for ( int i = 0; i < size.width(); i++)
{
double valL = magnitudes[ i ];
if (valL < 0) {
Expand Down Expand Up @@ -271,8 +271,8 @@ bool StereoScope::process( VisualNode *node )
magnitudes[ i + size.width() ] = valR;
}
#endif
}
else
}
else
{
for ( int i = 0; (unsigned) i < magnitudes.size(); i++ )
magnitudes[ i ] = 0.;
Expand All @@ -284,7 +284,7 @@ bool StereoScope::process( VisualNode *node )
bool StereoScope::draw( QPainter *p, const QColor &back )
{
p->fillRect(0, 0, size.width(), size.height(), back);
for ( int i = 1; i < size.width(); i++ )
for ( int i = 1; i < size.width(); i++ )
{
#if TWOCOLOUR
double r, g, b, per;
Expand Down Expand Up @@ -611,7 +611,7 @@ Spectrum::Spectrum()
rplan = fftw_plan_dft_r2c_1d(FFTW_N, rin, (myth_fftw_complex_cast*)rout, FFTW_MEASURE);

startColor = QColor(0,0,255);
targetColor = QColor(255,0,0);
targetColor = QColor(255,0,0);
}

Spectrum::~Spectrum()
Expand Down Expand Up @@ -679,7 +679,7 @@ bool Spectrum::process(VisualNode *node)
double *magnitudesp = magnitudes.data();
double magL, magR, tmp;

if (node)
if (node)
{
i = node->length;
if (i > FFTW_N)
Expand All @@ -700,9 +700,9 @@ bool Spectrum::process(VisualNode *node)

for (i = 0; (int)i < rects.size(); i++, w += analyzerBarWidth)
{
magL = (log(sq(real(lout[index])) + sq(real(lout[FFTW_N - index]))) - 22.0) *
magL = (log(sq(real(lout[index])) + sq(real(lout[FFTW_N - index]))) - 22.0) *
scaleFactor;
magR = (log(sq(real(rout[index])) + sq(real(rout[FFTW_N - index]))) - 22.0) *
magR = (log(sq(real(rout[index])) + sq(real(rout[FFTW_N - index]))) - 22.0) *
scaleFactor;

if (magL > size.height() / 2)
Expand Down Expand Up @@ -784,11 +784,11 @@ bool Spectrum::draw(QPainter *p, const QColor &back)

per = clamp(per, 1.0, 0.0);

r = startColor.red() +
r = startColor.red() +
(targetColor.red() - startColor.red()) * (per * per);
g = startColor.green() +
g = startColor.green() +
(targetColor.green() - startColor.green()) * (per * per);
b = startColor.blue() +
b = startColor.blue() +
(targetColor.blue() - startColor.blue()) * (per * per);

r = clamp(r, 255.0, 0.0);
Expand Down Expand Up @@ -848,14 +848,14 @@ void Squares::resize (const QSize &newsize) {
size = newsize;
}

void Squares::drawRect(QPainter *p, QRect *rect, int i, int c, int w, int h)
void Squares::drawRect(QPainter *p, QRect *rect, int i, int c, int w, int h)
{
double r, g, b, per;
int correction = (size.width() % rects.size ()) / 2;
int x = ((i / 2) * w) + correction;
int y;

if (i % 2 == 0)
if (i % 2 == 0)
{
y = c - h;
per = double(fake_height - rect->top()) / double(fake_height);
Expand All @@ -866,15 +866,15 @@ void Squares::drawRect(QPainter *p, QRect *rect, int i, int c, int w, int h)
per = double(rect->bottom()) / double(fake_height);
}

per = clamp(per, 1.0, 0.0);
r = startColor.red() +
per = clamp(per, 1.0, 0.0);

r = startColor.red() +
(targetColor.red() - startColor.red()) * (per * per);
g = startColor.green() +
g = startColor.green() +
(targetColor.green() - startColor.green()) * (per * per);
b = startColor.blue() +
b = startColor.blue() +
(targetColor.blue() - startColor.blue()) * (per * per);

r = clamp(r, 255.0, 0.0);
g = clamp(g, 255.0, 0.0);
b = clamp(b, 255.0, 0.0);
Expand Down Expand Up @@ -1496,7 +1496,7 @@ void AlbumArt::handleKeyPress(const QString &action)
/// this is the time an image is shown in the albumart visualizer
#define ALBUMARTCYCLETIME 10

bool AlbumArt::needsUpdate()
bool AlbumArt::needsUpdate()
{
// if the track has changed we need to update the image
if (gPlayer->getCurrentMetadata() && m_currentMetadata != gPlayer->getCurrentMetadata())
Expand Down Expand Up @@ -1536,7 +1536,7 @@ bool AlbumArt::draw(QPainter *p, const QColor &back)
}
}

if (m_image.isNull())
if (m_image.isNull())
{
drawWarning(p, back, m_size, QObject::tr("?"), 100);
return true;
Expand Down Expand Up @@ -1581,7 +1581,7 @@ static class AlbumArtFactory : public VisFactory
Blank::Blank()
: VisualBase(true)
{
m_fps = 20;
m_fps = 1;
}

Blank::~Blank()
Expand Down
8 changes: 4 additions & 4 deletions mythtv/bindings/perl/MythTV.pm
Expand Up @@ -8,7 +8,7 @@
#

# Version
$VERSION = '.25svn';
$VERSION = '.26git';

# Load sub libraries
use IO::Socket::INET::MythTV;
Expand Down Expand Up @@ -106,15 +106,15 @@ package MythTV;
# Note: as of July 21, 2010, this is actually a string, to account for proto
# versions of the form "58a". This will get used if protocol versions are
# changed on a fixes branch ongoing.
our $PROTO_VERSION = "73";
our $PROTO_TOKEN = "D7FE8D6F";
our $PROTO_VERSION = "74";
our $PROTO_TOKEN = "SingingPotato";

# currentDatabaseVersion is defined in libmythtv in
# mythtv/libs/libmythtv/dbcheck.cpp and should be the current MythTV core
# schema version supported in the main code. We need to check that the schema
# version in the database is as expected by the bindings, which are expected
# to be kept in sync with the main code.
our $SCHEMA_VERSION = "1301";
our $SCHEMA_VERSION = "1302";

# NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
# the number of items in a ProgramInfo QStringList group used by
Expand Down
4 changes: 2 additions & 2 deletions mythtv/bindings/php/MythBackend.php
Expand Up @@ -11,8 +11,8 @@ class MythBackend {

// MYTH_PROTO_VERSION is defined in libmyth in mythtv/libs/libmyth/mythcontext.h
// and should be the current MythTV protocol version.
static $protocol_version = '73';
static $protocol_token = 'D7FE8D6F';
static $protocol_version = '74';
static $protocol_token = 'SingingPotato';

// The character string used by the backend to separate records
static $backend_separator = '[]:[]';
Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/MythTV/mythproto.py
Expand Up @@ -794,7 +794,7 @@ class FreeSpace( DictData ):
_field_order = [ 'host', 'path', 'islocal',
'disknumber', 'sgroupid', 'blocksize',
'totalspace', 'usedspace']
_field_type = [3, 3, 2, 0, 0, 0, 0, 0, 0, 0]
_field_type = [3, 3, 2, 0, 0, 0, 0, 0]
def __str__(self):
return "<FreeSpace '%s@%s' at %s>"\
% (self.path, self.host, hex(id(self)))
Expand Down
6 changes: 3 additions & 3 deletions mythtv/bindings/python/MythTV/static.py
Expand Up @@ -5,11 +5,11 @@
"""

OWN_VERSION = (0,26,-1,0)
SCHEMA_VERSION = 1301
SCHEMA_VERSION = 1302
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
PROTO_VERSION = '73'
PROTO_TOKEN = 'D7FE8D6F'
PROTO_VERSION = '74'
PROTO_TOKEN = 'SingingPotato'
BACKEND_SEP = '[]:[]'
INSTALL_PREFIX = '/usr/local'

Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/setup.py
Expand Up @@ -78,7 +78,7 @@ def run(self):

setup(
name='MythTV',
version='0.24.0',
version='0.25.0',
description='MythTV Python bindings.',
long_description='Provides canned database and protocol access to the MythTV database, mythproto, mythxml, and frontend remote control.',
packages=['MythTV', 'MythTV/tmdb', 'MythTV/tmdb3', 'MythTV/ttvdb', 'MythTV/wikiscripts'],
Expand Down
25 changes: 18 additions & 7 deletions mythtv/bindings/python/tmdb3/README
Expand Up @@ -106,18 +106,20 @@ out. The people search method behaves similarly.

## Direct Queries

There are currently three data types that support direct access: collections,
movies, and people. These each take a single integer ID as an argument. All
data attributes are implemented as properties, and populated on-demand as
used, rather than when the object is created.
There are currently four data types that support direct access: collections,
movies, people, and studios. These each take a single integer ID as an
argument. All data attributes are implemented as properties, and populated
on-demand as used, rather than when the object is created.

>>> from tmdb3 import Collection, Movie, Person
>>> from tmdb3 import Collection, Movie, Person, Studio
>>> Collection(10)
<Collection 'Star Wars Collection'>
>>> Movie(11)
<Movie 'Star Wars: Episode IV - A New Hope' (1977)>
>>> Person(2)
<Person 'Mark Hamill'>
>>> Studio(1)
<Studio 'Lucasfilm'>

## Image Behavior

Expand Down Expand Up @@ -168,7 +170,7 @@ trailers offer multiple sizes.

## List of Available Data

type name
type name

Collection:
integer id
Expand Down Expand Up @@ -208,6 +210,7 @@ Movie:
list(Keyword) keywords
dict(Release) releases (indexed by country)
list(Translation) translations
list(Movie) getSimilar()

Movie classmethods
Movie fromIMDB(imdbid) special constructor for use with IMDb codes
Expand All @@ -223,7 +226,9 @@ Person:
datetime dayofbirth
datetime dayofdeath
string homepage
Profile profilie
Profile profile
boolean adult
list(string) aliases
list(ReverseCast) roles
list(ReverseCrew) crew
list(Profile) profiles
Expand Down Expand Up @@ -255,6 +260,7 @@ Image:
Backdrop (derived from Image)
Poster (derived from Image)
Profile (derived from Image)
Logo (derived from Image)

AlternateTitle:
string country
Expand All @@ -277,6 +283,11 @@ Genre:
Studio:
integer id
string name
string description
string headquarters
Logo logo
Studio parent
list(Movie) movies

Country:
string code
Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/tmdb3/setup.py
Expand Up @@ -4,7 +4,7 @@

setup(
name='tmdb3',
version='0.3.4',
version='0.6.2',
description='TheMovieDB.org APIv3 interface',
long_description="Object-oriented interface to TheMovieDB.org's v3 API.",
packages=['tmdb3']
Expand Down
3 changes: 2 additions & 1 deletion mythtv/bindings/python/tmdb3/tmdb3/__init__.py
Expand Up @@ -4,6 +4,7 @@
Movie, Collection, __version__
from request import set_key, set_cache
from locales import get_locale, set_locale
from cache import CacheEngine
from tmdb_auth import get_session, set_session
from cache_engine import CacheEngine
from tmdb_exceptions import *

0 comments on commit fbea038

Please sign in to comment.