mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Initial Commit
This commit is contained in:
commit
88daa3fb91
1311 changed files with 256240 additions and 0 deletions
17
lib/pygazelle/tag.py
Normal file
17
lib/pygazelle/tag.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
class Tag(object):
|
||||
def __init__(self, name, parent_api):
|
||||
self.name = name
|
||||
self.artist_counts = {}
|
||||
self.parent_api = parent_api
|
||||
|
||||
self.parent_api.cached_tags[self.name] = self # add self to cache of known Tag objects
|
||||
|
||||
def set_artist_count(self, artist, count):
|
||||
"""
|
||||
Adds an artist to the known list of artists tagged with this tag (if necessary), and sets the count of times
|
||||
that that artist has been known to be tagged with this tag.
|
||||
"""
|
||||
self.artist_counts[artist] = count
|
||||
|
||||
def __repr__(self):
|
||||
return "Tag: %s" % self.name
|
Loading…
Add table
Add a link
Reference in a new issue