Skip to content

Commit a618f0a

Browse files
authored
Merge pull request #6 from husudosu/dev
Dev
2 parents 7456411 + 18ed7a1 commit a618f0a

19 files changed

+220
-117
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ npm-debug.log*
2929
/platforms
3030
/plugins
3131
/www
32-
resources/android
32+
resources/android
33+
package-lock.json

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,17 @@ Very important to update mpv-remote-node to 1.0.5!
1515
- Support for multiple servers,
1616
- Multiple server handling
1717
- Filebrowser speed improvements with larger directories/collections
18+
19+
## 1.0.6
20+
21+
Minimum [mpv-remote-node](https://github.com/husudosu/mpv-remote-node) version: 1.0.5
22+
Before installing this version of MPV-remote app, please uninstall the previous one! Some Android related stuff changed!
23+
24+
- File browser speed improvements with large collections,
25+
- Improved server selector,
26+
- Better validation on create server screen
27+
28+
Important Android stuff:
29+
30+
- Changed app id from "io.ionic.starter" to "com.husudosu.mpvremote"
31+
- From now on VersionCode will be increased after every release.

TODO.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ ionic capacitor run android -l --host=host
2020

2121
## TODO
2222

23-
- By some reasons routing not working properly, when not using modals on Settings -> Servers and Media collections,
24-
- Filebrowser need more optimization
23+
- By some reasons routing not working properly, when not using modals on Settings -> Servers and Media collections

android/app/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
33
android {
44
compileSdkVersion rootProject.ext.compileSdkVersion
55
defaultConfig {
6-
applicationId "io.ionic.starter"
6+
applicationId "com.husudosu.mpvremote"
77
minSdkVersion rootProject.ext.minSdkVersion
88
targetSdkVersion rootProject.ext.targetSdkVersion
9-
versionCode 1
10-
versionName "1.0.5"
9+
versionCode 6
10+
versionName "1.0.6"
1111
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1212
aaptOptions {
1313
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.

android/app/release/output-metadata.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"type": "APK",
55
"kind": "Directory"
66
},
7-
"applicationId": "io.ionic.starter",
7+
"applicationId": "com.husudosu.mpvremote",
88
"variantName": "release",
99
"elements": [
1010
{
1111
"type": "SINGLE",
1212
"filters": [],
13-
"versionCode": 1,
14-
"versionName": "1.0.5",
13+
"versionCode": 6,
14+
"versionName": "1.0.6",
1515
"outputFile": "app-release.apk"
1616
}
1717
]

android/app/src/main/AndroidManifest.xml

+2-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<manifest package="io.ionic.starter" xmlns:android="http://schemas.android.com/apk/res/android">
2+
<manifest package="com.husudosu.mpvremote" xmlns:android="http://schemas.android.com/apk/res/android">
33
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
4-
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/title_activity_main" android:launchMode="singleTask" android:name="io.ionic.starter.MainActivity" android:theme="@style/AppTheme.NoActionBarLaunch">
4+
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/title_activity_main" android:launchMode="singleTask" android:name="com.husudosu.mpvremote.MainActivity" android:theme="@style/AppTheme.NoActionBarLaunch">
55
<intent-filter>
66
<action android:name="android.intent.action.MAIN" />
77
<category android:name="android.intent.category.LAUNCHER" />
@@ -15,13 +15,10 @@
1515
<action android:name="com.darryncampbell.cordova.plugin.intent.ACTION" />
1616
<category android:name="android.intent.category.DEFAULT" />
1717
</intent-filter>
18-
<!-- This filter captures protocols without type info -->
1918
<intent-filter>
2019
<action android:name="android.intent.action.VIEW" />
21-
2220
<category android:name="android.intent.category.DEFAULT" />
2321
<category android:name="android.intent.category.BROWSABLE" />
24-
2522
<data android:scheme="rtmp" />
2623
<data android:scheme="rtmpe" />
2724
<data android:scheme="rtmps" />
@@ -34,13 +31,10 @@
3431
<data android:scheme="udp" />
3532
<data android:scheme="vlc" />
3633
</intent-filter>
37-
<!-- This filter captures protocols with type info -->
3834
<intent-filter>
3935
<action android:name="android.intent.action.VIEW" />
40-
4136
<category android:name="android.intent.category.DEFAULT" />
4237
<category android:name="android.intent.category.BROWSABLE" />
43-
4438
<data android:mimeType="video/*" />
4539
<data android:mimeType="audio/*" />
4640
<data android:scheme="rtmp" />
@@ -56,10 +50,8 @@
5650
</intent-filter>
5751
<intent-filter>
5852
<action android:name="android.intent.action.VIEW" />
59-
6053
<category android:name="android.intent.category.DEFAULT" />
6154
<category android:name="android.intent.category.BROWSABLE" />
62-
6355
<data android:scheme="" />
6456
<data android:scheme="file" />
6557
<data android:scheme="ftp" />
@@ -94,20 +86,15 @@
9486
</intent-filter>
9587
<intent-filter>
9688
<action android:name="android.intent.action.VIEW" />
97-
9889
<category android:name="android.intent.category.DEFAULT" />
9990
<category android:name="android.intent.category.BROWSABLE" />
100-
10191
<data android:scheme="" />
10292
<data android:scheme="file" />
10393
<data android:scheme="ftp" />
10494
<data android:scheme="content" />
10595
<data android:scheme="http" />
10696
<data android:scheme="https" />
10797
<data android:host="*" />
108-
109-
<!-- video -->
110-
11198
<data android:pathPattern=".*\\.3g2" />
11299
<data android:pathPattern=".*\\.3gp" />
113100
<data android:pathPattern=".*\\.3gp2" />
@@ -128,7 +115,6 @@
128115
<data android:pathPattern=".*\\.m2v" />
129116
<data android:pathPattern=".*\\.m2t" />
130117
<data android:pathPattern=".*\\.m2ts" />
131-
<!-- <data android:pathPattern=".*\\.m3u" /> -->
132118
<data android:pathPattern=".*\\.m3u8" />
133119
<data android:pathPattern=".*\\.mkv" />
134120
<data android:pathPattern=".*\\.mov" />
@@ -187,7 +173,6 @@
187173
<data android:pathPattern=".*\\.M2V" />
188174
<data android:pathPattern=".*\\.M2T" />
189175
<data android:pathPattern=".*\\.M2TS" />
190-
<!-- <data android:pathPattern=".*\\.M3U" /> -->
191176
<data android:pathPattern=".*\\.M3U8" />
192177
<data android:pathPattern=".*\\.MKV" />
193178
<data android:pathPattern=".*\\.MOV" />
@@ -226,9 +211,6 @@
226211
<data android:pathPattern=".*\\.WMV" />
227212
<data android:pathPattern=".*\\.WTV" />
228213
<data android:pathPattern=".*\\.XESC" />
229-
230-
<!-- audio -->
231-
232214
<data android:pathPattern=".*\\.3ga" />
233215
<data android:pathPattern=".*\\.a52" />
234216
<data android:pathPattern=".*\\.aac" />

android/app/src/main/assets/capacitor.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"appId": "io.ionic.starter",
2+
"appId": "com.husudosu.mpvremote",
33
"appName": "MPV Remote",
44
"webDir": "dist",
55
"bundledWebRuntime": false

android/app/src/main/java/io/ionic/starter/MainActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.ionic.starter;
1+
package com.husudosu.mpvremote;
22

33
import com.getcapacitor.BridgeActivity;
44

android/app/src/main/res/values/strings.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<resources>
33
<string name="app_name">MPV Remote</string>
44
<string name="title_activity_main">MPV Remote</string>
5-
<string name="package_name">io.ionic.starter</string>
6-
<string name="custom_url_scheme">io.ionic.starter</string>
5+
<string name="package_name">com.husudosu.mpvremote</string>
6+
<string name="custom_url_scheme">com.husudosu.mpvremote</string>
77
</resources>

capacitor.config.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"appId": "io.ionic.starter",
3-
"appName": "MPV Remote",
4-
"webDir": "dist",
5-
"bundledWebRuntime": false
2+
"appId": "com.husudosu.mpvremote",
3+
"appName": "MPV Remote",
4+
"webDir": "dist",
5+
"bundledWebRuntime": false
66
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mpv-remote",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"private": true,
55
"description": "MPV remote",
66
"scripts": {

src/Container.vue

+19-14
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,26 @@
55
<ion-content>
66
<ion-list id="inbox-list">
77
<ion-list-header>MPV Remote</ion-list-header>
8-
<ion-select
9-
class="serverSelect"
10-
interface="action-sheet"
11-
placeholder="No server selected"
12-
:value="currentServerId"
13-
@ionChange="setCurrentServer($event.target.value)"
14-
>
15-
<ion-select-option
16-
v-for="server in servers"
17-
:key="server.id"
18-
:value="server.id"
8+
<template v-if="servers.length > 0">
9+
<ion-select
10+
class="serverSelect"
11+
interface="action-sheet"
12+
placeholder="No server selected"
13+
:value="currentServerId"
14+
@ionChange="setCurrentServer($event.target.value)"
1915
>
20-
{{ server.name }} ({{ server.host }}:{{ server.port }})
21-
</ion-select-option>
22-
</ion-select>
16+
<ion-select-option
17+
v-for="server in servers"
18+
:key="server.id"
19+
:value="server.id"
20+
>
21+
{{ server.name }} ({{ server.host }}:{{ server.port }})
22+
</ion-select-option>
23+
</ion-select>
24+
</template>
25+
<template v-else>
26+
<div class="serverSelect">No server configured</div>
27+
</template>
2328
<div class="horizontalLine"></div>
2429
<ion-menu-toggle
2530
auto-hide="false"

src/api.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,22 @@ function requestOnRejected(error) {
2020
Promise.reject(error);
2121
}
2222

23-
export function configureInstance(host, port) {
23+
export function disconnect() {
24+
store.commit("simpleapi/clearPlaybackRefreshInterval");
25+
store.commit("simpleapi/setConnectedState", false);
26+
store.commit("simpleapi/clearPlayerData");
2427
if (callsPending > 0) {
2528
callsPending = 0;
26-
cancelSource.cancel("API reconfigure");
29+
cancelSource.cancel("Cancel pending requests");
2730
cancelSource = axios.CancelToken.source();
2831
}
32+
}
33+
34+
export function configureInstance(host, port) {
35+
// Before reconfiguration set store states.
36+
disconnect();
2937
apiInstance.defaults.baseURL = `http://${host}:${port}/api/v1/`;
3038
apiInstance.interceptors.request.use(requestOnFulfilled, requestOnRejected);
31-
// Set active server
3239
}
3340

3441
apiInstance.interceptors.response.use(

src/components/addServerModal.vue

+3
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ export default {
102102
const onSubmitClicked = () => {
103103
// Validate server data
104104
let errors = [];
105+
dialog.value.name = dialog.value.name.trim();
106+
dialog.value.host = dialog.value.host.trim();
107+
105108
if (dialog.value.name.length === 0) errors.push("Name required");
106109
if (dialog.value.host.length === 0) errors.push("Host required");
107110

0 commit comments

Comments
 (0)