mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-06 17:59:39 +00:00
small fix
This commit is contained in:
parent
f3a8cb751d
commit
2c2f28ddd2
2 changed files with 17 additions and 1 deletions
|
|
@ -517,8 +517,13 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
||||||
let traktResult = false;
|
let traktResult = false;
|
||||||
|
|
||||||
if (item.type === 'movie') {
|
if (item.type === 'movie') {
|
||||||
|
logger.log(`🎬 [ContinueWatching] Removing movie from Trakt history: ${item.name}`);
|
||||||
traktResult = await traktService.removeMovieFromHistory(item.id);
|
traktResult = await traktService.removeMovieFromHistory(item.id);
|
||||||
|
} else if (item.type === 'series' && item.season !== undefined && item.episode !== undefined) {
|
||||||
|
logger.log(`📺 [ContinueWatching] Removing specific episode from Trakt history: ${item.name} S${item.season}E${item.episode}`);
|
||||||
|
traktResult = await traktService.removeEpisodeFromHistory(item.id, item.season, item.episode);
|
||||||
} else {
|
} else {
|
||||||
|
logger.log(`📺 [ContinueWatching] Removing entire show from Trakt history: ${item.name} (no specific episode info)`);
|
||||||
traktResult = await traktService.removeShowFromHistory(item.id);
|
traktResult = await traktService.removeShowFromHistory(item.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1854,6 +1854,7 @@ export class TraktService {
|
||||||
*/
|
*/
|
||||||
public async removeEpisodeFromHistory(showImdbId: string, season: number, episode: number): Promise<boolean> {
|
public async removeEpisodeFromHistory(showImdbId: string, season: number, episode: number): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
|
logger.log(`🔍 [TraktService] removeEpisodeFromHistory called for ${showImdbId} S${season}E${episode}`);
|
||||||
const payload: TraktHistoryRemovePayload = {
|
const payload: TraktHistoryRemovePayload = {
|
||||||
shows: [
|
shows: [
|
||||||
{
|
{
|
||||||
|
|
@ -1874,8 +1875,18 @@ export class TraktService {
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
logger.log(`📤 [TraktService] Sending removeEpisodeFromHistory payload:`, JSON.stringify(payload, null, 2));
|
||||||
|
|
||||||
const result = await this.removeFromHistory(payload);
|
const result = await this.removeFromHistory(payload);
|
||||||
return result !== null && result.deleted.episodes > 0;
|
|
||||||
|
if (result) {
|
||||||
|
const success = result.deleted.episodes > 0;
|
||||||
|
logger.log(`✅ [TraktService] Episode removal success: ${success} (${result.deleted.episodes} episodes deleted)`);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.log(`❌ [TraktService] No result from removeEpisodeFromHistory`);
|
||||||
|
return false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('[TraktService] Failed to remove episode from history:', error);
|
logger.error('[TraktService] Failed to remove episode from history:', error);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue