made a unique toucher file

This commit is contained in:
Rudi Grinberg 2012-11-21 17:22:32 -05:00
parent 8aa11f7e8c
commit 0e91188939
2 changed files with 15 additions and 7 deletions

View file

@ -1,5 +1,5 @@
import os
from os.path import join
from os.path import join, basename, dirname
from media.monitor.exceptions import NoConfigFile
from media.monitor.pure import LazyProperty
@ -39,6 +39,14 @@ class AirtimeInstance(object):
if isinstance(sig, SignalString): return sig
else: return SignalString("%s_%s" % (self.name, sig))
def touch_file_path(self):
""" Get the path of the touch file for every instance """
touch_base_path = self.mm_config['index-path']
touch_base_name = basename(touch_base_path)
new_base_name = self.name + touch_base_name
return join(dirname(touch_base_path), new_base_name)
def __str__(self):
return "%s,%s(%s)" % (self.name, self.root_path, self.config_paths)