| 1 |
"""Creates freedesktop.org-compliant .directory files on an album level.""" |
| 2 |
|
| 3 |
from __future__ import annotations |
| 4 |
|
| 5 |
from typing import TYPE_CHECKING |
| 6 |
|
| 7 |
from beets import ui |
| 8 |
from beets.plugins import BeetsPlugin |
| 9 |
|
| 10 |
if TYPE_CHECKING: |
| 11 |
import optparse |
| 12 |
|
| 13 |
from beets.library import Library |
| 14 |
|
| 15 |
|
| 16 |
class FreedesktopPlugin(BeetsPlugin): |
| 17 |
def commands(self) -> list[ui.Subcommand]: |
| 18 |
deprecated = ui.Subcommand( |
| 19 |
"freedesktop", |
| 20 |
help="Print a message to redirect to thumbnails --dolphin", |
| 21 |
) |
| 22 |
deprecated.func = self.deprecation_message |
| 23 |
return [deprecated] |
| 24 |
|
| 25 |
def deprecation_message( |
| 26 |
self, lib: Library, opts: optparse.Values, args: list[str] |
| 27 |
) -> None: |
| 28 |
ui.print_( |
| 29 |
"This plugin is deprecated. Its functionality is " |
| 30 |
"superseded by the 'thumbnails' plugin" |
| 31 |
) |
| 32 |
ui.print_( |
| 33 |
"'thumbnails --dolphin' replaces freedesktop. See doc & " |
| 34 |
"changelog for more information" |
| 35 |
) |