Skip to content

Commit

Permalink
Remove revision module as this no longer works with git.
Browse files Browse the repository at this point in the history
Fix up some issue with keywords.
  • Loading branch information
charrea6 committed Mar 26, 2012
1 parent 543a2a9 commit 2d37de1
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 89 deletions.
17 changes: 0 additions & 17 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@
# Dirk Meyer <dmeyer@tzi.de>
# $Id$

revision() {
echo -n generating revision.py
rev=$(LC_ALL=C svn info --revision=BASE | sed -n '/Revision:/s/Revision: *\([0-9]*\)/\1/p')
echo '"""' > src/revision.py
echo 'Freevo revision number' >> src/revision.py
echo '"""' >> src/revision.py
echo '' >> src/revision.py
echo "__revision__ = ${rev}" >> src/revision.py
echo " ${rev}"
}

gen_i18n() {
for file in $(find i18n -name freevo.po); do
out=$(echo $file | sed 's/\.po$/.mo/')
Expand Down Expand Up @@ -46,11 +35,7 @@ mkhtmldir() {

# main
case "$1" in
revision)
revision
;;
nodocs)
revision
gen_i18n
mkhtmldir
;;
Expand All @@ -60,13 +45,11 @@ case "$1" in
-h|--help|help)
echo -n "usage: "
echo $0
echo " revision - just generate svn revision module"
echo " nodocs - just generate translations"
echo " howto - just generate the docbook howto"
echo " <default> - generate translations and generate howto"
;;
*)
revision
gen_i18n
howto
;;
Expand Down
12 changes: 9 additions & 3 deletions freevo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,10 @@
Added SKIN_USE_PAGE_TRANSITIONS to select whether transitions between pages
of menus etc are animated.
Added SKIN_SCREEN_TRANSITION to select the style of transition.
""")

"""),
(6.0,
""" add TVMANAGER_UID and _GID.
enable tv.server.favorites plugin.""")
]


Expand Down Expand Up @@ -864,6 +866,7 @@

# TV menu plugin to view and edit favorites
plugin.activate('tv.view_favorites', level=4)
plugin.activate('tv.server.favorites')

# TV menu plugin to view scheduled recordings
plugin.activate('tv.scheduled_recordings', level=5)
Expand Down Expand Up @@ -1872,7 +1875,10 @@
# If the recordserver runs as root, set the uid to the given one
# after startup. The gui must also match one of the users group ids
RECORDSERVER_UID = 0
RECORDSERVER_UID = 0
RECORDSERVER_GID = 0

TVMANAGER_UID = 0
TVMANAGER_GID = 0

# Remove old recordings if GB free is less than specified value
RECORDSERVER_CLEANUP_THRESHOLD = 0
Expand Down
6 changes: 2 additions & 4 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@

try:
import freevo.version as version
import freevo.revision as revision
except:
import version
import revision

DINFO = 0
DWARNING = -1
Expand Down Expand Up @@ -699,13 +697,13 @@ def _debug_function_(s, level=1):
sys.stderr = Logger(logging.getLogger('stderr'), sys.stderr)
ts = time.asctime(time.localtime(time.time()))
sys.stdout.log('=' * 80)
sys.stdout.log('Freevo %s r%s started at %s' % (version.__version__, revision.__revision__, ts))
sys.stdout.log('Freevo %s started at %s' % (version.version, ts))
sys.stdout.log('-' * 80)


def shutdown():
sys.stdout.log('-' * 80)
sys.stdout.log('Freevo %s r%s finished at %s' % (version.__version__, revision.__revision__, ts))
sys.stdout.log('Freevo %s finished at %s' % (version.version, ts))
sys.stdout.log('=' * 80)
sys.stdout.close()
sys.stderr.close()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/GUIObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import logging
logger = logging.getLogger("freevo.gui.GUIObject")
__date__ = "$Date$"
__version__ = "$Revision$".split()[1]
__version__ = "$Revision$"
__author__ = "Thomas Malt <thomas@malt.no>"


Expand Down
7 changes: 0 additions & 7 deletions src/helpers/recordserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@
from event import *


try:
import freevo.version as version
import freevo.revision as revision
except:
import version
import revision

logger.info('PLUGIN_RECORD: %s', config.plugin_record)

plugin.init_special_plugin(config.plugin_record)
Expand Down
32 changes: 26 additions & 6 deletions src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ def getbyname(name, multiple_choises=0):
return []
return None

def get_loaded_plugins():
"""
return a list of all plugins that have been loaded.
"""
return [p for p in __loaded_plugins__]

def register(plugin, name, multiple_choises=0):
"""
Expand Down Expand Up @@ -493,7 +498,7 @@ def isevent(event):
__named_plugins__ = {}
__callbacks__ = {}
__plugin_basedir__ = ''

__loaded_plugins__ = []

def __add_to_ptl__(type, object):
"""
Expand Down Expand Up @@ -525,15 +530,28 @@ def __find_plugin_file__(filename):
return 'plugins.' + filename.replace('/', '.'), None

if filename.find('/') > 0:
special = filename[:filename.find('/')]
filename = os.path.join(special, 'plugins', filename[filename.find('/')+1:])
full_filename = os.path.join(__plugin_basedir__, filename)
first_slash = filename.find('/')
special = filename[:first_slash]
plugins_filename = os.path.join(special, 'plugins', filename[first_slash + 1:])
full_filename = os.path.join(__plugin_basedir__, plugins_filename)

if os.path.isfile(full_filename + '.py'):
return plugins_filename.replace('/', '.'), special

if os.path.isdir(full_filename):
return plugins_filename.replace('/', '.'), special

last_slash = filename.rfind('/')
special = filename[:last_slash]
plugins_filename = os.path.join(special, 'plugins', filename[last_slash + 1:])
full_filename = os.path.join(__plugin_basedir__, plugins_filename)

if os.path.isfile(full_filename + '.py'):
return filename.replace('/', '.'), special
return plugins_filename.replace('/', '.'), special

if os.path.isdir(full_filename):
return filename.replace('/', '.'), special
return plugins_filename.replace('/', '.'), special


return None, None

Expand Down Expand Up @@ -600,6 +618,8 @@ def __load_plugin__(name, type, level, args, number):
else:
p = name

__loaded_plugins__.append(p)

p._number = number
p._level = level

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/autostart.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class PluginInterface(plugin.DaemonPlugin):
__author_email__ = 'andudi@gmx.ch'
__maintainer__ = __author__
__maintainer_email__ = __author_email__
__version__ = '$Revision$'.split()[1]
__version__ = '$Revision$'

def __init__(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/idlebar/remindicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

__author__ = "Christian Lyra"
__version__ = "0.1"
__svnversion__ = "$Revision$"[11:-2]
__date__ = "$Date$"[7:-2]
__svnversion__ = "$Revision$"
__date__ = "$Date$"
__copyright__ = "Copyright (c) 2007 Christian Lyra"
__license__ = "GPL"

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/remind.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

__author__ = "Christian Lyra"
__version__ = "0.1"
__svnversion__ = "$Revision$".split()[1]
__date__ = "$Date$".split()[1]
__svnversion__ = "$Revision$"
__date__ = "$Date$"
__copyright__ = "Copyright (c) 2007 Christian Lyra"
__license__ = "GPL"
__doc__ = """A plugin to list reminders, but can be used to
Expand Down
4 changes: 4 additions & 0 deletions src/tv/epg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
channels_by_display_name[channel.displayname] = channel


def get_grid(start, stop, channels):
pass


def get_programs(start=0, stop=0, channel_id=None):
kwargs = { 'time': (start,stop)}

Expand Down
17 changes: 10 additions & 7 deletions src/tv/record_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ def RecordClient():
return _singleton



class RecordClientException(Exception):
""" RecordClientException """
def __init__(self):
pass


class RecordClientActions:
"""
recordserver access class using kaa.rpc
Expand Down Expand Up @@ -120,6 +113,12 @@ def findNextProgramNow(self, isrecording=False):

def getScheduledRecordingsNow(self):
""" get the scheduled recordings, returning the scheduled recordings object """
try:
return (True, self.channel.rpc("getScheduledRecordings").wait())
except kaa.rpc.NotConnectedException:
print 'Record Server down...'
return (False, self.recordserverdown)

logger.log( 9, 'getScheduledRecordingsNow()')
inprogress = self._recordserver_rpc('getScheduledRecordings')
if inprogress is None:
Expand Down Expand Up @@ -168,6 +167,8 @@ def findMatchesNow(self, title=None, movies_only=False):

def isProgScheduledNow(self, prog):
""" See if a programme is a schedule """
return self.channel.rpc("isProgScheduled", prog).wait()

logger.log( 9, 'isProgScheduledNow(prog=%r, schedule=%r)', prog)
inprogress = self._recordserver_rpc('isProgScheduled', prog)
if inprogress is None:
Expand All @@ -180,6 +181,8 @@ def isProgScheduledNow(self, prog):

def isProgAFavoriteNow(self, prog, favs=None):
""" See if a programme is a favourite """
return self.channel.sync.isProgAFavorite(prog)

logger.log( 9, 'isProgAFavoriteNow(prog=%r, favs=%r)', prog, favs)
inprogress = self._recordserver_rpc('isProgAFavorite', prog, favs)
if inprogress is None:
Expand Down
14 changes: 4 additions & 10 deletions src/util/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,9 @@
import re

try:
try:
import freevo.version as version
import freevo.revision as revision
except ImportError:
import version
import revision
import freevo.version as version
except ImportError:
print 'If your using a subversion of Freevo'
print 'You may need run "./autogen.sh nodocs"'
import version

# Get the real distutils (not the Freevo stuff)
# This is a bad hack and will be removed when the distutils.py
Expand Down Expand Up @@ -144,7 +138,7 @@ def data_finder(result, dirname, names):
replace('./src/www', 'share/freevo').\
replace('./i18n', 'share/locale').\
replace('./contrib', 'share/freevo/contrib').\
replace('./Docs', 'share/doc/freevo-%s' % version.__version__).\
replace('./Docs', 'share/doc/freevo-%s' % version.version).\
replace('./helpers', 'share/freevo/helpers'), files))
return result

Expand All @@ -160,7 +154,7 @@ def docbook_finder(result, dirname, names):

if files and dirname.find('/.svn') == -1:
result.append((dirname.replace('/html', ''). \
replace('./Docs', 'share/doc/freevo-%s' % version.__version__), files))
replace('./Docs', 'share/doc/freevo-%s' % version.version), files))
return result


Expand Down
2 changes: 1 addition & 1 deletion src/util/feedparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Recommended: CJKCodecs and iconv_codec <http://cjkpython.i18n.org/>
"""

__version__ = "4.2-pre-" + "$Revision$"[11:14] + "-svn"
__version__ = "4.2-pre-svn"
__license__ = """Copyright (c) 2002-2008, Mark Pilgrim, All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 0 additions & 2 deletions src/util/fxdimdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@

try:
import freevo.version as version
import freevo.revision as revision
except:
import version
import revision


imdb_ctitle = '/tmp/imdb-movies.list'
Expand Down
7 changes: 0 additions & 7 deletions src/util/plugindistutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,6 @@
import os
import sys

try:
import freevo.version as version
import freevo.revision as revision
except:
import version
import revision

def package_finder(result, dirname, names):
"""
os.path.walk helper for 'src'
Expand Down
18 changes: 1 addition & 17 deletions src/version.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
"""
Freevo Version number
"""
__version__ = '1.9.2-svn'
version = '1.9.2-git'

runtime = '0.3.1'
mmpython = '0.4.10'

try:
import revision
_revision = revision.__revision__
except ImportError:
try:
import src.revision as revision
_revision = revision.__revision__
except ImportError:
_revision = 'Unknown'

_version = __version__
if _version.endswith('-svn'):
version = _version.split('-svn')[0] + ' r%s' % _revision
else:
version = _version
2 changes: 1 addition & 1 deletion src/video/plugins/removecommercials.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
logger = logging.getLogger("freevo.video.plugins.removecommercials")

__author__ = 'Andrew Jeffery <short_rz at internode.on.net>'
__revision__ = '$Rev$'.split()[1]
__revision__ = '$Rev$'

import os
import plugin
Expand Down
2 changes: 1 addition & 1 deletion src/video/plugins/xine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class PluginInterface(plugin.DaemonPlugin):
__author_email__ = 'andudi@gmx.ch'
__maintainer__ = __author__
__maintainer_email__ = __author_email__
__version__ = '$Revision$'.split()[1]
__version__ = '$Revision$'

def __init__(self):
"""
Expand Down

0 comments on commit 2d37de1

Please sign in to comment.