diff --git a/backend/.gitignore b/backend/.gitignore
index 34efe3c..7f956e7 100755
--- a/backend/.gitignore
+++ b/backend/.gitignore
@@ -1,3 +1,4 @@
+bin/*
vendor/
__debug_bin*
backend
diff --git a/backend/Makefile b/backend/Makefile
index 93a6f7f..27c3788 100755
--- a/backend/Makefile
+++ b/backend/Makefile
@@ -17,7 +17,7 @@ dist:
.PHONY: release
release:
- @go build -ldflags=${flags} -o bin/release/atom
+ @CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/release/app .
@cp config.toml bin/release/
.PHONY: test
@@ -47,4 +47,4 @@ mdown:
.PHONY: model
model:
- go test -run ^Test_GenModel
\ No newline at end of file
+ go test -run ^Test_GenModel
diff --git a/frontend/src/components/List.vue b/frontend/src/components/List.vue
index 38b74c6..b4d2436 100644
--- a/frontend/src/components/List.vue
+++ b/frontend/src/components/List.vue
@@ -4,7 +4,7 @@
+ v-model:error="error" :finished-text="finishText" offset="100" @load="loadData">
@@ -26,6 +26,8 @@ export default defineComponent({
const pageLimit = ref(10);
const offset = ref("");
+ const finishText = ref("没有更多了");
+
const onSearch = () => {
items.value = [];
offset.value = "";
@@ -60,6 +62,10 @@ export default defineComponent({
finished.value = true;
}
+ if (offset == "" && res.data.length === 0 && props.bought) {
+ finishText.value = "您还没有购买任何视频";
+ }
+
if (offset.value == "") {
items.value = res.data;
} else {
@@ -69,8 +75,9 @@ export default defineComponent({
})
.catch((err) => {
- console.error("ERROR", err);
+ console.log("ERR", err)
error.value = true
+ // finished.value = true
})
.finally(() => {
loading.value = false;
@@ -78,6 +85,7 @@ export default defineComponent({
};
return {
+ error,
search,
items,
loading,
diff --git a/readme.md b/readme.md
index 18f3935..18648d4 100644
--- a/readme.md
+++ b/readme.md
@@ -1,16 +1,26 @@
-discover
+### commands
+#### discover
```
./backend tasks discover --from /mnt/yangpingliang/publish/ --to /mnt/yangpingliang/publish/processed/1
```
-sync
-
+#### sync
```
rsync -avh --progress /mnt/ypl/publish/processed/ server.ali.bj.01:/data
```
-store
+#### store
```
tasks store --from /app/processed
-```
\ No newline at end of file
+```
+
+### crontab example for rockey8
+
+Add the following lines to your crontab file to run the discover command every hour and run the sync command only if discover is successful:
+```
+0 * * * * /bin/bash -c 'qvyun tasks discover --from /mnt/yangpingliang/publish/ --to /mnt/yangpingliang/publish/processed/1 && rsync -avh --progress /mnt/ypl/publish/processed/ server.ali.bj.01:/data'
+```
+
+
+### docker images