1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-10 04:02:17 +00:00

Missing imports

Fixes #53
This commit is contained in:
spl0k 2016-11-14 19:29:09 +01:00
parent 1de9e2bf6e
commit 02ac2df31a
3 changed files with 8 additions and 4 deletions

View File

@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os.path, uuid import os.path, uuid
from supysonic.db import Folder, Artist, Album, Track from supysonic.db import Folder, Artist, Album, Track, StarredFolder, RatingFolder
from supysonic.scanner import Scanner from supysonic.scanner import Scanner
class FolderManager: class FolderManager:

View File

@ -21,7 +21,9 @@
import string, random, hashlib import string, random, hashlib
import uuid import uuid
from supysonic.db import User from supysonic.db import User, ChatMessage, Playlist
from supysonic.db import StarredFolder, StarredArtist, StarredAlbum, StarredTrack
from supysonic.db import RatingFolder, RatingTrack
class UserManager: class UserManager:
SUCCESS = 0 SUCCESS = 0

View File

@ -26,7 +26,9 @@ from storm.expr import ComparableExpr, compile, Like
from storm.exceptions import NotSupportedError from storm.exceptions import NotSupportedError
from supysonic import config from supysonic import config
from supysonic.db import Folder, Artist, Album, Track from supysonic.db import Folder, Artist, Album, Track, User, PlaylistTrack
from supysonic.db import StarredFolder, StarredArtist, StarredAlbum, StarredTrack
from supysonic.db import RatingFolder, RatingTrack
def get_mime(ext): def get_mime(ext):
return mimetypes.guess_type('dummy.' + ext, False)[0] or config.get('mimetypes', ext) or 'application/octet-stream' return mimetypes.guess_type('dummy.' + ext, False)[0] or config.get('mimetypes', ext) or 'application/octet-stream'
@ -203,7 +205,7 @@ class Scanner:
self.__store.find(StarredTrack, StarredTrack.starred_id == tr.id).remove() self.__store.find(StarredTrack, StarredTrack.starred_id == tr.id).remove()
self.__store.find(RatingTrack, RatingTrack.rated_id == tr.id).remove() self.__store.find(RatingTrack, RatingTrack.rated_id == tr.id).remove()
self.__store.find(PlaylistTrack, PlaylistTrack.track_id == tr.id).remove() self.__store.find(PlaylistTrack, PlaylistTrack.track_id == tr.id).remove()
self.__store.find(User, User.last_play_id == tr.id).set(User.last_play_id = None) self.__store.find(User, User.last_play_id == tr.id).set(last_play_id = None)
self.__folders_to_check.add(tr.folder) self.__folders_to_check.add(tr.folder)
self.__albums_to_check.add(tr.album) self.__albums_to_check.add(tr.album)