[audio] move specific audio filters from weboob/capabilities/audio.py to weboob/tools/capabilities/audio/audio.py
This commit is contained in:
parent
19a785a643
commit
4f93b7b83e
4 changed files with 46 additions and 26 deletions
|
|
@ -21,7 +21,8 @@ from weboob.browser.elements import ItemElement, DictElement, ListElement, metho
|
|||
from weboob.browser.pages import HTMLPage, JsonPage, XMLPage
|
||||
from weboob.browser.filters.json import Dict
|
||||
from weboob.browser.filters.standard import Format, CleanText, Join, Env, Regexp, Duration
|
||||
from weboob.capabilities.audio import BaseAudio, BaseAudioIdFilter
|
||||
from weboob.capabilities.audio import BaseAudio
|
||||
from weboob.tools.capabilities.audio.audio import BaseAudioIdFilter
|
||||
from weboob.capabilities.image import BaseImage
|
||||
from weboob.capabilities.collection import Collection
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import re
|
|||
|
||||
from datetime import timedelta
|
||||
|
||||
from weboob.browser.filters.standard import Format
|
||||
from .image import BaseImage
|
||||
from .base import Field, StringField, IntField, BaseObject
|
||||
from .file import CapFile, BaseFile
|
||||
|
|
@ -45,14 +44,6 @@ def decode_id(decode_id):
|
|||
return wrapper
|
||||
|
||||
|
||||
class AlbumIdFilter(Format):
|
||||
"""
|
||||
Filter that help to fill Albums id field
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
super(AlbumIdFilter, self).__init__(u'album.%s', *args)
|
||||
|
||||
|
||||
class Album(BaseObject):
|
||||
"""
|
||||
Represent an album
|
||||
|
|
@ -72,14 +63,6 @@ class Album(BaseObject):
|
|||
return _id
|
||||
|
||||
|
||||
class PlaylistIdFilter(Format):
|
||||
"""
|
||||
Filter that help to fill Albums id field
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
super(PlaylistIdFilter, self).__init__(u'playlist.%s', *args)
|
||||
|
||||
|
||||
class Playlist(BaseObject):
|
||||
"""
|
||||
Represent a playlist
|
||||
|
|
@ -96,14 +79,6 @@ class Playlist(BaseObject):
|
|||
return _id
|
||||
|
||||
|
||||
class BaseAudioIdFilter(Format):
|
||||
"""
|
||||
Filter that help to fill Albums id field
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
super(BaseAudioIdFilter, self).__init__(u'audio.%s', *args)
|
||||
|
||||
|
||||
class BaseAudio(BaseFile):
|
||||
"""
|
||||
Represent an audio file
|
||||
|
|
|
|||
0
weboob/tools/capabilities/audio/__init__.py
Executable file
0
weboob/tools/capabilities/audio/__init__.py
Executable file
44
weboob/tools/capabilities/audio/audio.py
Executable file
44
weboob/tools/capabilities/audio/audio.py
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2009-2015 Bezleputh
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
# weboob is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# weboob is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.browser.filters.standard import Format
|
||||
|
||||
|
||||
class AlbumIdFilter(Format):
|
||||
"""
|
||||
Filter that help to fill Albums id field
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
super(AlbumIdFilter, self).__init__(u'album.%s', *args)
|
||||
|
||||
|
||||
class PlaylistIdFilter(Format):
|
||||
"""
|
||||
Filter that help to fill Albums id field
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
super(PlaylistIdFilter, self).__init__(u'playlist.%s', *args)
|
||||
|
||||
|
||||
class BaseAudioIdFilter(Format):
|
||||
"""
|
||||
Filter that help to fill Albums id field
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
super(BaseAudioIdFilter, self).__init__(u'audio.%s', *args)
|
||||
Loading…
Add table
Add a link
Reference in a new issue