mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 08:56:17 +00:00
parent
1de9e2bf6e
commit
02ac2df31a
@ -19,7 +19,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
||||
class FolderManager:
|
||||
|
@ -21,7 +21,9 @@
|
||||
import string, random, hashlib
|
||||
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:
|
||||
SUCCESS = 0
|
||||
|
@ -26,7 +26,9 @@ from storm.expr import ComparableExpr, compile, Like
|
||||
from storm.exceptions import NotSupportedError
|
||||
|
||||
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):
|
||||
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(RatingTrack, RatingTrack.rated_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.__albums_to_check.add(tr.album)
|
||||
|
Loading…
Reference in New Issue
Block a user