惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
有赞技术团队
有赞技术团队
B
Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
Martin Fowler
Martin Fowler
H
Hackread – Cybersecurity News, Data Breaches, AI and More
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
博客园 - Franky
小众软件
小众软件

zodream梦想开源/个人编程日记

文件解析笔记-zodream梦想开源/个人编程日记 密码本开发笔记之读写与保存-zodream梦想开源/个人编程日记 SkiaSharp 把 pixel byte[] 转成 SKBitmap-zodream梦想开源/个人编程日记 nas 使用 Docker 安装 gogs-zodream梦想开源/个人编程日记 复制 android 手机中的文件到电脑-zodream梦想开源/个人编程日记 周报:寻找优质的周刊-zodream梦想开源/个人编程日记 开发日志:对Markdown的代码块新增引用来源支持-zodream梦想开源/个人编程日记 周报:怎么写技术类的教程文章-zodream梦想开源/个人编程日记 css display:flex 布局尺寸超出问题-zodream梦想开源/个人编程日记 周报:SEO优化的思考-zodream梦想开源/个人编程日记 Edge 浏览器不适用 Edge Image Viewer 打开图片 -zodream梦想开源/个人编程日记 SEO 学习笔记(一) 内容来源-zodream梦想开源/个人编程日记 PHP 实现双因素身份认证(2FA)-zodream梦想开源/个人编程日记 WPF MVVM 获取List 多选数据-zodream梦想开源/个人编程日记 Burp Suite 抓包-zodream梦想开源/个人编程日记 使用 indexnow 注意事项-zodream梦想开源/个人编程日记 Godot 使用字体图标 例如: Iconfont、FontAwesome-zodream梦想开源/个人编程日记 angular 15 对指定页面进行访问限制-zodream梦想开源/个人编程日记 CSS 使用 column-count 实现瀑布流出现内容分割的解决办法-zodream梦想开源/个人编程日记 input 确认按键事件在手机端不生效-zodream梦想开源/个人编程日记 C# 使用socket 进行通讯-zodream梦想开源/个人编程日记 Maui开发中Windows应用开启管理员权限-zodream梦想开源/个人编程日记 Maui 中自定义控件-zodream梦想开源/个人编程日记 angular 14 使用 ng-template 实现tree 结构显示-zodream梦想开源/个人编程日记 c# 动态安装和卸载dll-zodream梦想开源/个人编程日记 慎用 CompositionTarget.Rendering-zodream梦想开源/个人编程日记 c# 重写 c++ 程序笔记:数据初始化-zodream梦想开源/个人编程日记 源码编译 aseprite-zodream梦想开源/个人编程日记 记录一下字符串分隔split各语言之间的不同-zodream梦想开源/个人编程日记 c# Gzip解码无头内容-zodream梦想开源/个人编程日记
Wallpager Engine 删除记录-zodream梦想开源/个人编程日记
zodream · 2020-08-04 · via zodream梦想开源/个人编程日记

普通删除

直接选中,右键取消订阅即可,

但是没办法删除其他机器的订阅记录。因为有些记录是不出现在 已安装 列表里的(个人猜测是已下架的壁纸)

导致每一次安装都需要下载大量的文件。

针对这种记录,就需要用特别的方法。

根据文件标题去搜索中心安装取消订阅

按道理是可以的,

但是我没有试过,因为有很多壁纸都搜不到了

这种方法也很麻烦

让这些壁纸出现在已安装列表里即可取消订阅

首先,必须清楚每一个壁纸有一个特定的 编号,删除也是根据这个编号进行删除的

实际上每一个壁纸的文件夹名就是这个编号,只要把这个编号出现在列表里,就能取消订阅了

实际操作方法:

  1. 获取编号
  2. 找到配置文件(实际是在wallpager 的安装路径下的 bin\workshopcache.json 文件)
  3. 打开文件,复制一项,改掉 workshopid 为编号即可,最好 title 也改成编号,不然认不出
  4. 打开Wallpager Engine,选中取消订阅即可
  5. 重启Wallpager Engine,就删除成功了

提供一个脚本批量生成

import os
import json

def get_all_dir(dir):
    '''
    :brief: 获取所有的文件夹名
    :param dir: string 父文件夹路径
    :return: string[] 子文件夹名
    '''
    for _, dirs, _ in os.walk(dir):
        return dirs

def get_all_workshopid(dir):
    '''
    :brief:获取所有项目的workshopid
    :param dir: string 父文件夹路径
    :return: string[] id列表
    '''
    data = []
    dirs = get_all_dir(dir)
    for item in dirs:
        data.extend(get_all_dir(dir + r'\\' + item))
    return data

def create_config(items, sample):
    '''
    :brief:根据示例生成新的项
    :param items: string[] workshopid数组
    :param sample: dict 
    :return: dict[] 
    '''
    data = []
    for item in items:
        new_item = sample.copy()
        old = new_item['workshopid']
        for (k, v) in new_item.items():
            if k == 'title' or k == 'workshopid':
                new_item[k] = item
            elif isinstance(v, str):
                new_item[k] = v.replace(old, item)
        data.append(new_item)
    return data

# steam 的安装路径
steam_dir = r'D:\Steam\\'
# steam下载的文件路径
workshop_dir = steam_dir + r'steamapps\workshop\content'
# wallpager 的配置文件路径
wallpager_config_file = steam_dir + r'steamapps\common\wallpaper_engine\bin\workshopcache.json'

id_items = get_all_workshopid(workshop_dir)

print('总文件个数:%d' %(len(id_items)))

with open(wallpager_config_file, 'r+', encoding='utf-8') as fs:
    content = fs.read()
    res = json.loads(content)
    if len(res['wallpapers']) < 1:
        print('请先订阅一个作为示例')
        exit(0)
    sample = res['wallpapers'][0]
    exist_id = []
    for item in res['wallpapers']:
        exist_id.append(item['workshopid'])
    data = list(set(id_items).difference(set(exist_id)))
    if len(data) < 1:
        print('没有缓存的文件')
        exit(0)
    new_items = create_config(data, sample)
    res['wallpapers'].extend(new_items)
    content = json.dumps(res, indent=4, ensure_ascii=False)
    fs.seek(0)
    fs.write(content)
    print('成功生成缓存配置文件,可以进行取消订阅')

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475

全选或框选批量取消订阅即可

注意改掉里面的路径 steam_dir 必须先订阅一个壁纸

本来是想找到接口,通过接口删除的,但能力有限,没找到方法

转载请保留原文链接: https://zodream.cn/blog/id/179.html