-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use external IDs from new agent if available (only for scrobbling) (#571
) * use external IDs from new agent if available (only for scrobbling for now) * create taggings DB model (prep for sync) * create tags DB model (prep for sync) * (sync support) first attempt to make DB use external IDs, fallback to guid * some fixes (still broken for sync) * Sync now working for movies (TV groundwork still pending) * Finished sync preparations (hopefully) for Native TV agent * Update README to include min reqs for native agents
- Loading branch information
Showing
11 changed files
with
189 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
Trakttv.bundle/Contents/Libraries/Shared/plex/objects/library/extra/guid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from plex.objects.core.base import Descriptor, Property | ||
|
||
|
||
class Guid(Descriptor): | ||
id = Property(type=str) | ||
|
||
@classmethod | ||
def from_node(cls, client, node): | ||
return cls.construct(client, cls.helpers.find(node, 'Guid'), child=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Trakttv.bundle/Contents/Libraries/Shared/plex_database/models/taggings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from plex_database.core import db | ||
|
||
from peewee import * | ||
from plex_database.models import MetadataItem | ||
from plex_database.models import Tags | ||
|
||
|
||
class Taggings(Model): | ||
class Meta: | ||
database = db | ||
db_table = 'taggings' | ||
|
||
metadata_item = ForeignKeyField(MetadataItem, null=True, related_name='taggings') | ||
tag = ForeignKeyField(Tags, null=True, related_name='taggings') | ||
|
13 changes: 13 additions & 0 deletions
13
Trakttv.bundle/Contents/Libraries/Shared/plex_database/models/tags.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from plex_database.core import db | ||
|
||
from peewee import * | ||
|
||
|
||
class Tags(Model): | ||
class Meta: | ||
database = db | ||
db_table = 'tags' | ||
|
||
tag = CharField(null=True) | ||
tag_type = IntegerField(null=True) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters