浏览代码

Merge branch 'dev' of github.com:allanpk716/ChineseSubFinder into dev

allan716 2 年之前
父节点
当前提交
98dedeb5bf

+ 7 - 7
frontend/src/components/VersionUpdateItem.vue

@@ -1,10 +1,5 @@
 <template>
-  <span
-    v-if="
-      latestVersion?.tag_name && systemState.systemInfo && latestVersion.tag_name !== systemState.systemInfo?.version
-    "
-    @click="visible = true"
-  >
+  <span v-if="hasNewVersion" @click="visible = true">
     <slot v-if="$slots.default"></slot>
     <q-badge v-else class="cursor-pointer" label="new" title="有新的版本更新" />
   </span>
@@ -71,7 +66,7 @@
 </template>
 
 <script setup>
-import { onMounted, ref } from 'vue';
+import { computed, onMounted, ref } from 'vue';
 import Markdown from 'components/Markdown';
 import { systemState } from 'src/store/systemState';
 import { LocalStorage } from 'quasar';
@@ -80,6 +75,11 @@ const latestVersion = ref(LocalStorage.getItem('latestVersion') ?? null);
 const visible = ref(false);
 const tab = ref('log');
 
+const hasNewVersion = computed(() => {
+  const v = systemState.systemInfo?.version.replace(/\s+(L|l)ite$/, '');
+  return latestVersion.value?.tag_name && v && latestVersion.value.tag_name !== v;
+});
+
 const getLatestVersion = async () => {
   try {
     const data = await fetch('https://api.github.com/repos/ChineseSubFinder/ChineseSubFinder/releases/latest').then(

+ 2 - 2
frontend/src/pages/library/SearchPanelCsfApi.vue

@@ -1,7 +1,6 @@
 <template>
   <div style="min-height: 300px">
     <subtitle-best-api-limit-banner />
-
     <q-list v-if="csfSearchResult?.length" separator>
       <q-item v-for="(item, index) in csfSearchResult" :key="item.sub_sha256">
         <q-item-section>
@@ -30,6 +29,7 @@
       </q-item>
     </q-list>
     <div v-else-if="!loading" class="text-grey">
+      <div>ImdbId: {{ imdbId || '-' }}</div>
       <template v-if="tmdbErrorMsg">
         <div class="text-negative">{{ tmdbErrorMsg }}</div>
         <div><q-btn flat label="重试" color="primary" dense @click="searchCsf" /></div>
@@ -79,7 +79,7 @@ const props = defineProps({
 const $q = useQuasar();
 const { nextRequestCountdownSecond, countdownLoading, waitRequestReady } = useApiLimit(
   'lastSubtitleBestRequestTime',
-  15 * 1000
+  5 * 1000
 );
 
 const tmdbErrorMsg = ref('');

+ 2 - 1
frontend/src/pages/library/SearchPanelCsfApiTvPackage.vue

@@ -77,6 +77,7 @@
       </template>
     </q-splitter>
     <div v-else-if="!loading" class="text-grey">
+      <div>ImdbId: {{ imdbId || '-' }}</div>
       <template v-if="tmdbErrorMsg">
         <div class="text-negative">{{ tmdbErrorMsg }}</div>
         <div><q-btn flat label="重试" color="primary" dense @click="searchPackages" /></div>
@@ -117,7 +118,7 @@ const props = defineProps({
 const $q = useQuasar();
 const { nextRequestCountdownSecond, countdownLoading, waitRequestReady } = useApiLimit(
   'lastSubtitleBestRequestTime',
-  15 * 1000
+  5 * 1000
 );
 
 const splitterModel = ref(300);

+ 1 - 1
frontend/src/pages/library/movies/index.vue

@@ -16,7 +16,7 @@
     <q-separator class="q-my-md" />
 
     <div v-if="movies.length" class="row q-gutter-x-md q-gutter-y-lg">
-      <q-intersection v-for="item in filteredMovies" once :key="item.name" style="width: 160px; height: 280px">
+      <q-intersection v-for="item in filteredMovies" once :key="item.video_f_path" style="width: 160px; height: 280px">
         <list-item-movie :data="item" />
       </q-intersection>
     </div>

+ 1 - 1
frontend/src/pages/library/tvs/index.vue

@@ -20,7 +20,7 @@
     <q-separator class="q-my-md" />
 
     <div v-if="tvs.length" class="row q-gutter-x-md q-gutter-y-lg">
-      <q-intersection v-for="item in filteredTvs" :key="item.name" style="width: 160px; height: 280px" once>
+      <q-intersection v-for="item in filteredTvs" :key="item.root_dir_path" style="width: 160px; height: 280px" once>
         <div
           class="item-wrapper cursor-pointer"
           @click="toggleSelection(item)"