Merge branch 'refactor2' into 'develop'

Update copyright in recently edited files

See merge request ultrasonic/ultrasonic!1164
This commit is contained in:
birdbird 2023-12-04 15:19:09 +00:00
commit b83e349f5c
36 changed files with 114 additions and 37 deletions

View File

@ -1,6 +1,6 @@
/* /*
* NavigationActivity.kt * NavigationActivity.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,3 +1,10 @@
/*
* AppDatabase.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
@file:Suppress("ktlint:standard:max-line-length") @file:Suppress("ktlint:standard:max-line-length")
package org.moire.ultrasonic.data package org.moire.ultrasonic.data

View File

@ -1,3 +1,10 @@
/*
* BasicDaos.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.data package org.moire.ultrasonic.data
import androidx.room.Dao import androidx.room.Dao

View File

@ -1,6 +1,6 @@
/* /*
* MetaDatabase.kt * MetaDatabase.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */
@ -70,25 +70,25 @@ class Converters {
} }
val META_MIGRATION_2_3: Migration = object : Migration(2, 3) { val META_MIGRATION_2_3: Migration = object : Migration(2, 3) {
override fun migrate(database: SupportSQLiteDatabase) { override fun migrate(db: SupportSQLiteDatabase) {
database.execSQL("DROP TABLE `albums`") db.execSQL("DROP TABLE `albums`")
database.execSQL("DROP TABLE `indexes`") db.execSQL("DROP TABLE `indexes`")
database.execSQL("DROP TABLE `artists`") db.execSQL("DROP TABLE `artists`")
database.execSQL("DROP TABLE `tracks`") db.execSQL("DROP TABLE `tracks`")
database.execSQL("DROP TABLE `music_folders`") db.execSQL("DROP TABLE `music_folders`")
database.execSQL( db.execSQL(
"CREATE TABLE IF NOT EXISTS `albums` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `parent` TEXT, `album` TEXT, `title` TEXT, `name` TEXT, `discNumber` INTEGER, `coverArt` TEXT, `songCount` INTEGER, `created` INTEGER, `artist` TEXT, `artistId` TEXT, `duration` INTEGER, `year` INTEGER, `genre` TEXT, `starred` INTEGER NOT NULL, `path` TEXT, `closeness` INTEGER NOT NULL, `isDirectory` INTEGER NOT NULL, `isVideo` INTEGER NOT NULL, PRIMARY KEY(`id`, `serverId`))" "CREATE TABLE IF NOT EXISTS `albums` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `parent` TEXT, `album` TEXT, `title` TEXT, `name` TEXT, `discNumber` INTEGER, `coverArt` TEXT, `songCount` INTEGER, `created` INTEGER, `artist` TEXT, `artistId` TEXT, `duration` INTEGER, `year` INTEGER, `genre` TEXT, `starred` INTEGER NOT NULL, `path` TEXT, `closeness` INTEGER NOT NULL, `isDirectory` INTEGER NOT NULL, `isVideo` INTEGER NOT NULL, PRIMARY KEY(`id`, `serverId`))"
) )
database.execSQL( db.execSQL(
"CREATE TABLE IF NOT EXISTS `indexes` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `name` TEXT, `index` TEXT, `coverArt` TEXT, `albumCount` INTEGER, `closeness` INTEGER NOT NULL, `musicFolderId` TEXT, PRIMARY KEY(`id`, `serverId`))" "CREATE TABLE IF NOT EXISTS `indexes` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `name` TEXT, `index` TEXT, `coverArt` TEXT, `albumCount` INTEGER, `closeness` INTEGER NOT NULL, `musicFolderId` TEXT, PRIMARY KEY(`id`, `serverId`))"
) )
database.execSQL( db.execSQL(
"CREATE TABLE IF NOT EXISTS `artists` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `name` TEXT, `index` TEXT, `coverArt` TEXT, `albumCount` INTEGER, `closeness` INTEGER NOT NULL, PRIMARY KEY(`id`, `serverId`))" "CREATE TABLE IF NOT EXISTS `artists` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `name` TEXT, `index` TEXT, `coverArt` TEXT, `albumCount` INTEGER, `closeness` INTEGER NOT NULL, PRIMARY KEY(`id`, `serverId`))"
) )
database.execSQL( db.execSQL(
"CREATE TABLE IF NOT EXISTS `music_folders` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, PRIMARY KEY(`id`, `serverId`))" "CREATE TABLE IF NOT EXISTS `music_folders` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, PRIMARY KEY(`id`, `serverId`))"
) )
database.execSQL( db.execSQL(
"CREATE TABLE IF NOT EXISTS `tracks` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `parent` TEXT, `isDirectory` INTEGER NOT NULL, `title` TEXT, `album` TEXT, `albumId` TEXT, `artist` TEXT, `artistId` TEXT, `track` INTEGER, `year` INTEGER, `genre` TEXT, `contentType` TEXT, `suffix` TEXT, `transcodedContentType` TEXT, `transcodedSuffix` TEXT, `coverArt` TEXT, `size` INTEGER, `songCount` INTEGER, `duration` INTEGER, `bitRate` INTEGER, `path` TEXT, `isVideo` INTEGER NOT NULL, `starred` INTEGER NOT NULL, `discNumber` INTEGER, `type` TEXT, `created` INTEGER, `closeness` INTEGER NOT NULL, `bookmarkPosition` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `name` TEXT, PRIMARY KEY(`id`, `serverId`))" "CREATE TABLE IF NOT EXISTS `tracks` (`id` TEXT NOT NULL, `serverId` INTEGER NOT NULL DEFAULT -1, `parent` TEXT, `isDirectory` INTEGER NOT NULL, `title` TEXT, `album` TEXT, `albumId` TEXT, `artist` TEXT, `artistId` TEXT, `track` INTEGER, `year` INTEGER, `genre` TEXT, `contentType` TEXT, `suffix` TEXT, `transcodedContentType` TEXT, `transcodedSuffix` TEXT, `coverArt` TEXT, `size` INTEGER, `songCount` INTEGER, `duration` INTEGER, `bitRate` INTEGER, `path` TEXT, `isVideo` INTEGER NOT NULL, `starred` INTEGER NOT NULL, `discNumber` INTEGER, `type` TEXT, `created` INTEGER, `closeness` INTEGER NOT NULL, `bookmarkPosition` INTEGER NOT NULL, `userRating` INTEGER, `averageRating` REAL, `name` TEXT, PRIMARY KEY(`id`, `serverId`))"
) )
} }

View File

@ -1,6 +1,6 @@
/* /*
* AboutFragment.kt * AboutFragment.kt
* Copyright (C) 2009-2021 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* AlbumListFragment.kt * AlbumListFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* BookmarksFragment.kt * BookmarksFragment.kt
* Copyright (C) 2009-2021 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* EditServerFragment.kt * EditServerFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,3 +1,10 @@
/*
* FragmentTitle.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.fragment package org.moire.ultrasonic.fragment
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity

View File

@ -1,6 +1,6 @@
/* /*
* MultiListFragment.kt * MultiListFragment.kt
* Copyright (C) 2009-2021 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* PlayerFragment.kt * PlayerFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* SearchFragment.kt * SearchFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,3 +1,10 @@
/*
* SettingsFragment.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.fragment package org.moire.ultrasonic.fragment
import android.content.DialogInterface import android.content.DialogInterface

View File

@ -1,6 +1,6 @@
/* /*
* TrackCollectionFragment.kt * TrackCollectionFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* LyricsFragment.kt * LyricsFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* PlaylistsFragment.kt * PlaylistsFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* PodcastFragment.kt * PodcastFragment.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,3 +1,10 @@
/*
* SelectGenreFragment.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.fragment.legacy package org.moire.ultrasonic.fragment.legacy
import android.os.Bundle import android.os.Bundle

View File

@ -1,6 +1,6 @@
/* /*
* ArtworkBitmapLoader.kt * ArtworkBitmapLoader.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,3 +1,10 @@
/*
* ImageLoader.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.imageloader package org.moire.ultrasonic.imageloader
import android.app.ActivityManager import android.app.ActivityManager

View File

@ -1,3 +1,10 @@
/*
* SearchListModel.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.model package org.moire.ultrasonic.model
import android.app.Application import android.app.Application

View File

@ -1,6 +1,6 @@
/* /*
* CachedMusicService.kt * CachedMusicService.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* MediaPlayerService.kt * DownloadService.kt
* Copyright (C) 2009-2021 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* DownloadTask.kt * DownloadTask.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* JukeboxMediaPlayer.kt * JukeboxMediaPlayer.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* JukeboxUnimplementedFunctions.kt * JukeboxUnimplementedFunctions.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* MusicService.kt * MusicService.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* OfflineMusicService.kt * OfflineMusicService.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* RESTMusicService.kt * RESTMusicService.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,3 +1,10 @@
/*
* ImageLoaderProvider.kt
* Copyright (C) 2009-2023 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.subsonic package org.moire.ultrasonic.subsonic
import androidx.core.content.res.ResourcesCompat import androidx.core.content.res.ResourcesCompat

View File

@ -1,6 +1,6 @@
/* /*
* ShareHandler.kt * ShareHandler.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* SettableAsyncListDiffer.kt * SettableAsyncListDiffer.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* Util.kt * Util.kt
* Copyright (C) 2009-2022 Ultrasonic developers * Copyright (C) 2009-2023 Ultrasonic developers
* *
* Distributed under terms of the GNU GPLv3 license. * Distributed under terms of the GNU GPLv3 license.
*/ */

View File

@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
~ filter_button_bar.xml
~ Copyright (C) 2009-2023 Ultrasonic developers
~
~ Distributed under terms of the GNU GPLv3 license.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:a="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"

View File

@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
~ list_item_artist.xml
~ Copyright (C) 2009-2023 Ultrasonic developers
~
~ Distributed under terms of the GNU GPLv3 license.
-->
<RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"

View File

@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
~ navigation_header.xml
~ Copyright (C) 2009-2023 Ultrasonic developers
~
~ Distributed under terms of the GNU GPLv3 license.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:a="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"