Skip to content

Commit

Permalink
Merge pull request #23 from Nich87/feature-master
Browse files Browse the repository at this point in the history
rc4-Release PR
  • Loading branch information
Nich87 committed Sep 30, 2022
2 parents 9332006 + 9025c93 commit 7ffb49e
Show file tree
Hide file tree
Showing 25 changed files with 12,959 additions and 12,158 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
pull_request:
branches:
- '**'

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, ubuntu-22.04, windows-2019]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Package prebuild
run: npm run build
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
release:
types: [published]

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-22.04, windows-2019]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Package prebuild
run: npm run build

- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: out/make/

upload-assets:
name: Upload Assets
runs-on: ubuntu-22.04
needs: build
if: ${{ always() }}
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3

- name: Flatten directory
run: |
mkdir release
find ./ -mindepth 2 -type f -exec mv -t ./release -n '{}' +
- name: Upload prebuild asset
uses: icrawl/action-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: './release/*'
Binary file added Assets/Electunes.icns
Binary file not shown.
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2022 Nich87

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2022 Nich87
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Electron-MusicPlayer
Simple MusicPlayer
# Electron-MusicPlayer
Simple MusicPlayer
41 changes: 41 additions & 0 deletions Todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 機能実装案 
- Twitterへの共有機能
<details><summary>必要なこと</summary>
Oauth認証<br>
楽曲情報(アートワーク等)
</details>
<details><summary>モジュール案</summary>

[twitter-api-v2](https://www.npmjs.com/package/twitter-api-v2)<br>
[oauth-electron-twitter](https://www.npmjs.com/package/oauth-electron-twitter)
</details>
<br>

***

- 検索機能

❗ファイル名で検索するか、曲のタグを全検索するかで負荷が変わります。<br>
事前検証が必要です。(単体チェック、組み込みチェック)
***

- テーマ変更機能
<details><summary>カラー</summary>

- ブラック<br>
- ホワイト<br>
- グレー
</details>

***

- 設定保存
<details><summary>保存内容</summary>

- テーマ<br>
- ウィンドウサイズ<br>
- 再生中の楽曲
</details>

プレイリスト編集
キュー更新(削除、追加)
21 changes: 11 additions & 10 deletions Util/convert.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const pad = num => ('' + num).padStart(2, '0');
function seconds_to_time(seconds) {
const hours = Math.floor(seconds / 3600);
seconds %= 3600;
const minutes = Math.floor(seconds / 60);
seconds %= 60;
return (hours ? `${hours}:${pad(minutes)}` : minutes) + `:${pad(seconds)}`;
}

module.exports = { seconds_to_time };
const pad = num => ('' + num).padStart(2, '0');
function seconds_to_time(seconds) {
seconds = Math.trunc(seconds);
const hours = Math.floor(seconds / 3600);
seconds %= 3600;
const minutes = Math.floor(seconds / 60);
seconds %= 60;
return (hours ? `${hours}:${pad(minutes)}` : minutes) + `:${pad(seconds)}`;
}

module.exports = { seconds_to_time };
16 changes: 8 additions & 8 deletions Util/random.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const random = ([...array]) => {
for (let i = array.length - 1; i >= 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}

const random = ([...array]) => {
for (let i = array.length - 1; i >= 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}

module.exports = random;
51 changes: 51 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* @type {import("@electron-forge/shared-types").ForgeConfig}
*/
module.exports = {
packagerConfig: {
icon: "Assets/Electunes",
},
makers: [
{
name: "@electron-forge/maker-squirrel",
/**
* @type {import("@electron-forge/maker-squirrel").MakerSquirrelConfig}
*/
config: {
iconUrl: `file:///${__dirname}/Assets/Electunes.ico`,
setupIcon: "./Assets/Electunes.ico"
}
},
{
name: "@electron-forge/maker-dmg",
/**
* @type {import("@electron-forge/maker-dmg").MakerDMGConfig}
*/
config: {
icon: "Assets/Electunes.icns"
},
},
{
name: "@electron-forge/maker-deb",
/**
* @type {import("@electron-forge/maker-deb").MakerDebConfig}
*/
config: {
options: {
icon: "Assets/Electunes.png"
}
}
},
{
name: "@electron-forge/maker-rpm",
/**
* @type {import("@electron-forge/maker-rpm").MakerRpmConfig}
*/
config: {
options: {
icon: "Assets/Electunes.png"
}
}
}
]
}
14 changes: 14 additions & 0 deletions memo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
メタデータの文字数によって折り返しが必要かも。
アートワークは変なサイズのアートワークの場合表示が崩れるのでそれも対策。


キューはモーダルウィンドウで実装したい。
チェックボックスを用いて選択
選択した要素のidを取得し、配列にぶちこんでqueue.jsのthis.delete(item)でキューから削除とかも実装したい。
↑再生中の曲を削除出来ないようにするのと、作業中に次の曲に移ったときの処理も実装が必要じゃない?

シャッフル機能は一曲ずつ再生して残ってるキューをランダムに先頭に持ってくるほうが挙動としては正しい?
シングルループの実装

ビジュアライザーの実装したい。←Howlerからごにょる必要あり、めんどくさいよ。

Loading

0 comments on commit 7ffb49e

Please sign in to comment.