From 2c2bc9380d524a78f11cdbb79cec07d4b7073ce9 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Sat, 19 Oct 2019 20:09:11 -0600 Subject: [PATCH] Renamed from Libremsonic to Sublime Music --- README.rst | 6 +++--- api_object_generator/api_object_generator.py | 2 +- ...ic.json => com.sumnerevans.SublimeMusic.json} | 6 +++--- flatpak/flatpak_build.sh | 4 ++-- pytest.ini | 2 +- setup.py | 10 +++++----- {libremsonic => sublime}/__init__.py | 0 {libremsonic => sublime}/__main__.py | 4 ++-- {libremsonic => sublime}/app.py | 16 ++++++++-------- {libremsonic => sublime}/cache_manager.py | 10 +++++----- {libremsonic => sublime}/config.py | 2 +- {libremsonic => sublime}/dbus_manager.py | 4 ++-- {libremsonic => sublime}/from_json.py | 0 {libremsonic => sublime}/server/__init__.py | 0 {libremsonic => sublime}/server/api_object.py | 2 +- {libremsonic => sublime}/server/api_objects.py | 2 +- {libremsonic => sublime}/server/server.py | 2 +- {libremsonic => sublime}/state_manager.py | 6 +++--- {libremsonic => sublime}/ui/__init__.py | 0 {libremsonic => sublime}/ui/albums.py | 10 +++++----- {libremsonic => sublime}/ui/app_styles.css | 0 {libremsonic => sublime}/ui/artists.py | 10 +++++----- {libremsonic => sublime}/ui/common/__init__.py | 0 .../ui/common/album_with_songs.py | 8 ++++---- .../ui/common/cover_art_grid.py | 2 +- .../ui/common/edit_form_dialog.py | 0 .../ui/common/icon_button.py | 0 {libremsonic => sublime}/ui/common/players.py | 6 +++--- .../ui/common/spinner_image.py | 0 {libremsonic => sublime}/ui/configure_servers.py | 6 +++--- {libremsonic => sublime}/ui/main.py | 6 +++--- .../org.mpris.MediaPlayer2.Player.xml | 0 .../org.mpris.MediaPlayer2.Playlists.xml | 0 .../org.mpris.MediaPlayer2.TrackList.xml | 0 .../ui/mpris_specs/org.mpris.MediaPlayer2.xml | 0 {libremsonic => sublime}/ui/player_controls.py | 10 +++++----- {libremsonic => sublime}/ui/playlists.py | 10 +++++----- {libremsonic => sublime}/ui/settings.py | 0 {libremsonic => sublime}/ui/util.py | 2 +- 39 files changed, 74 insertions(+), 74 deletions(-) rename flatpak/{com.sumnerevans.libremsonic.json => com.sumnerevans.SublimeMusic.json} (98%) rename {libremsonic => sublime}/__init__.py (100%) rename {libremsonic => sublime}/__main__.py (72%) rename {libremsonic => sublime}/app.py (98%) rename {libremsonic => sublime}/cache_manager.py (98%) rename {libremsonic => sublime}/config.py (97%) rename {libremsonic => sublime}/dbus_manager.py (99%) rename {libremsonic => sublime}/from_json.py (100%) rename {libremsonic => sublime}/server/__init__.py (100%) rename {libremsonic => sublime}/server/api_object.py (93%) rename {libremsonic => sublime}/server/api_objects.py (99%) rename {libremsonic => sublime}/server/server.py (99%) rename {libremsonic => sublime}/state_manager.py (97%) rename {libremsonic => sublime}/ui/__init__.py (100%) rename {libremsonic => sublime}/ui/albums.py (97%) rename {libremsonic => sublime}/ui/app_styles.css (100%) rename {libremsonic => sublime}/ui/artists.py (98%) rename {libremsonic => sublime}/ui/common/__init__.py (100%) rename {libremsonic => sublime}/ui/common/album_with_songs.py (98%) rename {libremsonic => sublime}/ui/common/cover_art_grid.py (99%) rename {libremsonic => sublime}/ui/common/edit_form_dialog.py (100%) rename {libremsonic => sublime}/ui/common/icon_button.py (100%) rename {libremsonic => sublime}/ui/common/players.py (98%) rename {libremsonic => sublime}/ui/common/spinner_image.py (100%) rename {libremsonic => sublime}/ui/configure_servers.py (98%) rename {libremsonic => sublime}/ui/main.py (96%) rename {libremsonic => sublime}/ui/mpris_specs/org.mpris.MediaPlayer2.Player.xml (100%) rename {libremsonic => sublime}/ui/mpris_specs/org.mpris.MediaPlayer2.Playlists.xml (100%) rename {libremsonic => sublime}/ui/mpris_specs/org.mpris.MediaPlayer2.TrackList.xml (100%) rename {libremsonic => sublime}/ui/mpris_specs/org.mpris.MediaPlayer2.xml (100%) rename {libremsonic => sublime}/ui/player_controls.py (98%) rename {libremsonic => sublime}/ui/playlists.py (98%) rename {libremsonic => sublime}/ui/settings.py (100%) rename {libremsonic => sublime}/ui/util.py (99%) diff --git a/README.rst b/README.rst index 3b4fe16..95dba12 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -libremsonic -=========== +Sublime Music +============= A GTK3 `Revel`_/`Subsonic`_/`Airsonic`_/\*sonic client for the Linux Desktop. @@ -14,7 +14,7 @@ Features - Connect to multiple Subsonic-API-compliant servers. - Play music through Chromecasts on the same LAN. -- DBus MPRIS interface integration for controlling Libremsonic via +- DBus MPRIS interface integration for controlling Sublime Music via ``playerctl``, ``i3status-rust``, KDE Connect, and other DBus MPRIS clients. - Browse Albums, Artists, and Playlists. - Play queue. diff --git a/api_object_generator/api_object_generator.py b/api_object_generator/api_object_generator.py index 3a2de86..73667fe 100755 --- a/api_object_generator/api_object_generator.py +++ b/api_object_generator/api_object_generator.py @@ -275,6 +275,6 @@ with open(output_file, 'w+') as outfile: 'from datetime import datetime', 'from typing import List', 'from enum import Enum', - 'from libremsonic.server.api_object import APIObject', + 'from sublime.server.api_object import APIObject', *map(generate_class_for_type, output_order), ]) + '\n') diff --git a/flatpak/com.sumnerevans.libremsonic.json b/flatpak/com.sumnerevans.SublimeMusic.json similarity index 98% rename from flatpak/com.sumnerevans.libremsonic.json rename to flatpak/com.sumnerevans.SublimeMusic.json index d3fba83..e465c7e 100644 --- a/flatpak/com.sumnerevans.libremsonic.json +++ b/flatpak/com.sumnerevans.SublimeMusic.json @@ -1,9 +1,9 @@ { - "app-id": "com.sumnerevans.libremsonic", + "app-id": "com.sumnerevans.SublimeMusic", "runtime": "org.gnome.Platform", "runtime-version": "3.32", "sdk": "org.gnome.Sdk", - "command": "libremsonic", + "command": "sublime", "finish-args": [ "--share=ipc", "--socket=fallback-x11", @@ -13,7 +13,7 @@ ], "modules": [ { - "name": "libremsonic", + "name": "sublime", "buildsystem": "simple", "build-commands": [ "pip3 install --prefix=/app ." diff --git a/flatpak/flatpak_build.sh b/flatpak/flatpak_build.sh index 0712eaf..508145d 100755 --- a/flatpak/flatpak_build.sh +++ b/flatpak/flatpak_build.sh @@ -7,6 +7,6 @@ python3 ./flatpak-builder-tools/pip/flatpak-pip-generator --requirements-file=fl mkdir /repo -flatpak-builder --repo=/repo flatpak_build_dir com.sumnerevans.libremsonic.json +flatpak-builder --repo=/repo flatpak_build_dir com.sumnerevans.SublimeMusic.json -flatpak build-bundle /repo libremsonic.flatpak com.sumnerevans.libremsonic +flatpak build-bundle /repo sublime.flatpak com.sumnerevans.SublimeMusic diff --git a/pytest.ini b/pytest.ini index 0e77ad6..7bbdfab 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,6 +3,6 @@ addopts = -vvv --doctest-modules --ignore-glob='api_object_generator' - --cov=libremsonic + --cov=sublime --cov-report html --cov-report term diff --git a/setup.py b/setup.py index 50937aa..cddc24f 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() # Find the version -with codecs.open(os.path.join(here, 'libremsonic/__init__.py'), +with codecs.open(os.path.join(here, 'sublime/__init__.py'), encoding='utf-8') as f: for line in f: if line.startswith('__version__'): @@ -17,9 +17,9 @@ with codecs.open(os.path.join(here, 'libremsonic/__init__.py'), break setup( - name='libremsonic', + name='sublime-music', version=version, - url='https://gitlab.com/robozman/libremsonic', + url='https://gitlab.com/sumner/sublime-music', description='A native GTK *sonic client.', long_description=long_description, author='Sumner Evans', @@ -44,7 +44,7 @@ setup( keywords='airsonic subsonic libresonic music', packages=find_packages(exclude=['tests']), package_data={ - 'libremsonic': [ + 'sublime': [ 'ui/app_styles.css', 'ui/mpris_specs/org.mpris.MediaPlayer2.xml', 'ui/mpris_specs/org.mpris.MediaPlayer2.Player.xml', @@ -73,7 +73,7 @@ setup( # platform. entry_points={ 'console_scripts': [ - 'libremsonic=libremsonic.__main__:main', + 'sublime=sublime.__main__:main', ], }, ) diff --git a/libremsonic/__init__.py b/sublime/__init__.py similarity index 100% rename from libremsonic/__init__.py rename to sublime/__init__.py diff --git a/libremsonic/__main__.py b/sublime/__main__.py similarity index 72% rename from libremsonic/__main__.py rename to sublime/__main__.py index f7acae4..e1bc7e8 100644 --- a/libremsonic/__main__.py +++ b/sublime/__main__.py @@ -5,9 +5,9 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk # noqa: F401 -from .app import LibremsonicApp +from .app import SublimeMusicApp def main(): - app = LibremsonicApp() + app = SublimeMusicApp() app.run(sys.argv) diff --git a/libremsonic/app.py b/sublime/app.py similarity index 98% rename from libremsonic/app.py rename to sublime/app.py index 2747e20..50384d0 100644 --- a/libremsonic/app.py +++ b/sublime/app.py @@ -22,15 +22,15 @@ from .server.api_objects import Child from .ui.common.players import PlayerEvent, MPVPlayer, ChromecastPlayer -class LibremsonicApp(Gtk.Application): +class SublimeMusicApp(Gtk.Application): def __init__(self, *args, **kwargs): super().__init__( *args, - application_id="com.sumnerevans.libremsonic", + application_id="com.sumnerevans.sublimemusic", flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE, **kwargs, ) - Notify.init('LibremSonic') + Notify.init('Sublime Music') self.window = None self.state = ApplicationState() @@ -42,7 +42,7 @@ class LibremsonicApp(Gtk.Application): GLib.OptionFlags.NONE, GLib.OptionArg.FILENAME, 'Specify a configuration file. Defaults to ' - '~/.config/libremsonic/config.json', + '~/.config/sublime-music/config.json', None, ) @@ -57,11 +57,11 @@ class LibremsonicApp(Gtk.Application): if config_file: config_file = config_file.get_bytestring().decode('utf-8') else: - # Default to ~/.config/libremsonic. + # Default to ~/.config/sublime-music. config_folder = ( environ.get('XDG_CONFIG_HOME') or environ.get('APPDATA') or os.path.join(environ.get('HOME'), '.config')) - config_folder = os.path.join(config_folder, 'libremsonic') + config_folder = os.path.join(config_folder, 'sublime-music') config_file = os.path.join(config_folder, 'config.json') self.state.config_file = config_file @@ -117,7 +117,7 @@ class LibremsonicApp(Gtk.Application): # Windows are associated with the application when the last one is # closed the application shuts down. - self.window = MainWindow(application=self, title="LibremSonic") + self.window = MainWindow(application=self, title="Sublime Music") # Configure the CSS provider so that we can style elements on the # window. @@ -772,7 +772,7 @@ class LibremsonicApp(Gtk.Application): ) song_notification.add_action( 'clicked', - 'Open LibremSonic', + 'Open Sublime Music', on_notification_click, ) song_notification.show() diff --git a/libremsonic/cache_manager.py b/sublime/cache_manager.py similarity index 98% rename from libremsonic/cache_manager.py rename to sublime/cache_manager.py index 77c50cf..9f8a11f 100644 --- a/libremsonic/cache_manager.py +++ b/sublime/cache_manager.py @@ -24,10 +24,10 @@ from typing import ( import requests -from libremsonic.config import AppConfiguration, ServerConfiguration -from libremsonic.server import Server -from libremsonic.server.api_object import APIObject -from libremsonic.server.api_objects import ( +from .config import AppConfiguration, ServerConfiguration +from .server import Server +from .server.api_object import APIObject +from .server.api_objects import ( Playlist, PlaylistWithSongs, Child, @@ -204,7 +204,7 @@ class CacheManager(metaclass=Singleton): os.environ.get('XDG_CACHE_HOME') or os.path.expanduser('~/.cache')) return Path(xdg_cache_home).joinpath( - 'libremsonic', *relative_paths) + 'sublime-music', *relative_paths) def return_cached_or_download( self, diff --git a/libremsonic/config.py b/sublime/config.py similarity index 97% rename from libremsonic/config.py rename to sublime/config.py index b39bf6d..a1ba223 100644 --- a/libremsonic/config.py +++ b/sublime/config.py @@ -73,4 +73,4 @@ class AppConfiguration: default_cache_location = ( os.environ.get('XDG_DATA_HOME') or os.path.expanduser('~/.local/share')) - return os.path.join(default_cache_location, 'libremsonic') + return os.path.join(default_cache_location, 'sublime-music') diff --git a/libremsonic/dbus_manager.py b/sublime/dbus_manager.py similarity index 99% rename from libremsonic/dbus_manager.py rename to sublime/dbus_manager.py index 882fcd3..e2c157b 100644 --- a/libremsonic/dbus_manager.py +++ b/sublime/dbus_manager.py @@ -73,7 +73,7 @@ class DBusManager: self.bus_number = Gio.bus_own_name_on_connection( connection, - 'org.mpris.MediaPlayer2.libremsonic', + 'org.mpris.MediaPlayer2.sublime', Gio.BusNameOwnerFlags.NONE, dbus_name_acquired, dbus_name_lost, @@ -196,7 +196,7 @@ class DBusManager: 'CanQuit': True, 'CanRaise': True, 'HasTrackList': True, - 'Identity': 'Libremsonic', + 'Identity': 'Sublime Music', # TODO should implement in #29 'DesktopEntry': 'foo', 'SupportedUriSchemes': [], diff --git a/libremsonic/from_json.py b/sublime/from_json.py similarity index 100% rename from libremsonic/from_json.py rename to sublime/from_json.py diff --git a/libremsonic/server/__init__.py b/sublime/server/__init__.py similarity index 100% rename from libremsonic/server/__init__.py rename to sublime/server/__init__.py diff --git a/libremsonic/server/api_object.py b/sublime/server/api_object.py similarity index 93% rename from libremsonic/server/api_object.py rename to sublime/server/api_object.py index 7816aac..cbad97e 100644 --- a/libremsonic/server/api_object.py +++ b/sublime/server/api_object.py @@ -5,7 +5,7 @@ Defines the base class for API objects. from enum import Enum from typing import Any, Dict -from libremsonic.from_json import from_json as _from_json +from sublime.from_json import from_json as _from_json class APIObject: diff --git a/libremsonic/server/api_objects.py b/sublime/server/api_objects.py similarity index 99% rename from libremsonic/server/api_objects.py rename to sublime/server/api_objects.py index 5b644b0..9b36457 100644 --- a/libremsonic/server/api_objects.py +++ b/sublime/server/api_objects.py @@ -8,7 +8,7 @@ a new API version. from datetime import datetime from typing import List from enum import Enum -from libremsonic.server.api_object import APIObject +from sublime.server.api_object import APIObject class AlbumInfo(APIObject): diff --git a/libremsonic/server/server.py b/sublime/server/server.py similarity index 99% rename from libremsonic/server/server.py rename to sublime/server/server.py index 17add2e..cb1c0e5 100644 --- a/libremsonic/server/server.py +++ b/sublime/server/server.py @@ -69,7 +69,7 @@ class Server: return dict( u=self.username, p=self.password, - c='LibremSonic', + c='Sublime Music', f='json', v='1.15.0', ) diff --git a/libremsonic/state_manager.py b/sublime/state_manager.py similarity index 97% rename from libremsonic/state_manager.py rename to sublime/state_manager.py index bc6947d..4808333 100644 --- a/libremsonic/state_manager.py +++ b/sublime/state_manager.py @@ -3,7 +3,7 @@ from enum import Enum import json from typing import List -from libremsonic.from_json import from_json +from .from_json import from_json from .config import AppConfiguration from .cache_manager import CacheManager from .server.api_objects import Child @@ -43,7 +43,7 @@ class ApplicationState: Configuration is stored in ``config`` which is an ``AppConfiguration`` object. UI state is stored as separate properties on this class. - Configuration is stored to disk in $XDG_CONFIG_HOME/libremsonic. State is + Configuration is stored to disk in $XDG_CONFIG_HOME/sublime-music. State is stored in $XDG_CACHE_HOME. Nothing in state should be assumed to be permanent. State need not be saved, the ``to_json`` and ``from_json`` functions define what part of the state will be saved across application @@ -168,7 +168,7 @@ class ApplicationState: # away too often... state_filename = ( os.environ.get('XDG_CACHE_HOME') or os.path.expanduser('~/.cache')) - return os.path.join(state_filename, 'libremsonic/state.yaml') + return os.path.join(state_filename, 'sublime-music/state.yaml') @property def volume(self): diff --git a/libremsonic/ui/__init__.py b/sublime/ui/__init__.py similarity index 100% rename from libremsonic/ui/__init__.py rename to sublime/ui/__init__.py diff --git a/libremsonic/ui/albums.py b/sublime/ui/albums.py similarity index 97% rename from libremsonic/ui/albums.py rename to sublime/ui/albums.py index 6a338a1..87e06fc 100644 --- a/libremsonic/ui/albums.py +++ b/sublime/ui/albums.py @@ -4,12 +4,12 @@ from typing import Optional, Union gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject, GLib -from libremsonic.state_manager import ApplicationState -from libremsonic.cache_manager import CacheManager -from libremsonic.ui import util -from libremsonic.ui.common import AlbumWithSongs, IconButton, CoverArtGrid +from sublime.state_manager import ApplicationState +from sublime.cache_manager import CacheManager +from sublime.ui import util +from sublime.ui.common import AlbumWithSongs, IconButton, CoverArtGrid -from libremsonic.server.api_objects import Child, AlbumWithSongsID3 +from sublime.server.api_objects import Child, AlbumWithSongsID3 Album = Union[Child, AlbumWithSongsID3] diff --git a/libremsonic/ui/app_styles.css b/sublime/ui/app_styles.css similarity index 100% rename from libremsonic/ui/app_styles.css rename to sublime/ui/app_styles.css diff --git a/libremsonic/ui/artists.py b/sublime/ui/artists.py similarity index 98% rename from libremsonic/ui/artists.py rename to sublime/ui/artists.py index f75be2a..643055e 100644 --- a/libremsonic/ui/artists.py +++ b/sublime/ui/artists.py @@ -5,12 +5,12 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject, Pango, GLib, Gio -from libremsonic.state_manager import ApplicationState -from libremsonic.cache_manager import CacheManager -from libremsonic.ui import util -from libremsonic.ui.common import AlbumWithSongs, IconButton, SpinnerImage +from sublime.state_manager import ApplicationState +from sublime.cache_manager import CacheManager +from sublime.ui import util +from sublime.ui.common import AlbumWithSongs, IconButton, SpinnerImage -from libremsonic.server.api_objects import ( +from sublime.server.api_objects import ( AlbumID3, ArtistInfo2, ArtistWithAlbumsID3, diff --git a/libremsonic/ui/common/__init__.py b/sublime/ui/common/__init__.py similarity index 100% rename from libremsonic/ui/common/__init__.py rename to sublime/ui/common/__init__.py diff --git a/libremsonic/ui/common/album_with_songs.py b/sublime/ui/common/album_with_songs.py similarity index 98% rename from libremsonic/ui/common/album_with_songs.py rename to sublime/ui/common/album_with_songs.py index 652051e..486ec46 100644 --- a/libremsonic/ui/common/album_with_songs.py +++ b/sublime/ui/common/album_with_songs.py @@ -6,13 +6,13 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject, Pango, GLib -from libremsonic.state_manager import ApplicationState -from libremsonic.cache_manager import CacheManager -from libremsonic.ui import util +from sublime.state_manager import ApplicationState +from sublime.cache_manager import CacheManager +from sublime.ui import util from .icon_button import IconButton from .spinner_image import SpinnerImage -from libremsonic.server.api_objects import ( +from sublime.server.api_objects import ( AlbumWithSongsID3, Child, Directory, diff --git a/libremsonic/ui/common/cover_art_grid.py b/sublime/ui/common/cover_art_grid.py similarity index 99% rename from libremsonic/ui/common/cover_art_grid.py rename to sublime/ui/common/cover_art_grid.py index 77fbf34..fb96c6d 100644 --- a/libremsonic/ui/common/cover_art_grid.py +++ b/sublime/ui/common/cover_art_grid.py @@ -5,7 +5,7 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import GLib, Gtk, GObject, Gio, Pango -from libremsonic.state_manager import ApplicationState +from sublime.state_manager import ApplicationState from .spinner_image import SpinnerImage diff --git a/libremsonic/ui/common/edit_form_dialog.py b/sublime/ui/common/edit_form_dialog.py similarity index 100% rename from libremsonic/ui/common/edit_form_dialog.py rename to sublime/ui/common/edit_form_dialog.py diff --git a/libremsonic/ui/common/icon_button.py b/sublime/ui/common/icon_button.py similarity index 100% rename from libremsonic/ui/common/icon_button.py rename to sublime/ui/common/icon_button.py diff --git a/libremsonic/ui/common/players.py b/sublime/ui/common/players.py similarity index 98% rename from libremsonic/ui/common/players.py rename to sublime/ui/common/players.py index 2ae2567..654d9e6 100644 --- a/libremsonic/ui/common/players.py +++ b/sublime/ui/common/players.py @@ -12,9 +12,9 @@ import pychromecast import mpv import bottle -from libremsonic.config import AppConfiguration -from libremsonic.cache_manager import CacheManager -from libremsonic.server.api_objects import Child +from sublime.config import AppConfiguration +from sublime.cache_manager import CacheManager +from sublime.server.api_objects import Child class PlayerEvent: diff --git a/libremsonic/ui/common/spinner_image.py b/sublime/ui/common/spinner_image.py similarity index 100% rename from libremsonic/ui/common/spinner_image.py rename to sublime/ui/common/spinner_image.py diff --git a/libremsonic/ui/configure_servers.py b/sublime/ui/configure_servers.py similarity index 98% rename from libremsonic/ui/configure_servers.py rename to sublime/ui/configure_servers.py index fbbdec5..18d04d2 100644 --- a/libremsonic/ui/configure_servers.py +++ b/sublime/ui/configure_servers.py @@ -4,9 +4,9 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject -from libremsonic.server import Server -from libremsonic.config import ServerConfiguration -from libremsonic.ui.common import EditFormDialog, IconButton +from sublime.server import Server +from sublime.config import ServerConfiguration +from sublime.ui.common import EditFormDialog, IconButton class EditServerDialog(EditFormDialog): diff --git a/libremsonic/ui/main.py b/sublime/ui/main.py similarity index 96% rename from libremsonic/ui/main.py rename to sublime/ui/main.py index a0a60ff..9f155a8 100644 --- a/libremsonic/ui/main.py +++ b/sublime/ui/main.py @@ -3,11 +3,11 @@ gi.require_version('Gtk', '3.0') from gi.repository import Gio, Gtk, GObject from . import albums, artists, playlists, player_controls -from libremsonic.state_manager import ApplicationState +from sublime.state_manager import ApplicationState class MainWindow(Gtk.ApplicationWindow): - """Defines the main window for LibremSonic.""" + """Defines the main window for Sublime Music.""" __gsignals__ = { 'song-clicked': ( GObject.SignalFlags.RUN_FIRST, @@ -85,7 +85,7 @@ class MainWindow(Gtk.ApplicationWindow): """ header = Gtk.HeaderBar() header.set_show_close_button(True) - header.props.title = 'LibremSonic' + header.props.title = 'Sublime Music' # Search search = Gtk.SearchEntry() diff --git a/libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.Player.xml b/sublime/ui/mpris_specs/org.mpris.MediaPlayer2.Player.xml similarity index 100% rename from libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.Player.xml rename to sublime/ui/mpris_specs/org.mpris.MediaPlayer2.Player.xml diff --git a/libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.Playlists.xml b/sublime/ui/mpris_specs/org.mpris.MediaPlayer2.Playlists.xml similarity index 100% rename from libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.Playlists.xml rename to sublime/ui/mpris_specs/org.mpris.MediaPlayer2.Playlists.xml diff --git a/libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.TrackList.xml b/sublime/ui/mpris_specs/org.mpris.MediaPlayer2.TrackList.xml similarity index 100% rename from libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.TrackList.xml rename to sublime/ui/mpris_specs/org.mpris.MediaPlayer2.TrackList.xml diff --git a/libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.xml b/sublime/ui/mpris_specs/org.mpris.MediaPlayer2.xml similarity index 100% rename from libremsonic/ui/mpris_specs/org.mpris.MediaPlayer2.xml rename to sublime/ui/mpris_specs/org.mpris.MediaPlayer2.xml diff --git a/libremsonic/ui/player_controls.py b/sublime/ui/player_controls.py similarity index 98% rename from libremsonic/ui/player_controls.py rename to sublime/ui/player_controls.py index 7ecfe72..34121ae 100644 --- a/libremsonic/ui/player_controls.py +++ b/sublime/ui/player_controls.py @@ -4,11 +4,11 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Pango, GObject, Gio, GLib -from libremsonic.cache_manager import CacheManager -from libremsonic.state_manager import ApplicationState, RepeatType -from libremsonic.ui import util -from libremsonic.ui.common import IconButton, SpinnerImage -from libremsonic.ui.common.players import ChromecastPlayer +from sublime.cache_manager import CacheManager +from sublime.state_manager import ApplicationState, RepeatType +from sublime.ui import util +from sublime.ui.common import IconButton, SpinnerImage +from sublime.ui.common.players import ChromecastPlayer class PlayerControls(Gtk.ActionBar): diff --git a/libremsonic/ui/playlists.py b/sublime/ui/playlists.py similarity index 98% rename from libremsonic/ui/playlists.py rename to sublime/ui/playlists.py index 41107e6..d4e489d 100644 --- a/libremsonic/ui/playlists.py +++ b/sublime/ui/playlists.py @@ -8,11 +8,11 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gio, Gtk, Pango, GObject, GLib -from libremsonic.server.api_objects import PlaylistWithSongs -from libremsonic.state_manager import ApplicationState -from libremsonic.cache_manager import CacheManager -from libremsonic.ui import util -from libremsonic.ui.common import EditFormDialog, IconButton, SpinnerImage +from sublime.server.api_objects import PlaylistWithSongs +from sublime.state_manager import ApplicationState +from sublime.cache_manager import CacheManager +from sublime.ui import util +from sublime.ui.common import EditFormDialog, IconButton, SpinnerImage class EditPlaylistDialog(EditFormDialog): diff --git a/libremsonic/ui/settings.py b/sublime/ui/settings.py similarity index 100% rename from libremsonic/ui/settings.py rename to sublime/ui/settings.py diff --git a/libremsonic/ui/util.py b/sublime/ui/util.py similarity index 99% rename from libremsonic/ui/util.py rename to sublime/ui/util.py index 6c38032..8ecfb8c 100644 --- a/libremsonic/ui/util.py +++ b/sublime/ui/util.py @@ -10,7 +10,7 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GLib, Gdk, GObject -from libremsonic.cache_manager import CacheManager, SongCacheStatus +from sublime.cache_manager import CacheManager, SongCacheStatus def format_song_duration(duration_secs) -> str: